summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/svm/svm.h
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2022-05-19 05:27:09 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-24 12:52:59 -0400
commit091abbf578f926e763adc0f577baeb7f405b4bdc (patch)
tree378bd38b13e296702534c70d65a9c14ac2acb23f /arch/x86/kvm/svm/svm.h
parent39b6b8c35cf37970e07e9081c0e7d1083930b2f7 (diff)
downloadlwn-091abbf578f926e763adc0f577baeb7f405b4bdc.tar.gz
lwn-091abbf578f926e763adc0f577baeb7f405b4bdc.zip
KVM: x86: nSVM: optimize svm_set_x2apic_msr_interception
- Avoid toggling the x2apic msr interception if it is already up to date. - Avoid touching L0 msr bitmap when AVIC is inhibited on entry to the guest mode, because in this case the guest usually uses its own msr bitmap. Later on VM exit, the 1st optimization will allow KVM to skip touching the L0 msr bitmap as well. Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20220519102709.24125-18-suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm/svm.h')
-rw-r--r--arch/x86/kvm/svm/svm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
index ccaae7d160cd..558ca1296d36 100644
--- a/arch/x86/kvm/svm/svm.h
+++ b/arch/x86/kvm/svm/svm.h
@@ -276,6 +276,8 @@ struct vcpu_svm {
struct vcpu_sev_es_state sev_es;
bool guest_state_loaded;
+
+ bool x2avic_msrs_intercepted;
};
struct svm_cpu_data {