Re: [PATCH v3 06/14] iommufd: Add IOMMUFD_OBJ_VIRQ and IOMMUFD_CMD_VIRQ_ALLOC

2025-01-02 Thread Nicolin Chen
On Thu, Jan 02, 2025 at 04:45:07PM -0400, Jason Gunthorpe wrote: > On Tue, Dec 17, 2024 at 09:00:19PM -0800, Nicolin Chen wrote: > > Allow a vIOMMU object to allocate vIRQ Event Queues, with a condition that > > each vIOMMU can only have one single vIRQ event queue per type. > > I suggest you shou

Re: [PATCH v3 06/14] iommufd: Add IOMMUFD_OBJ_VIRQ and IOMMUFD_CMD_VIRQ_ALLOC

2025-01-02 Thread Jason Gunthorpe
On Tue, Dec 17, 2024 at 09:00:19PM -0800, Nicolin Chen wrote: > +/* An iommufd_virq_header packs a vIOMMU interrupt in an iommufd_virq queue > */ > +struct iommufd_virq_header { > + struct list_head node; > + ssize_t irq_len; > + void *irq_data; > +}; Based on how it is used in iommuf

Re: [PATCH v3 07/14] iommufd/viommu: Add iommufd_viommu_get_vdev_id helper

2025-01-02 Thread Jason Gunthorpe
On Mon, Dec 23, 2024 at 10:28:32AM +0800, Baolu Lu wrote: > However, considering page fault scenarios, which are self-contained but > linked to a hardware page table (hwpt), introduces ambiguity. Hwpt can > be created with or without a vIOMMU. This raises the question: should > the page fault mess

Re: [PATCH v3 07/14] iommufd/viommu: Add iommufd_viommu_get_vdev_id helper

2025-01-02 Thread Baolu Lu
On 1/3/25 04:29, Jason Gunthorpe wrote: On Mon, Dec 23, 2024 at 10:28:32AM +0800, Baolu Lu wrote: However, considering page fault scenarios, which are self-contained but linked to a hardware page table (hwpt), introduces ambiguity. Hwpt can be created with or without a vIOMMU. This raises the q

Re: [PATCH v3 06/14] iommufd: Add IOMMUFD_OBJ_VIRQ and IOMMUFD_CMD_VIRQ_ALLOC

2025-01-02 Thread Jason Gunthorpe
On Tue, Dec 17, 2024 at 09:00:19PM -0800, Nicolin Chen wrote: > Allow a vIOMMU object to allocate vIRQ Event Queues, with a condition that > each vIOMMU can only have one single vIRQ event queue per type. I suggest you should tend to use the eventq as the primary naming not vIRQ, I think that will

Re: [PATCH v3 06/14] iommufd: Add IOMMUFD_OBJ_VIRQ and IOMMUFD_CMD_VIRQ_ALLOC

2025-01-02 Thread Nicolin Chen
On Thu, Jan 02, 2025 at 04:52:46PM -0400, Jason Gunthorpe wrote: > On Tue, Dec 17, 2024 at 09:00:19PM -0800, Nicolin Chen wrote: > > +/* An iommufd_virq_header packs a vIOMMU interrupt in an iommufd_virq > > queue */ > > +struct iommufd_virq_header { > > + struct list_head node; > > + ssize_t