OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca31e30
)
hvf: Gate RDTSCP on CPU_BASED2_RDTSCP, not just CPU_BASED_TSC_OFFSET
author
Jessica Clarke
<jrtc27@jrtc27.com>
Mon, 16 Nov 2020 20:03:19 +0000
(20:03 +0000)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Wed, 18 Nov 2020 08:31:46 +0000
(09:31 +0100)
Buglink:
https://bugs.launchpad.net/qemu/+bug/1894836
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Message-Id: <
20201116200319
.28138-1-jrtc27@jrtc27.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/hvf/x86_cpuid.c
patch
|
blob
|
history
diff --git
a/target/i386/hvf/x86_cpuid.c
b/target/i386/hvf/x86_cpuid.c
index
ac731c2
..
a684291
100644
(file)
--- a/
target/i386/hvf/x86_cpuid.c
+++ b/
target/i386/hvf/x86_cpuid.c
@@
-122,6
+122,10
@@
uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx,
CPUID_PAT | CPUID_PSE36 | CPUID_EXT2_MMXEXT | CPUID_MMX |
CPUID_FXSR | CPUID_EXT2_FXSR | CPUID_EXT2_PDPE1GB | CPUID_EXT2_3DNOWEXT |
CPUID_EXT2_3DNOW | CPUID_EXT2_LM | CPUID_EXT2_RDTSCP | CPUID_EXT2_NX;
+ hv_vmx_read_capability(HV_VMX_CAP_PROCBASED2, &cap);
+ if (!(cap & CPU_BASED2_RDTSCP)) {
+ edx &= ~CPUID_EXT2_RDTSCP;
+ }
hv_vmx_read_capability(HV_VMX_CAP_PROCBASED, &cap);
if (!(cap & CPU_BASED_TSC_OFFSET)) {
edx &= ~CPUID_EXT2_RDTSCP;