Re: [PATCH v2 2/2] KVM: X86: Fix loss of exception which has not yet injected

2017-08-23 Thread Wanpeng Li
2017-08-23 20:27 GMT+08:00 Paolo Bonzini : > On 23/08/2017 12:23, Wanpeng Li wrote: >> @@ -6341,7 +6345,8 @@ static int inject_pending_event(struct kvm_vcpu *vcpu, >> bool req_int_win) >> int r; >> >> /* try to reinject previous events if any */ >> - if (vcpu->arch.exception.pendin

Re: [PATCH v2 2/2] KVM: X86: Fix loss of exception which has not yet injected

2017-08-23 Thread Paolo Bonzini
On 23/08/2017 12:23, Wanpeng Li wrote: > @@ -6341,7 +6345,8 @@ static int inject_pending_event(struct kvm_vcpu *vcpu, > bool req_int_win) > int r; > > /* try to reinject previous events if any */ > - if (vcpu->arch.exception.pending) { > + if (vcpu->arch.exception.pending ||

[PATCH v2 2/2] KVM: X86: Fix loss of exception which has not yet injected

2017-08-23 Thread Wanpeng Li
From: Wanpeng Li vmx_complete_interrupts() assumes that the exception is always injected, so it would be dropped by kvm_clear_exception_queue(). This patch separates exception.pending from exception.injected, exception.inject represents the exception is injected or the exception should be rein