qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3] KVM: x86: Fix nmi injection failure when vcp


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3] KVM: x86: Fix nmi injection failure when vcpu got blocked
Date: Tue, 30 May 2017 17:15:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0


On 30/05/2017 15:36, Radim Krčmář wrote:
>> -    if (atomic_read(&vcpu->arch.nmi_queued))
>> +    if (kvm_test_request(KVM_REQ_NMI, vcpu) ||
>> +        (vcpu->arch.nmi_pending &&
> I think the logic should be
> 
>       if ((kvm_test_request(KVM_REQ_NMI, vcpu) || vcpu->arch.nmi_pending) &&
>                       kvm_x86_ops->nmi_allowed(vcpu))
> 
> because there is no reason to resume the VCPU if we cannot inject.

KVM_REQ_NMI would be processed anyway, and would clear nmi_queued.  Of
course, it would very soon go back to sleep.  Even before Yanying's
patch, nmi_queued > 0 would have woken up the vCPU in this manner.  So
I'm applying the patch.  Thanks!

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]