Re: [PATCH 1/2] KVM: Fix race between nmi injection and enabling nmi window

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

 



On 02/03/2011 05:11 PM, Jan Kiszka wrote:
On 2011-02-03 16:02, Avi Kivity wrote:
>  The interrupt injection logic looks something like
>
>    if an nmi is pending, and nmi injection allowed
>      inject nmi
>    if an nmi is pending
>      request exit on nmi window
>
>  the problem is that "nmi is pending" can be set asynchronously by
>  the PIT; if it happens to fire between the two if statements, we
>  will request an nmi window even though nmi injection is allowed.  On
>  SVM, this has disasterous results, since it causes eflags.TF to be
>  set in random guest code.

Good point. Fortunately never seen on production machines so far here
(we have very moderate NMI rates).

I've never seen it either, except with ftrace enabled. I wonder what the connection is.

>
>  The fix is simple; make nmi_pending asynchronous using the standard

You mean synchronous, no?


Yes.

>  vcpu->requests mechanism; this ensures the code above is completely
>  synchronous wrt nmi_pending.
>

--
error compiling committee.c: too many arguments to function

--
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