]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: nSVM: optimize svm_set_x2apic_msr_interception
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 19 May 2022 10:27:09 +0000 (05:27 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Jun 2022 16:52:59 +0000 (12:52 -0400)
commit39f27d2a7fff55f5d93fdda79f522913bb0a4e41
tree378bd38b13e296702534c70d65a9c14ac2acb23f
parent748ca3ef7d36b233f681494c35a79bb9670e8e0c
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>
arch/x86/kvm/svm/avic.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h