OSDN Git Service

kvm: vmx: Raise #UD on unsupported RDRAND
authorJim Mattson <jmattson@google.com>
Wed, 23 Aug 2017 23:32:04 +0000 (16:32 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Aug 2017 13:35:37 +0000 (15:35 +0200)
commit45ec368c9addbbf3fb25fc33d3f22f838ec91714
treeca48d9f27cbd06a07fa0ddc0527a08bc95d60b42
parent80154d77c922d0f9bb1e4d115ff760c066c12d8f
kvm: vmx: Raise #UD on unsupported RDRAND

A guest may not be configured to support RDRAND, even when the host
does. If the guest does not support RDRAND, intercept the instruction
and synthesize #UD. Also clear the "allowed-1" bit for RDRAND exiting
in the IA32_VMX_PROCBASED_CTLS2 MSR.

Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c