KVM: VMX: Directly query Intel PT mode when refreshing PMUs
Use vmx_pt_mode_is_host_guest() in intel_pmu_refresh() instead of bouncing through kvm_x86_ops->pt_supported, and remove ->pt_supported() as the PMU code was the last remaining user. Opportunistically clean up the wording of a comment that referenced kvm_x86_ops->pt_supported(). No functional change intended. Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:

committed by
Paolo Bonzini

parent
7b874c26a6
commit
a1bead2aba
@@ -2820,10 +2820,9 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
!guest_cpuid_has(vcpu, X86_FEATURE_XSAVES))
|
||||
return 1;
|
||||
/*
|
||||
* We do support PT if kvm_x86_ops->pt_supported(), but we do
|
||||
* not support IA32_XSS[bit 8]. Guests will have to use
|
||||
* RDMSR/WRMSR rather than XSAVES/XRSTORS to save/restore PT
|
||||
* MSRs.
|
||||
* KVM supports exposing PT to the guest, but does not support
|
||||
* IA32_XSS[bit 8]. Guests have to use RDMSR/WRMSR rather than
|
||||
* XSAVES/XRSTORS to save/restore PT MSRs.
|
||||
*/
|
||||
if (data != 0)
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user