All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Question about the vfio device interrupt
@ 2019-05-15 10:01 Li Qiang
  2019-05-15 10:16 ` Auger Eric
  0 siblings, 1 reply; 7+ messages in thread
From: Li Qiang @ 2019-05-15 10:01 UTC (permalink / raw)
  To: Paolo Bonzini, alex.williamson, Qemu Developers

Hello Paolo, Alex and all,

In vfio_intx_enable_kvm(qemu) I see we associate a resamplefd with the
umask function(vfio_pci_intx_unmask_handler in linux).

    irq_set = g_malloc0(argsz);
    irq_set->argsz = argsz;
    irq_set->flags = VFIO_IRQ_SET_DATA_EVENTFD | VFIO_IRQ_SET_ACTION_UNMASK;
    irq_set->index = VFIO_PCI_INTX_IRQ_INDEX;
    irq_set->start = 0;
    irq_set->count = 1;
    pfd = (int32_t *)&irq_set->data;

    *pfd = irqfd.resamplefd;

    ret = ioctl(vdev->vbasedev.fd, VFIO_DEVICE_SET_IRQS, irq_set);

I know this resamplefd is triggered when the interrupt controller receives
an EOI and
then we unmask and re-enabled the VFIO devices' interrupt.

So I think there  there must be a mask process(so we unmask it later), I
mean there must a
call of function vfio_pci_set_intx_mask(in linux).

What I can't understand is when this process(mask VFIO devices' interrupt)
occurs?
I only find a place(vfio_basic_config_write) calls vfio_pci_intx_mask.
I think when the guest process the interrupt it may mask this
interrupt(finally call vfio_pci_set_intx_mask), but I can't find the code
path related with vfio_basic_config_write.


Any hints?

Thanks,
Li Qiang

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-15 15:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-15 10:01 [Qemu-devel] Question about the vfio device interrupt Li Qiang
2019-05-15 10:16 ` Auger Eric
2019-05-15 10:22   ` Li Qiang
2019-05-15 13:46     ` Alex Williamson
2019-05-15 14:27       ` Maxim Levitsky
2019-05-15 14:53         ` Alex Williamson
2019-05-15 15:01           ` Li Qiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.