Re: [RFC PATCH 4/5] APIC/IOAPIC EOI callback

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

 



On Sun, 2010-07-11 at 23:12 +0300, Michael S. Tsirkin wrote:
> On Sun, Jul 11, 2010 at 02:03:34PM -0600, Alex Williamson wrote:
> > > What about threaded interrupts?
> 
> Just to make the point, imagine a nested virt situation
> which uses current kvm device assignment in guest.
> Look at the interrupt handler we have there.

Is the problem you're worried about this:

	guest masks qemu ioapic rte
	device interrupt
	host vfio DisINTx+
	qemu vfio calls qemu_set_irq
	...

In that case, the qemu ioapic irr bit is only toggled by qemu_set_irq
for level triggered interrupts, so the interrupt will be asserted in the
guest when it gets unmasked and we'll get the eoi.

I can't figure out where your other scenario can leave the DisINTx+:

	device asserts interrupt
	a) DisINTx+ via host vfio
	guest disables interrupt
	b) DisINTx+ via guest, already set
	eoi
	c) DisINTx- via qemu vfio
	driver clears interrupt        
	guest enables interrupt
	d) DisINTx- via guest
	device asserts interrupt

So between c) & d) we're potentially getting more interrupts than we
want, but I can't see anywhere that we drop DisINTx.  If you have a
scenario, let me know.  Thanks,

Alex



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