KVM: VMX: Restore host's MSR_IA32_RTIT_CTL when it's not zero
authorXiaoyao Li <xiaoyao.li@intel.com>
Fri, 27 Aug 2021 07:02:43 +0000 (15:02 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Oct 2021 09:19:26 +0000 (05:19 -0400)
commit2e6e0d683b77b1e08e5e03146ca3b8e033492666
tree70f543e2d0974c14b4680dfcb4196fbd764df780
parent2839180ce5bb27ad5e1f092fdafede284a925e5c
KVM: VMX: Restore host's MSR_IA32_RTIT_CTL when it's not zero

A minor optimization to WRMSR MSR_IA32_RTIT_CTL when necessary.

Opportunistically refine the comment to call out that KVM requires
VM_EXIT_CLEAR_IA32_RTIT_CTL to expose PT to the guest.

Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Message-Id: <20210827070249.924633-2-xiaoyao.li@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c