target/i386: pass X86CPU to x86_cpu_get_supported_feature_word
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 Jun 2024 23:12:42 +0000 (01:12 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 3 Jul 2024 16:41:26 +0000 (18:41 +0200)
commit8dee38483274bd0fcf3f74dea024d719b958200d
tree6dcb3f76006a354520814865b3307ce9426ddbef
parent4408155ac593644f04e22db0656d79a0e198be63
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>
target/i386/cpu.c
target/i386/cpu.h
target/i386/kvm/kvm-cpu.c