qemu-e2k/target/i386
Eduardo Habkost 730319aef0 i386: Mask SVM features if nested SVM is disabled
QEMU incorrectly validates FEAT_SVM feature flags against
GET_SUPPORTED_CPUID even if SVM features are being masked out by
cpu_x86_cpuid().  This can make QEMU print warnings on most AMD
CPU models, even when SVM nesting is disabled (which is the
default).

This bug was never detected before because of a Linux KVM bug:
until Linux v5.6, KVM was not filtering out SVM features in
GET_SUPPORTED_CPUID when nested was disabled.  This KVM bug was
fixed in Linux v5.7-rc1, on Linux commit a50718cc3f43 ("KVM:
nSVM: Expose SVM features to L1 iff nested is enabled").

Fix the problem by adding a CPUID_EXT3_SVM dependency to all
FEAT_SVM feature flags in the feature_dependencies table.

Reported-by: Yanan Fu <yfu@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20200623230116.277409-1-ehabkost@redhat.com>
[Fix testcase. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-06-26 09:39:40 -04:00
..
hvf i386: hvf: Drop HVFX86EmulatorState 2020-06-12 11:20:12 -04:00
arch_dump.c
arch_memory_mapping.c
bpt_helper.c
cc_helper_template.h
cc_helper.c
cpu-param.h
cpu-qom.h cpu: Use DeviceClass reset instead of a special CPUClass reset 2020-03-17 19:48:10 -04:00
cpu.c i386: Mask SVM features if nested SVM is disabled 2020-06-26 09:39:40 -04:00
cpu.h i386: hvf: Drop HVFX86EmulatorState 2020-06-12 11:20:12 -04:00
excp_helper.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
fpu_helper.c target/i386: reimplement fpatan using floatx80 operations 2020-06-26 09:39:39 -04:00
gdbstub.c gdbstub: i386: Fix gdb_get_reg16() parameter to unbreak gdb 2020-04-15 11:38:23 +01:00
hax-all.c hax: Dynamic allocate vcpu state structure 2020-06-10 12:09:59 -04:00
hax-i386.h i386: Remove unused define's from hax and hvf 2020-06-10 12:10:47 -04:00
hax-interface.h
hax-mem.c
hax-posix.c i386: Fix GCC warning with snprintf when HAX is enabled 2020-03-16 23:02:24 +01:00
hax-posix.h
hax-windows.c hax: Windows doesn't like posix device names 2020-04-14 10:37:42 -04:00
hax-windows.h
helper.c Fix wrong behavior of cpu_memory_rw_debug() function in SMM 2019-10-04 18:49:18 +02:00
helper.h
hyperv-proto.h i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment 2019-10-22 09:38:42 +02:00
hyperv-stub.c
hyperv.c
hyperv.h
int_helper.c
kvm_i386.h target/i386: kvm: initialize feature MSRs very early 2020-01-24 20:59:09 +01:00
kvm-stub.c
kvm.c kvm: i386: allow TSC to differ by NTP correction bounds without TSC scaling 2020-06-26 09:39:40 -04:00
machine.c Fix some comment spelling errors. 2019-12-18 02:34:11 +01:00
Makefile.objs
mem_helper.c tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
misc_helper.c target/i386: Fix OUTL debug output 2020-06-10 12:09:35 -04:00
monitor.c hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
mpx_helper.c
ops_sse_header.h
ops_sse.h target/i386: correct fix for pcmpxstrx substring search 2020-06-12 11:10:39 -04:00
seg_helper.c target/i386: Use cpu_*_mmuidx_ra instead of templates 2020-01-15 15:13:10 -10:00
sev_i386.h target/i386: sev: Move local structure definitions into .c file 2020-06-12 11:20:13 -04:00
sev-stub.c
sev.c target/i386: sev: Unify SEVState and SevGuestState 2020-06-12 11:20:14 -04:00
shift_helper_template.h
smm_helper.c
svm_helper.c
svm.h
trace-events
translate.c linux-user/i386: Emulate x86_64 vsyscalls 2020-03-26 08:08:54 +01:00
whp-dispatch.h WHPX: TSC get and set should be dependent on VM state 2020-03-16 23:02:21 +01:00
whpx-all.c WHPX: Use proper synchronization primitives while processing 2020-03-16 23:02:24 +01:00
xsave_helper.c