[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Question about the vfio device interrupt
From: |
Li Qiang |
Subject: |
[Qemu-devel] Question about the vfio device interrupt |
Date: |
Wed, 15 May 2019 18:01:22 +0800 |
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
- [Qemu-devel] Question about the vfio device interrupt,
Li Qiang <=