hvf: Enable RDTSCP support
commitd8cf2c29cc1077cd8f8ab0580b285bff92f09d1c
authorCameron Esfahani <dirty@apple.com>
Mon, 1 Nov 2021 05:48:36 +0000 (31 22:48 -0700)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 12 Jul 2022 22:05:39 +0000 (13 00:05 +0200)
tree2474afd377b3a0a716e94fd82dc9489c16fb9ef8
parent8e3d85d36b77f11ad7bded3a2d48c1f0cc334f82
hvf: Enable RDTSCP support

Pass through RDPID and RDTSCP support in CPUID if host supports it.
Correctly detect if CPU_BASED_TSC_OFFSET and CPU_BASED2_RDTSCP would
be supported in primary and secondary processor-based VM-execution
controls.  Enable RDTSCP in secondary processor controls if RDTSCP
support is indicated in CPUID.

Signed-off-by: Cameron Esfahani <dirty@apple.com>
Message-Id: <20220214185605.28087-7-f4bug@amsat.org>
Tested-by: Silvio Moioli <moio@suse.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1011
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
target/i386/hvf/hvf.c
target/i386/hvf/vmcs.h
target/i386/hvf/x86_cpuid.c