Skip to contentSkip to conversation

Fix for unhandled msr c0000081 problems under Intel cpus

RFT Avi Kivity 3 participants 17 messages Dec 13, 2006 – Dec 28, 2006 15 messages not in the archive KVM

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

If you've experienced this problem, please test the attached patch (to qemu, not the kernel module) and report back. The patch basically tells the guest that the msr doesn't exist.

Signature · 1 line
error compiling committee.c: too many arguments to function
qemu-kvm.c +22 -0
Index: qemu/qemu-kvm.c
===================================================================
@@ -408,6 +408,7 @@
 {
     CPUState **envs = opaque;
     CPUState *saved_env;
+    uint32_t eax = *rax;
 
     saved_env = env;
     env = envs[0];
@@ -421,6 +422,27 @@
     *rcx = env->regs[R_ECX];
     *rbx = env->regs[R_EBX];
     *rax = env->regs[R_EAX];
+    // don't report long mode/syscall if no native support
+    if (eax == 0x80000001) {
+	unsigned long h_eax = eax, h_edx;
+
+
+	// horrible hack to workaround gcc 3 register pressure trouble
+	asm (
+#ifdef __x86_64__
+	     "push %%rbx; push %%rcx; cpuid; pop %%rcx; pop %%rbx"
+#else
+	     "push %%ebx; push %%ecx; cpuid; pop %%ecx; pop %%ebx"
+#endif
+	     : "+a"(h_eax), "=d"(h_edx));
+
+	// long mode
+	if ((h_edx & 0x20000000) == 0)
+	    *rdx &= ~0x20000000ull;
+	// syscall
+	if ((h_edx & 0x00000800) == 0)
+	    *rdx &= ~0x00000800ull;
+    }
     env = saved_env;
     return 0;
 }

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

A message that is not in the archive (sent off-list or not yet received): 457FCBB9.5070800-atKUWr5tajBWk0Htik3J/[email protected]

#2 lore raw
Quoted 3 lines · Avi Kivity

If you've experienced this problem, please test the attached patch (to qemu, not the kernel module) and report back. The patch basically tells the guest that the msr doesn't exist.

That doesn't help, the messages are still there.

Signature · 8 lines
Michael "Tired" Riepe <[email protected]>
X-Tired: Each morning I get up I die a little

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
#3 lore raw
In reply to a message not in the archive

Oh well...

I was wondering which stupid piece of sh^H^Hcode generated so many wrong rdmsr instructions without looking at the CPU feature flags. So I grepped through the linux kernel and glibc sources as well as some other likely suspects and found - nothing.

Guess what? It's qemu!

In qemu-kvm.c (around line 329 in save_regs()) it starts to call kvm_get_msrs(), and one of the MSRs it wants to read is MSR_STAR. When I removed MSR_STAR from the list (which fortunately has no consequences on my Core Duo), the messages were gone.

Signature · 8 lines
Michael "Tired" Riepe <[email protected]>
X-Tired: Each morning I get up I die a little

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#5 lore raw
Quoted 7 lines · Michael Riepe

Oh well...

I was wondering which stupid piece of sh^H^Hcode generated so many wrong rdmsr instructions without looking at the CPU feature flags. So I grepped through the linux kernel and glibc sources as well as some other likely suspects and found - nothing.

Quoted 7 lines

Guess what? It's qemu!

In qemu-kvm.c (around line 329 in save_regs()) it starts to call kvm_get_msrs(), and one of the MSRs it wants to read is MSR_STAR. When I removed MSR_STAR from the list (which fortunately has no consequences on my Core Duo), the messages were gone.

Yes, you're right.

I'll commit the previous patch (which is correct, even if no guest actually uses syscall), and teach qemu not to read MSR_STAR when it isn't available.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 458117E4.4010807-atKUWr5tajBWk0Htik3J/[email protected]

author
#7 lore raw
Quoted 16 lines · Avi Kivity
Quoted 7 lines · Michael Riepe

Oh well...

I was wondering which stupid piece of sh^H^Hcode generated so many wrong rdmsr instructions without looking at the CPU feature flags. So I grepped through the linux kernel and glibc sources as well as some other likely suspects and found - nothing.

Quoted 7 lines

