Message ID | 20170506164825.GG27819@HEDWIG.INI.CMU.EDU (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 06/05/2017 18:48, Gabriel L. Somlo wrote: > So, in conclusion; it's not important to *me* that this old machine > keeps working, I'm just volunteering test data points. So please don't > feel obligated in any way to go out of your way on my account. OTOH, > I'm happy to provide feedback as long as you would like me to. > > Along the same lines: Paolo, as the author of commit 2c82878b0cb38fd, > is the Xeon chip listed above one of the "obsolete for virtualization" > models ? Yes - I hadn't tested this model in particular, and this one is a little less obsolete compared to the ones I found without NMI support (a 64-bit Prescott and a 32-bit Yonah), but I still believe it's saner to treat them as obsolete. Can you please run vmxcap (from QEMU's git repository) on that processor and include the output? Paolo > In that case, it makes no sense for me to keep using it for > tests, and the fact that it misbehaves with L1 MWAIT should also not > matter at all.
diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h index b49add7..249362c 100644 --- a/arch/x86/kvm/x86.h +++ b/arch/x86/kvm/x86.h @@ -216,9 +216,12 @@ static inline u64 nsec_to_cycles(struct kvm_vcpu *vcpu, u64 nsec) static inline bool kvm_mwait_in_guest(void) { - return boot_cpu_has(X86_FEATURE_MWAIT) && + bool ret; + ret = boot_cpu_has(X86_FEATURE_MWAIT) && !boot_cpu_has_bug(X86_BUG_AMD_E400) && !boot_cpu_has_bug(X86_BUG_MONITOR); + printk(KERN_INFO "kvm_mwait_in_guest: %d\n", ret); + return 0; } #endif