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


Groups > linux.kernel > #1719133

[PATCH v4 1/4] KVM: VMX: use kvm_event_needs_reinjection

From Wanpeng Li <kernellwp@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v4 1/4] KVM: VMX: use kvm_event_needs_reinjection
Date 2017-08-24 12:40 +0200
Message-ID <uhXIl-5es-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Wanpeng Li <wanpeng.li@hotmail.com>

Use kvm_event_needs_reinjection() encapsulation.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
---
 arch/x86/kvm/vmx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index dd710d3..c5f43ab 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -10988,9 +10988,7 @@ static int vmx_check_nested_events(struct kvm_vcpu *vcpu, bool external_intr)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
 
-	if (vcpu->arch.exception.pending ||
-		vcpu->arch.nmi_injected ||
-		vcpu->arch.interrupt.pending)
+	if (kvm_event_needs_reinjection(vcpu))
 		return -EBUSY;
 
 	if (nested_cpu_has_preemption_timer(get_vmcs12(vcpu)) &&
-- 
2.7.4

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


Thread

[PATCH v4 1/4] KVM: VMX: use kvm_event_needs_reinjection Wanpeng Li <kernellwp@gmail.com> - 2017-08-24 12:40 +0200
  [PATCH v4 3/4] KVM: VMX: Move the nested_vmx_inject_exception_vmexit call from nested_vmx_check_exception to vmx_queue_exception Wanpeng Li <kernellwp@gmail.com> - 2017-08-24 12:40 +0200
  [PATCH v4 4/4] KVM: nVMX: Fix trying to cancel vmlauch/vmresume Wanpeng Li <kernellwp@gmail.com> - 2017-08-24 12:40 +0200
  [PATCH v4 2/4] KVM: X86: Fix loss of exception which has not yet injected Wanpeng Li <kernellwp@gmail.com> - 2017-08-24 12:40 +0200
    Re: [PATCH v4 2/4] KVM: X86: Fix loss of exception which has not yet  injected Paolo Bonzini <pbonzini@redhat.com> - 2017-08-24 13:40 +0200

csiph-web