Guess what? It's qemu!

In qemu-kvm.c (around line 329 in save_regs()) it starts to call kvm_get_msrs(), and one of the MSRs it wants to read is MSR_STAR. When I removed MSR_STAR from the list (which fortunately has no consequences on my Core Duo), the messages were gone.

Quoted 4 lines

Yes, you're right.

I'll commit the previous patch (which is correct, even if no guest actually uses syscall), and teach qemu not to read MSR_STAR when it isn't available.

A patch is attached. Please test.

(note it changes libkvm too)

Signature · 1 line
error compiling committee.c: too many arguments to function
qemu-kvm.c +37 -22
Index: qemu/qemu-kvm.c
===================================================================
@@ -16,6 +16,8 @@
 
 int kvm_allowed = 1;
 kvm_context_t kvm_context;
+static struct kvm_msr_list *kvm_msr_list;
+static int kvm_has_msr_star;
 
 #define NR_CPU 16
 static CPUState *saved_env[NR_CPU];
@@ -127,7 +129,7 @@
     struct kvm_regs regs;
     struct kvm_sregs sregs;
     struct kvm_msr_entry msrs[MSR_COUNT];
-    int rc;
+    int rc, n;
 
     /* hack: save env */
     if (!saved_env[0])
@@ -201,19 +203,21 @@
     kvm_set_sregs(kvm_context, 0, &sregs);
 
     /* msrs */
-    set_msr_entry(&msrs[0], MSR_IA32_SYSENTER_CS,  env->sysenter_cs);
-    set_msr_entry(&msrs[1], MSR_IA32_SYSENTER_ESP, env->sysenter_esp);
-    set_msr_entry(&msrs[2], MSR_IA32_SYSENTER_EIP, env->sysenter_eip);
-    set_msr_entry(&msrs[3], MSR_STAR,              env->star);
-    set_msr_entry(&msrs[4], MSR_IA32_TSC, env->tsc);
+    n = 0;
+    set_msr_entry(&msrs[n++], MSR_IA32_SYSENTER_CS,  env->sysenter_cs);
+    set_msr_entry(&msrs[n++], MSR_IA32_SYSENTER_ESP, env->sysenter_esp);
+    set_msr_entry(&msrs[n++], MSR_IA32_SYSENTER_EIP, env->sysenter_eip);
+    if (kvm_has_msr_star)
+	set_msr_entry(&msrs[n++], MSR_STAR,              env->star);
+    set_msr_entry(&msrs[n++], MSR_IA32_TSC, env->tsc);
 #ifdef TARGET_X86_64
-    set_msr_entry(&msrs[5], MSR_CSTAR,             env->cstar);
-    set_msr_entry(&msrs[6], MSR_KERNELGSBASE,      env->kernelgsbase);
-    set_msr_entry(&msrs[7], MSR_FMASK,             env->fmask);
-    set_msr_entry(&msrs[8], MSR_LSTAR  ,           env->lstar);
+    set_msr_entry(&msrs[n++], MSR_CSTAR,             env->cstar);
+    set_msr_entry(&msrs[n++], MSR_KERNELGSBASE,      env->kernelgsbase);
+    set_msr_entry(&msrs[n++], MSR_FMASK,             env->fmask);
+    set_msr_entry(&msrs[n++], MSR_LSTAR  ,           env->lstar);
 #endif
 
-    rc = kvm_set_msrs(kvm_context, 0, msrs, MSR_COUNT);
+    rc = kvm_set_msrs(kvm_context, 0, msrs, n);
     if (rc == -1)
         perror("kvm_set_msrs FAILED");
 }
@@ -326,18 +330,20 @@
     tlb_flush(env, 1);
 
     /* msrs */    
-    msrs[0].index = MSR_IA32_SYSENTER_CS;
-    msrs[1].index = MSR_IA32_SYSENTER_ESP;
-    msrs[2].index = MSR_IA32_SYSENTER_EIP;
-    msrs[3].index = MSR_STAR;
-    msrs[4].index = MSR_IA32_TSC;
+    n = 0;
+    msrs[n++].index = MSR_IA32_SYSENTER_CS;
+    msrs[n++].index = MSR_IA32_SYSENTER_ESP;
+    msrs[n++].index = MSR_IA32_SYSENTER_EIP;
+    if (kvm_has_msr_star)
+	msrs[n++].index = MSR_STAR;
+    msrs[n++].index = MSR_IA32_TSC;
 #ifdef TARGET_X86_64
