unicorn/qemu/target/i386
Eduardo Habkost df51e8bbb3
i386: Disable OSPKE on CPU model definitions
Currently, the Cascadelake-Server, Icelake-Client, and
Icelake-Server are always generating the following warning:

qemu-system-x86_64: warning: \
host doesn't support requested feature: CPUID.07H:ECX [bit 4]

This happens because OSPKE was never returned by
GET_SUPPORTED_CPUID or x86_cpu_get_supported_feature_word().
OSPKE is a runtime flag automatically set by the KVM module or by
TCG code, was always cleared by x86_cpu_filter_features(), and
was not supposed to appear on the CPU model table.

Remove the OSPKE flag from the CPU model table entries, to avoid
the bogus warning and avoid returning invalid feature data on
query-cpu-* QMP commands. As OSPKE was always cleared by
x86_cpu_filter_features(), this won't have any guest-visible
impact.

Include a test case that should detect the problem if we introduce
a similar bug again.

Fixes: c7a88b52f62b ("i386: Add new model of Cascadelake-Server")
Fixes: 8a11c62da914 ("i386: Add new CPU model Icelake-{Server,Client}")

Backports commit bb4928c7cafe50ab2137a0034e350ef1bfa044d9 from qemu
2019-03-22 09:46:44 -04:00
..
arch_memory_mapping.c target/i386: enable A20 automatically in system management mode 2018-03-03 14:33:09 -05:00
bpt_helper.c target/i386/bpt_helper: Perform comparison pass with qemu 2018-03-12 13:28:50 -04:00
cc_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
cc_helper_template.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
cpu-qom.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
cpu.c i386: Disable OSPKE on CPU model definitions 2019-03-22 09:46:44 -04:00
cpu.h i386: extended the cpuid_level when Intel PT is enabled 2019-03-11 16:40:23 -04:00
excp_helper.c target/i386: rename HF_SVMI_MASK to HF_GUEST_MASK 2018-10-04 04:24:39 -04:00
fpu_helper.c target/i386/fpu_helper: Perform comparison pass against qemu 2018-03-12 13:15:51 -04:00
helper.c icount: fix cpu_restore_state_from_tb for non-tb-exit cases 2018-04-11 20:05:40 -04:00
helper.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
int_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
Makefile.objs target/i386: add the CONFIG_TCG into Makefiles 2018-03-03 21:57:22 -05:00
mem_helper.c target/i386: Convert to HAVE_CMPXCHG128 2018-10-23 15:21:03 -04:00
misc_helper.c i386: implement MSR_SMI_COUNT for TCG 2018-08-02 21:27:08 -04:00
mpx_helper.c target/i386: move cpu_sync_bndcs_hflags() function 2018-03-03 21:41:26 -05:00
ops_sse.h target/i386: fix phminposuw in-place operation 2018-03-04 23:59:26 -05:00
ops_sse_header.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
seg_helper.c target/i386: Clear RF on SYSCALL instruction 2018-11-11 08:41:09 -05:00
shift_helper_template.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
smm_helper.c i386: implement MSR_SMI_COUNT for TCG 2018-08-02 21:27:08 -04:00
svm.h target-i386: Add NPT support 2018-07-03 19:52:56 -04:00
svm_helper.c target/i386: rename HF_SVMI_MASK to HF_GUEST_MASK 2018-10-04 04:24:39 -04:00
TODO Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
topology.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
translate.c target/i386: Generate #UD when applying LOCK to a register destination 2018-12-01 20:13:02 -05:00
unicorn.c [Fix] Add feature support for CMPXCHG16B instruction. (#983) 2019-02-28 17:03:08 -05:00
unicorn.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00