qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] target/i386: drop AMD machine check bits from Intel CPUID
@ 2024-06-27 14:06 Paolo Bonzini
  2024-06-27 14:06 ` [PATCH 1/2] target/i386: pass X86CPU to x86_cpu_get_supported_feature_word Paolo Bonzini
  2024-06-27 14:06 ` [PATCH 2/2] target/i386: drop AMD machine check bits from Intel CPUID Paolo Bonzini
  0 siblings, 2 replies; 8+ messages in thread
From: Paolo Bonzini @ 2024-06-27 14:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: Xiaoyao Li, John Allen

The recent addition of the SUCCOR bit to kvm_arch_get_supported_cpuid()
causes the bit to be visible when "-cpu host" VMs are started on Intel
processors.

While this should in principle be harmless, it's not tidy and we don't
even know for sure that it doesn't cause any guest OS to take unexpected
paths.  So plumb in a mechanism for x86_cpu_get_supported_feature_word()
to return different values depending on the *guest* CPU vendor (which,
for KVM, is by default the same as the host vendor); and then use it
to hide the SUCCOR bit if the guest has non-AMD vendor.

Paolo Bonzini (2):
  target/i386: pass X86CPU to x86_cpu_get_supported_feature_word
  target/i386: drop AMD machine check bits from Intel CPUID

 target/i386/cpu.h         |  3 +--
 target/i386/cpu.c         | 29 +++++++++++++++++++++--------
 target/i386/kvm/kvm-cpu.c |  2 +-
 3 files changed, 23 insertions(+), 11 deletions(-)

-- 
2.45.2



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-07-01  6:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-27 14:06 [PATCH 0/2] target/i386: drop AMD machine check bits from Intel CPUID Paolo Bonzini
2024-06-27 14:06 ` [PATCH 1/2] target/i386: pass X86CPU to x86_cpu_get_supported_feature_word Paolo Bonzini
2024-06-28  8:26   ` Xiaoyao Li
2024-06-27 14:06 ` [PATCH 2/2] target/i386: drop AMD machine check bits from Intel CPUID Paolo Bonzini
2024-06-28  8:31   ` Xiaoyao Li
2024-06-28 13:23     ` Paolo Bonzini
2024-07-01  4:23       ` Zhao Liu
2024-07-01  6:39         ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).