-    msrs[5].index = MSR_CSTAR;
-    msrs[6].index = MSR_KERNELGSBASE;
-    msrs[7].index = MSR_FMASK;
-    msrs[8].index = MSR_LSTAR;
+    msrs[n++].index = MSR_CSTAR;
+    msrs[n++].index = MSR_KERNELGSBASE;
+    msrs[n++].index = MSR_FMASK;
+    msrs[n++].index = MSR_LSTAR;
 #endif
-    rc = kvm_get_msrs(kvm_context, 0, msrs, MSR_COUNT);
+    rc = kvm_get_msrs(kvm_context, 0, msrs, n);
     if (rc == -1) {
         perror("kvm_get_msrs FAILED");
     }
@@ -597,11 +603,20 @@
 
 int kvm_qemu_create_context(void)
 {
+    int i;
+
     if (kvm_create(kvm_context, phys_ram_size, (void**)&phys_ram_base) < 0) {
 	kvm_qemu_destroy();
 	return -1;
     }
-
+    kvm_msr_list = kvm_get_msr_list(kvm_context);
+    if (!kvm_msr_list) {
+	kvm_qemu_destroy();
+	return -1;
+    }
+    for (i = 0; i < kvm_msr_list->nmsrs; ++i)
+	if (kvm_msr_list->indices[i] == MSR_STAR)
+	    kvm_has_msr_star = 1;
     return 0;
 }
 
kvmctl.c +2 -1
Index: user/kvmctl.c
===================================================================
@@ -339,13 +339,14 @@
 
     sizer.nmsrs = 0;
     r = ioctl(kvm->fd, KVM_GET_MSR_INDEX_LIST, &sizer);
-    if (r == -1)
+    if (r == -1 && errno != E2BIG)
 	return 0;
     msrs = malloc(sizeof *msrs + sizer.nmsrs * sizeof *msrs->indices);
     if (!msrs) {
 	errno = ENOMEM;
 	return 0;
     }
