Comment 1 for bug 1665389

Revision history for this message
Dr. David Alan Gilbert (dgilbert-h) wrote :

Hi Nadav,
  Can you clarify what the host and L1 kernels are please?

This error means that qemu tried to write some msrs but one of the msr writes failed; we need to figure out which one to understand what's going on.

1) Edit kvm_msr_entry_add in target/i386/kvm.c to something like:

    assert((void *)(entry + 1) <= limit);
    fprintf(stderr,"kvm_msr_entry_add: @%d index=%x value=%lx\n", msrs->nmsrs, index, value);
    entry->index = index;

2) edit kvm_put_msrs near the bottom:

    fprintf(stderr,"kvm_put_msrs: ret=%d expected=%d\n", ret, cpu->kvm_msr_buf->nmsrs);
    assert(ret == cpu->kvm_msr_buf->nmsrs);

Now with any luck the 'ret' value will tell you the entry which is bad, and you can match
that to the @%d value (or maybe it's the entry before that one which failed?) then we get the index, look it up in the intel docs and figure out which MSR it's complaining about.

Also, does the problem go away if you remove the +x2apic on the top level qemu?

Dave