Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1709854

[PATCH 1/3] KVM: x86: simplify ept_misconfig

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject [PATCH 1/3] KVM: x86: simplify ept_misconfig
Date 2017-08-11 19:00 +0200
Message-ID <udlrZ-5XG-27@gated-at.bofh.it> (permalink)
References <udlrY-5XG-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Calling handle_mmio_page_fault() has been unnecessary since commit
e9ee956e311d ("KVM: x86: MMU: Move handle_mmio_page_fault() call to
kvm_mmu_page_fault()", 2016-02-22)

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 arch/x86/kvm/vmx.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index df8d2f127508..45fb0ea78ee8 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -6410,17 +6410,10 @@ static int handle_ept_misconfig(struct kvm_vcpu *vcpu)
 		return kvm_skip_emulated_instruction(vcpu);
 	}
 
-	ret = handle_mmio_page_fault(vcpu, gpa, true);
 	vcpu->arch.gpa_available = true;
-	if (likely(ret == RET_MMIO_PF_EMULATE))
-		return x86_emulate_instruction(vcpu, gpa, 0, NULL, 0) ==
-					      EMULATE_DONE;
-
-	if (unlikely(ret == RET_MMIO_PF_INVALID))
-		return kvm_mmu_page_fault(vcpu, gpa, 0, NULL, 0);
-
-	if (unlikely(ret == RET_MMIO_PF_RETRY))
-		return 1;
+	ret = kvm_mmu_page_fault(vcpu, gpa, PFERR_RSVD_MASK, NULL, 0);
+	if (ret >= 0)
+		return ret;
 
 	/* It is the real ept misconfig */
 	WARN_ON(1);
-- 
1.8.3.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] KVM: MMU: pending MMU and nEPT patches Paolo Bonzini <pbonzini@redhat.com> - 2017-08-11 19:00 +0200
  [PATCH 1/3] KVM: x86: simplify ept_misconfig Paolo Bonzini <pbonzini@redhat.com> - 2017-08-11 19:00 +0200
    Re: [PATCH 1/3] KVM: x86: simplify ept_misconfig Wanpeng Li <kernellwp@gmail.com> - 2017-08-13 01:40 +0200
    Re: [PATCH 1/3] KVM: x86: simplify ept_misconfig David Hildenbrand <david@redhat.com> - 2017-08-17 09:50 +0200
    Re: [PATCH 1/3] KVM: x86: simplify ept_misconfig David Hildenbrand <david@redhat.com> - 2017-08-17 10:10 +0200
  [PATCH 3/3] KVM: x86: fix use of L1 MMIO areas in nested guests Paolo Bonzini <pbonzini@redhat.com> - 2017-08-11 19:00 +0200
    Re: [PATCH 3/3] KVM: x86: fix use of L1 MMIO areas in nested guests Wanpeng Li <kernellwp@gmail.com> - 2017-08-13 02:20 +0200
    Re: [PATCH 3/3] KVM: x86: fix use of L1 MMIO areas in nested guests David Hildenbrand <david@redhat.com> - 2017-08-17 10:20 +0200

csiph-web