+    msrs->nmsrs = sizer.nmsrs;
     r = ioctl(kvm->fd, KVM_GET_MSR_INDEX_LIST, msrs);
     if (r == -1) {
 	e = errno;

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

A message that is not in the archive (sent off-list or not yet received): 45812407.7010803-atKUWr5tajBWk0Htik3J/[email protected]

#9 lore raw
Quoted 7 lines · Avi Kivity
Quoted 3 lines

I'll commit the previous patch (which is correct, even if no guest actually uses syscall), and teach qemu not to read MSR_STAR when it isn't available.

A patch is attached. Please test.

(note it changes libkvm too)

hm, this patch doesnt seem to work, qemu gives me:

Could not create KVM context

it comes from:

 3064  ioctl(3, 0x4004ae0b, 0)           = 0
 3064  ioctl(3, 0xc004ae0f, 0xbff8bd98)  = -1 E2BIG (Argument list too long)

but i have an older (2-weeks) qemu drop from branches/release/qemu - is that one supposed to work?

Ingo

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#11 lore raw
Quoted 16 lines · Ingo Molnar
Quoted 8 lines · Avi Kivity
Quoted 4 lines

I'll commit the previous patch (which is correct, even if no guest actually uses syscall), and teach qemu not to read MSR_STAR when it isn't available.

A patch is attached. Please test.

(note it changes libkvm too)

hm, this patch doesnt seem to work, qemu gives me:

Could not create KVM context

Quoted 8 lines

it comes from:

 3064  ioctl(3, 0x4004ae0b, 0)           = 0
 3064  ioctl(3, 0xc004ae0f, 0xbff8bd98)  = -1 E2BIG (Argument list too long)

but i have an older (2-weeks) qemu drop from branches/release/qemu - is that one supposed to work?

There was an accompanying bug in libkvm or qemu IIRC.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 4593C4CE.4040203-atKUWr5tajBWk0Htik3J/[email protected]

#13 lore raw
Quoted 10 lines · Avi Kivity
Quoted 10 lines

hm, this patch doesnt seem to work, qemu gives me:

Could not create KVM context

it comes from:

3064  ioctl(3, 0x4004ae0b, 0)           = 0
3064  ioctl(3, 0xc004ae0f, 0xbff8bd98)  = -1 E2BIG (Argument list too 

long)

Quoted 5 lines
Quoted 3 lines

but i have an older (2-weeks) qemu drop from branches/release/qemu - is that one supposed to work?

There was an accompanying bug in libkvm or qemu IIRC.

yeah, the patch changes libkvm and thus i reinstalled libkvm when i tested it:

-rw-r--r-- 1 mingo mingo 23326 Dec 28 14:11 user/libkvm.a
-rwxr-xr-x 1 mingo mingo 3932505 Dec 28 14:11 qemu/i386-softmmu/qemu
-rwxr-xr-x 1 root root 23326 Dec 28 14:13 /usr/local/lib/libkvm.a

and rebuilt qemu with the new libkvm, but it still gave me this warning. I'll do a full qemu rebuild, just to make sure it picked up the new library ...

Ingo

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw
Quoted 2 lines · Ingo Molnar

I'll do a full qemu rebuild, just to make sure it picked up the new library ...

that did the trick. The only messages remaining are:

kvm: unhandled wrmsr: 0xc1
inject_general_protection: rip 0xc011b8ae

Ingo

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#17 lore raw
Quoted 13 lines · Ingo Molnar
Quoted 3 lines · Ingo Molnar

I'll do a full qemu rebuild, just to make sure it picked up the new library ...

that did the trick. The only messages remaining are:

kvm: unhandled wrmsr: 0xc1
inject_general_protection: rip 0xc011b8ae

That's a performance counter. What guest triggers it?

I can usually shut up an unhandled rdmsr, but wrmsrs are more worrying.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 4593CD12.7010603-atKUWr5tajBWk0Htik3J/[email protected]

#19 lore raw
Quoted 8 lines · Avi Kivity
Quoted 6 lines

that did the trick. The only messages remaining are:

kvm: unhandled wrmsr: 0xc1
inject_general_protection: rip 0xc011b8ae

That's a performance counter. What guest triggers it?

a 32-bit Linux bzImage:

c011b8ae: 0f 30 wrmsr

(gdb) list *0xc011b8ae
0xc011b8ae is in setup_apic_nmi_watchdog (include/asm/msr.h:36).
31 static inline void wrmsrl (unsigned long msr, unsigned long long val)
32 {

 33              unsigned long lo, hi;
 34              lo = (unsigned long) val;
 35              hi = val >> 32;
 36              wrmsr (msr, lo, hi);

37 }
38
39 /* wrmsr with exception handling */
40 #define wrmsr_safe(msr,a,b) ({ int ret__;

the guest also obviously crashes due to this #GPF.

[ 2.6.20-rc2-rt2 kernel of course ;-) ]

Ingo

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#21 lore raw
Quoted 25 lines · Ingo Molnar
Quoted 9 lines · Avi Kivity
Quoted 7 lines

that did the trick. The only messages remaining are:

kvm: unhandled wrmsr: 0xc1
inject_general_protection: rip 0xc011b8ae

That's a performance counter. What guest triggers it?

a 32-bit Linux bzImage:

c011b8ae: 0f 30 wrmsr

(gdb) list *0xc011b8ae
0xc011b8ae is in setup_apic_nmi_watchdog (include/asm/msr.h:36).
31 static inline void wrmsrl (unsigned long msr, unsigned long long val)
32 {

 33              unsigned long lo, hi;
 34              lo = (unsigned long) val;
 35              hi = val >> 32;
 36              wrmsr (msr, lo, hi);
Quoted 7 lines

37 }
38
39 /* wrmsr with exception handling */
40 #define wrmsr_safe(msr,a,b) ({ int ret__;

the guest also obviously crashes due to this #GPF.

The wary ones use wrmsr_safe().

Quoted 3 lines

[ 2.6.20-rc2-rt2 kernel of course ;-) ]

Who's the caller? I boot 2.6.18 variants regularly and they don't touch that msr.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 4593D011.9020808-atKUWr5tajBWk0Htik3J/[email protected]

