Re: [PATCH v2] KVM: x86: Inject pending interrupt even if pending nmi exist

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

 



2016-03-23 14:18+0100, Paolo Bonzini:
> On 23/03/2016 06:08, Yuki Shibuya wrote:
>> +		/* If nmi pending > 0 and injectable interrupts exist,
>> +		 * nmi pending counter is cleared to prevent skipping
>> +		 * injectable pending interrupts.
>> +		 */
>> +		if (vcpu->arch.nmi_pending && kvm_cpu_has_injectable_intr(vcpu)
>> +					&& kvm_x86_ops->interrupt_allowed(vcpu))
>> +			vcpu->arch.nmi_pending = 0;
> 
> I am not sure I understand this.  Why is it safe to drop nmi_pending?

NMIs are latched (queue length 1) and therefore cannot be pending after
an injection.  I think we want to do it unconditionally.

> Can we instead do something like this in vcpu_enter_guest?

(We should, even if it doesn't fix the bug.  Maskable interrupts can be
 injected while NMIs are blocked.)

What the hell is 2.6.32 doing, though?
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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