KVM: SVM: Remove check if APICv enabled in SVM update_cr8_intercept() handler
diff mbox series

Message ID 20191111122621.93151-1-liran.alon@oracle.com
State New
Headers show
Series
  • KVM: SVM: Remove check if APICv enabled in SVM update_cr8_intercept() handler
Related show

Commit Message

Liran Alon Nov. 11, 2019, 12:26 p.m. UTC
This check is unnecessary as x86 update_cr8_intercept() which calls
this VMX/SVM specific callback already performs this check.

Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
---
 arch/x86/kvm/svm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jim Mattson Nov. 12, 2019, 11:08 p.m. UTC | #1
On Mon, Nov 11, 2019 at 4:26 AM Liran Alon <liran.alon@oracle.com> wrote:
>
> This check is unnecessary as x86 update_cr8_intercept() which calls
> this VMX/SVM specific callback already performs this check.
>
> Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
> Signed-off-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Jim Mattson <jmattson@google.com>

Patch
diff mbox series

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index c5673bda4b66..8d729da932cc 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -5092,8 +5092,7 @@  static void update_cr8_intercept(struct kvm_vcpu *vcpu, int tpr, int irr)
 {
 	struct vcpu_svm *svm = to_svm(vcpu);
 
-	if (svm_nested_virtualize_tpr(vcpu) ||
-	    kvm_vcpu_apicv_active(vcpu))
+	if (svm_nested_virtualize_tpr(vcpu))
 		return;
 
 	clr_cr_intercept(svm, INTERCEPT_CR8_WRITE);