qemu/tests/qtest
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
..
fuzz tests/qtest: Fix LGPL information in the file headers 2020-06-15 18:26:46 +02:00
libqos libqos: pci-pc: use 32-bit write for EJ register 2020-06-26 06:45:30 -04:00
ac97-test.c
acpi-utils.c
acpi-utils.h
ahci-test.c
arm-cpu-features.c tests/qtest/arm-cpu-features: Add feature setting tests 2020-06-23 11:39:47 +01:00
bios-tables-test-allowed-diff.h qtest: allow DSDT acpi table changes 2020-06-24 17:18:28 -04:00
bios-tables-test.c acpi: bios-tables-test: show more context on asl diffs 2020-06-24 17:18:28 -04:00
boot-order-test.c boot-order-test: fix memleaks in boot-order-test 2020-02-04 09:00:57 +01:00
boot-sector.c
boot-sector.h
boot-serial-test.c tests: Silence various warnings with pseries 2020-02-03 11:33:11 +11:00
cdrom-test.c hw/ppc/prep: Remove the deprecated "prep" machine and the OpenHackware BIOS 2020-02-02 14:07:57 +11:00
cpu-plug-test.c
dbus-vmstate1.xml
dbus-vmstate-test.c
device-introspect-test.c piix: fix xenfv regression, add compat machine xenfv-4.2 2020-04-11 08:49:11 -04:00
device-plug-test.c
display-vga-test.c
drive_del-test.c
ds1338-test.c
e1000-test.c
e1000e-test.c tests/qtest: Fix LGPL information in the file headers 2020-06-15 18:26:46 +02:00
eepro100-test.c
endianness-test.c hw/mips/fuloong2e: Fix typo in Fuloong machine name 2020-05-26 13:20:48 +02:00
es1370-test.c
fdc-test.c
fw_cfg-test.c
hd-geo-test.c hd-geo-test: Clean up use of buf[] in create_qcow2_with_mbr() 2020-03-17 10:23:14 -04:00
hexloader-test.c
i440fx-test.c
i82801b11-test.c
ide-test.c tests/ide-test: Create a single unit-test covering more PRDT cases 2020-01-27 17:07:31 -05:00
intel-hda-test.c
ioh3420-test.c
ipmi-bt-test.c
ipmi-kcs-test.c
ipoctal232-test.c
ivshmem-test.c
libqtest-single.h
libqtest.c libqtest: make bufwrite rely on the TransportOps 2020-02-22 08:26:47 +00:00
libqtest.h libqtest: make bufwrite rely on the TransportOps 2020-02-22 08:26:47 +00:00
m25p80-test.c
m48t59-test.c
machine-none-test.c tests: machine-none-test: Enable MicroBlaze testing 2020-06-10 12:10:45 -04:00
Makefile.include tests: Disable select tests under TSan, which hit TSan issue. 2020-06-16 14:49:05 +01:00
megasas-test.c
microbit-test.c
migration-helpers.c
migration-helpers.h
migration-test.c tests/migration: Tighten error checking 2020-05-27 07:45:25 +02:00
modules-test.c
ne2000-test.c
numa-test.c tests: numa: test one backend with prealloc enabled 2020-04-14 10:35:44 -04:00
nvme-test.c
pca9552-test.c libqos: rename i2c_send and i2c_recv 2020-02-22 08:26:48 +00:00
pci-test.c
pcnet-test.c
pflash-cfi02-test.c
pnv-xscom-test.c
prom-env-test.c tests: Silence various warnings with pseries 2020-02-03 11:33:11 +11:00
pvpanic-test.c
pxe-test.c tests: Silence various warnings with pseries 2020-02-03 11:33:11 +11:00
q35-test.c tests: q35: MCH: add default SMBASE SMRAM lock test 2020-01-22 00:23:07 -05:00
qmp-cmd-test.c
qmp-test.c qapi: Split control.json off misc.json 2020-02-17 13:53:47 +01:00
qom-test.c piix: fix xenfv regression, add compat machine xenfv-4.2 2020-04-11 08:49:11 -04:00
qos-test.c tests/qtest: Fix LGPL information in the file headers 2020-06-15 18:26:46 +02:00
rtas-test.c
rtc-test.c
rtl8139-test.c
sdhci-test.c
spapr-phb-test.c
tco-test.c
test-arm-mptimer.c
test-filter-mirror.c
test-filter-redirector.c
test-hmp.c hmp: Implement qom-get HMP command 2020-06-01 18:44:27 +01:00
test-netfilter.c
test-x86-cpuid-compat.c i386: Mask SVM features if nested SVM is disabled 2020-06-26 09:39:40 -04:00
tmp105-test.c
tpm-crb-swtpm-test.c test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tpm-crb-test.c test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tpm-emu.c tpm: Move backend code under the 'backends/' directory 2020-06-19 07:25:55 -04:00
tpm-emu.h test/tpm-emu: include sockets and channel headers in tpm-emu header 2020-06-09 14:18:04 -04:00
tpm-tests.c test: tpm: pass optional machine options to swtpm test functions 2020-03-05 12:18:33 -05:00
tpm-tests.h test: tpm: pass optional machine options to swtpm test functions 2020-03-05 12:18:33 -05:00
tpm-tis-device-swtpm-test.c test: tpm-tis: Add Sysbus TPM-TIS device test 2020-03-05 12:18:47 -05:00
tpm-tis-device-test.c test: tpm-tis: Add Sysbus TPM-TIS device test 2020-03-05 12:18:47 -05:00
tpm-tis-swtpm-test.c test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tpm-tis-test.c test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tpm-tis-util.c test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tpm-tis-util.h test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tpm-util.c test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tpm-util.h test: tpm-tis: Get prepared to share tests between ISA and sysbus devices 2020-03-05 12:18:39 -05:00
tulip-test.c qtest: add tulip test case 2020-03-31 21:14:35 +08:00
usb-hcd-ehci-test.c libqos: usb-hcd-ehci: use 32-bit write for config register 2020-06-26 06:45:29 -04:00
usb-hcd-ohci-test.c
usb-hcd-uhci-test.c
usb-hcd-xhci-test.c
vhost-user-test.c tests/qtest/vhost-user-test: Fix memory leaks 2020-01-16 17:01:25 +01:00
virtio-9p-test.c tests/virtio-9p: added readdir test 2020-02-08 09:29:04 +01:00
virtio-blk-test.c
virtio-ccw-test.c
virtio-net-test.c
virtio-rng-test.c
virtio-scsi-test.c
virtio-serial-test.c
virtio-test.c
vmgenid-test.c
vmxnet3-test.c
wdt_ib700-test.c