#23 lore raw
Quoted 35 lines · Avi Kivity
Quoted 26 lines · Ingo Molnar
Quoted 9 lines · Avi Kivity
Quoted 7 lines

that did the trick. The only messages remaining are:

kvm: unhandled wrmsr: 0xc1
inject_general_protection: rip 0xc011b8ae

That's a performance counter. What guest triggers it?

a 32-bit Linux bzImage:

c011b8ae: 0f 30 wrmsr

(gdb) list *0xc011b8ae
0xc011b8ae is in setup_apic_nmi_watchdog (include/asm/msr.h:36).
31 static inline void wrmsrl (unsigned long msr, unsigned long long
val)
32 {

33              unsigned long lo, hi;
34              lo = (unsigned long) val;
35              hi = val >> 32;
36              wrmsr (msr, lo, hi);
Quoted 7 lines

37 }
38
39 /* wrmsr with exception handling */
40 #define wrmsr_safe(msr,a,b) ({ int ret__;

the guest also obviously crashes due to this #GPF.

Quoted 8 lines

The wary ones use wrmsr_safe().

Quoted 3 lines

[ 2.6.20-rc2-rt2 kernel of course ;-) ]

Who's the caller? I boot 2.6.18 variants regularly and they don't touch that msr.

the caller is in the gdb dump above:

Quoted 1 line
Quoted 1 line

0xc011b8ae is in setup_apic_nmi_watchdog (include/asm/msr.h:36).

i'll change it to wrmsr_safe().

Ingo

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): [email protected]

#25 lore raw
Quoted 5 lines · Ingo Molnar

the caller is in the gdb dump above:

Quoted 1 line
Quoted 1 line

0xc011b8ae is in setup_apic_nmi_watchdog (include/asm/msr.h:36).

i'll change it to wrmsr_safe().

actually, those MSRs are really architecture-defined for P6 family CPUs. So KVM/qemu should at least fake something there, or ignore it. These MSRs might be ticked by various existing kernels and distributions. Performance counters are ignored at the moment?

Ingo

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#27 lore raw
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Ingo Molnar

the caller is in the gdb dump above:

Quoted 2 lines
Quoted 2 lines

0xc011b8ae is in setup_apic_nmi_watchdog (include/asm/msr.h:36).

Quoted 8 lines
Quoted 2 lines

i'll change it to wrmsr_safe().

actually, those MSRs are really architecture-defined for P6 family CPUs. So KVM/qemu should at least fake something there, or ignore it. These MSRs might be ticked by various existing kernels and distributions. Performance counters are ignored at the moment?

They are unimplemented, and tricky to implement. Just swallowing the wrmsr is easy, but it won't do the expected thing, whatever that is.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): 4593D2D5.3020102-atKUWr5tajBWk0Htik3J/[email protected]

#29 lore raw
Quoted 7 lines · Avi Kivity
Quoted 4 lines

actually, those MSRs are really architecture-defined for P6 family CPUs. So KVM/qemu should at least fake something there, or ignore it. These MSRs might be ticked by various existing kernels and distributions. Performance counters are ignored at the moment?

They are unimplemented, and tricky to implement. Just swallowing the wrmsr is easy, but it won't do the expected thing, whatever that is.

the expected thing is to get periodic watchdog NMIs injected - but it's not a big problem if that doesnt work, the watchdog code detects that. Crashing during bootup isnt too sexy though.

Ingo

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#31 lore raw
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Avi Kivity
Quoted 5 lines

actually, those MSRs are really architecture-defined for P6 family CPUs. So KVM/qemu should at least fake something there, or ignore it. These MSRs might be ticked by various existing kernels and distributions. Performance counters are ignored at the moment?

Quoted 8 lines
Quoted 3 lines

They are unimplemented, and tricky to implement. Just swallowing the wrmsr is easy, but it won't do the expected thing, whatever that is.

the expected thing is to get periodic watchdog NMIs injected - but it's not a big problem if that doesnt work, the watchdog code detects that. Crashing during bootup isnt too sexy though.

I'll queue it for implementation then (it's just a variant of the timer interrupt). Swallowing the wrmsr may be ok for Linux, but may cause other guests to fail unpredictably.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV