> From: David Woodhouse <dwmw2@xxxxxxxxxxxxx> > Sent: Tuesday, November 3, 2020 12:03 AM > > +/* > > + * If ms_hyperv_msi_ext_dest_id() returns true, > > hyperv_prepare_irq_remapping() > > + * returns -ENODEV and the Hyper-V IOMMU driver is not used; instead, the > > + * generic support of the 15-bit APIC ID is used: see > > __irq_msi_compose_msg(). > > + * > > + * Note: For a VM on Hyper-V, no emulated legacy device supports PCI > MSI/MSI-X, > > + * and PCI MSI/MSI-X only come from the assigned physical PCIe device, and > the > > + * PCI MSI/MSI-X interrupts are handled by the pci-hyperv driver. Here > despite > > + * the word "msi" in the name "msi_ext_dest_id", actually the callback only > > + * affects how IOAPIC interrupts are routed. > > + */ > > I named it like that on purpose to make the point that the I/OAPIC is > just a device for turning line interrupts into MSIs. Some VMMs, just > like real hardware, really do implement their I/OAPIC emulation that > way. It makes a lot of sense to do so if you support interrupt > remapping. I totally agree. > FWIW I might have phrased your last paragraph in that comment as > > Note: for a VM on Hyper-V, the I/OAPIC is the only device which > (logically) generates MSIs directly to the system APIC irq domain. > There is no HPET, and PCI MSI/MSI-X interrupts are remapped by the > pci-hyperv host bridge. I agree. This version is much better. > But don't bother to change it; I think I've made my point quite well > enough with https://git.kernel.org/tip/tip/c/5d5a97133 :) > > -- > dwmw2 Hi David, This patch has been in the x86/apic branch (with a line missing in the commit log). If possible, I hope tglx can help make this change you suggested, and add the missing line in the commit log. :-) Thanks, -- Dexuan