On Mon, Oct 25, 2021 at 08:44:52AM +0100, David Woodhouse wrote: > On Sun, 2021-10-24 at 21:25 -0400, Jason Andryuk wrote: > > commit fcacdfbef5a1 ("PCI/MSI: Provide a new set of mask and unmask > > functions") introduce functions pci_msi_update_mask() and > > pci_msix_write_vector_ctrl() that is missing checks for > > pci_msi_ignore_mask that exists in commit 446a98b19fd6 ("PCI/MSI: Use > > new mask/unmask functions"). The checks are in place at the high level > > __pci_msi_mask_desc()/__pci_msi_unmask_desc(), but some functions call > > directly to the helpers. > > > > Push the pci_msi_ignore_mask check down to the functions that make > > the actual writes. This keeps the logic local to the writes that need > > to be bypassed. > > > > With Xen PV, the hypervisor is responsible for masking and unmasking the > > interrupts, which pci_msi_ignore_mask is used to indicate. > > This isn't just for Xen PV; Xen HVM guests let Xen unmask the MSI for > them too. It's kind of optional for HVM guests, as it depends on XENFEAT_hvm_pirqs, which sadly gets unconditionally set for HVM guests, thus dropping any benefits from having hardware assisted APIC virtualization or posted interrupts support. AFAICT pci_msi_ignore_mask is not (correctly) set for HVM guest when MSI interrupts are routed over event channels. Regards, Roger.