Re: [RFC PATCH v2] irqchip/gic-v3-its: enable dynamic MSI-X allocation
From: Thomas Gleixner
Date: Sat Jul 11 2026 - 16:37:39 EST
On Sat, Jul 11 2026 at 10:20, Jinqian Yang wrote:
> On ARM64 platforms with GICv3 ITS, VFIO PCI passthrough currently
> cannot dynamically allocate MSI-X vectors after MSI-X has been
> enabled. When QEMU needs to extend the vector range, it must
> disable MSI-X, free all interrupts, then re-enable with a larger
> allocation. This creates an interrupt loss window for already-active
> vectors.
>
> Consider HNS3 with RoCE: NIC and RDMA share one PCI device and
> ITS DeviceID, with MSI-X vectors partitioned as NIC (lower range)
> then RoCE (starting at base_vector = num_nic_msi). In VFIO
> passthrough, loading hns_roce after hns3 forces QEMU to tear down
> all interrupts before re-allocating the larger range. During this
> process, NIC interrupts may be lost. Testing confirmed that this
> occasionally occurs, causing the network port reset to fail. This
> appears to be unavoidable, as it's a standard approach adopted by
> all network card vendors.
>
> On Hisilicon HIP09 (ARM64, GICv3/GICv4.1) with latest upstream kernel
> and QEMU 8.2. VFIO passthrough of HNS3 NIC to VM: load both hns3 and
> hns_roce_hw_v2 drivers and trigger FLR, this bug will occur occasionally.
> After enabling dynamic MSIX allocation, this bug no longer occurs.
>
> Signed-off-by: Jinqian Yang <yangjinqian1@xxxxxxxxxx>
> ---
> Changes in v2:
> - Updated the commit message to add test information.
Well, it contains test information, but it does not tell me _WHY_ this
is safe to do, i.e. what makes gic-v3-its eligible to set this flag?