Re: [PATCH v3] KVM: x86: Fix nmi injection failure when vcpu got blocked

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

 




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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux