diff options
author | Jim Mattson <jmattson@google.com> | 2019-09-20 01:59:17 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-09-24 17:15:36 +0300 |
commit | 0cb8410b90e78948984f35f2c4d50c2c0b7ee675 (patch) | |
tree | cb5d969265a447aee40b5b7756b084127889e945 /arch/x86/include/asm/svm.h | |
parent | a06dcd625d6181747fac7f4c140b5a4c397a778c (diff) | |
download | linux-0cb8410b90e78948984f35f2c4d50c2c0b7ee675.tar.xz |
kvm: svm: Intercept RDPRU
The RDPRU instruction gives the guest read access to the IA32_APERF
MSR and the IA32_MPERF MSR. According to volume 3 of the APM, "When
virtualization is enabled, this instruction can be intercepted by the
Hypervisor. The intercept bit is at VMCB byte offset 10h, bit 14."
Since we don't enumerate the instruction in KVM_SUPPORTED_CPUID,
intercept it and synthesize #UD.
Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Drew Schmitt <dasch@google.com>
Reviewed-by: Jacob Xu <jacobhxu@google.com>
Reviewed-by: Peter Shier <pshier@google.com>
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/svm.h')
-rw-r--r-- | arch/x86/include/asm/svm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index dec9c1e84c78..6ece8561ba66 100644 --- a/arch/x86/include/asm/svm.h +++ b/arch/x86/include/asm/svm.h @@ -52,6 +52,7 @@ enum { INTERCEPT_MWAIT, INTERCEPT_MWAIT_COND, INTERCEPT_XSETBV, + INTERCEPT_RDPRU, }; |