Re: Re: [RFC] hw/nvme: Use irqfd to send interrupts

2022-08-09 Thread
> The driver will create the cq with an allocated vector, but it's not activated > until after the driver wires it up to a handler. I think that's what you're > observing with the incomplete MSIx table entry on creation. Also, I'm wondering if this is inconsistent with the NVMe spec. In Section 7

Re: Re: [RFC] hw/nvme: Use irqfd to send interrupts

2022-08-09 Thread
> The driver will create the cq with an allocated vector, but it's not activated > until after the driver wires it up to a handler. I think that's what you're > observing with the incomplete MSIx table entry on creation. Agreed. I digged through pci_request_irq()'s call chain and found pci_write

Re: Re: [RFC] hw/nvme: Use irqfd to send interrupts

2022-08-09 Thread
> In this version I left irqfd initialization to the first assertion of an > irq. But I think it is better to initialize irqfd at cq creation time so we > won’t bother checking it at each irq assertion. However if I put these code > in nvme_init_cq(), irqfd does not work properly. After adding some