summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/svm/svm.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-05-04 10:17:21 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2021-05-07 06:06:15 -0400
commit85d0011264da24be08ae907d7f29983a597ca9b1 (patch)
tree337769183d8aad311c142ecef9eee3bbecb36225 /arch/x86/kvm/svm/svm.c
parent8aec21c04caa2000f91cf8822ae0811e4b0c3971 (diff)
downloadlwn-85d0011264da24be08ae907d7f29983a597ca9b1.tar.gz
lwn-85d0011264da24be08ae907d7f29983a597ca9b1.zip
KVM: x86: Emulate RDPID only if RDTSCP is supported
Do not advertise emulation support for RDPID if RDTSCP is unsupported. RDPID emulation subtly relies on MSR_TSC_AUX to exist in hardware, as both vmx_get_msr() and svm_get_msr() will return an error if the MSR is unsupported, i.e. ctxt->ops->get_msr() will fail and the emulator will inject a #UD. Note, RDPID emulation also relies on RDTSCP being enabled in the guest, but this is a KVM bug and will eventually be fixed. Fixes: fb6d4d340e05 ("KVM: x86: emulate RDPID") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20210504171734.1434054-3-seanjc@google.com> Reviewed-by: Jim Mattson <jmattson@google.com> Reviewed-by: Reiji Watanabe <reijiw@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm/svm.c')
0 files changed, 0 insertions, 0 deletions