aboutsummaryrefslogtreecommitdiff
path: root/target/i386/kvm
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-06-27 01:12:42 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-07-03 18:41:26 +0200
commit8dee38483274bd0fcf3f74dea024d719b958200d (patch)
tree6dcb3f76006a354520814865b3307ce9426ddbef /target/i386/kvm
parent4408155ac593644f04e22db0656d79a0e198be63 (diff)
downloadqemu-8dee38483274bd0fcf3f74dea024d719b958200d.zip
qemu-8dee38483274bd0fcf3f74dea024d719b958200d.tar.gz
qemu-8dee38483274bd0fcf3f74dea024d719b958200d.tar.bz2
target/i386: pass X86CPU to x86_cpu_get_supported_feature_word
This allows modifying the bits in "-cpu max"/"-cpu host" depending on the guest CPU vendor (which, at least by default, is the host vendor in the case of KVM). For example, machine check architecture differs between Intel and AMD, and bits from AMD should be dropped when configuring the guest for an Intel model. Cc: Xiaoyao Li <xiaoyao.li@intel.com> Cc: John Allen <john.allen@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/kvm')
-rw-r--r--target/i386/kvm/kvm-cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c
index d57a68a..6bf8dcf 100644
--- a/target/i386/kvm/kvm-cpu.c
+++ b/target/i386/kvm/kvm-cpu.c
@@ -143,7 +143,7 @@ static void kvm_cpu_xsave_init(void)
if (!esa->size) {
continue;
}
- if ((x86_cpu_get_supported_feature_word(esa->feature, false) & esa->bits)
+ if ((x86_cpu_get_supported_feature_word(NULL, esa->feature) & esa->bits)
!= esa->bits) {
continue;
}