]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: svm: Intercept RDPRU
authorJim Mattson <jmattson@google.com>
Thu, 19 Sep 2019 22:59:17 +0000 (15:59 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 24 Sep 2019 14:15:36 +0000 (16:15 +0200)
commit37c032996aa0c0d95260be4c1fde5522729c52ef
treecb5d969265a447aee40b5b7756b084127889e945
parenta84dfe726b0ea41561c1f77e3f4bf50f92870e56
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>
arch/x86/include/asm/svm.h
arch/x86/include/uapi/asm/svm.h
arch/x86/kvm/svm.c