Module Name: src Committed By: bouyer Date: Mon May 23 15:03:05 UTC 2022
Modified Files: src/sys/arch/x86/pci: msipic.c msipic.h pci_machdep.c pci_msi_machdep.c src/sys/arch/xen/include: intr.h pci_machdep.h src/sys/arch/xen/x86: pintr.c Log Message: Work in progress on MSI/MSI-X on Xen (MSI works on my hardware, more work needed for MSI-X): - Xen silently rejects 32 bits writes to MSI configuration registers (especially when setting PCI_MSI_CTL_MSI_ENABLE/PCI_MSIX_CTL_ENABLE), it expects 16 bits writes. So introduce a pci_conf_write16(), only available on XENPV (and working only for mode 1 without PCI_OVERRIDE_CONF_WRITE) and use it to enable MSI or MSI-X on XENPV. - for multi-MSI vectors, Xen allocates all of them in a single hypercall, so it's not convenient to do it at intr_establish() time. So do it at alloc() time and register the pirqs in the msipic structure. xen_pic_to_gsi() now just returns the values cached in the msipic. As a bonus, if the PHYSDEVOP_map_pirq hypercall fails we can fail the alloc() and we don't need the xen_pci_msi*_probe() hacks. options NO_PCI_MSI_MSIX still on by default for XEN3_DOM0. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/x86/pci/msipic.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/pci/msipic.h cvs rdiff -u -r1.89 -r1.90 src/sys/arch/x86/pci/pci_machdep.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x86/pci/pci_msi_machdep.c cvs rdiff -u -r1.58 -r1.59 src/sys/arch/xen/include/intr.h cvs rdiff -u -r1.20 -r1.21 src/sys/arch/xen/include/pci_machdep.h cvs rdiff -u -r1.20 -r1.21 src/sys/arch/xen/x86/pintr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.