
mainline inclusion from mainline-v5.11-rc1 commit 2e730cb56b2cd1626fecaf23ef1537fb24721ef2 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IC9GHN Reference: https://lore.kernel.org/all/20201024213535.443185-1-dwmw2@infradead.org/ -------------------------------- Fix the conditions for enabling x2apic on guests without interrupt remapping, and support 15-bit Extended Destination ID to allow 32768 CPUs without IR on hypervisors that support it. Make the I/OAPIC code generate its RTE directly from the MSI message created by the parent irqchip, and fix up a bunch of magic mask/shift macros to use bitfields for MSI messages and I/OAPIC RTEs while we're at it. v3: add new bugfix commits. v2: adapt ioapic_sync_hardware_data. David Woodhouse (17): x86/hpet: Move MSI support into hpet.c x86/ioapic: Generate RTE directly from parent irqchip's MSI message genirq/irqdomain: Implement get_name() method on irqchip fwnodes x86/apic: Add select() method on vector irqdomain iommu/amd: Implement select() method on remapping irqdomain iommu/vt-d: Implement select() method on remapping irqdomain iommu/hyper-v: Implement select() method on remapping irqdomain x86/hpet: Use irq_find_matching_fwspec() to find remapping irqdomain x86/ioapic: Use irq_find_matching_fwspec() to find remapping irqdomain x86: Kill all traces of irq_remapping_get_irq_domain() iommu/vt-d: Simplify intel_irq_remapping_select() x86/ioapic: Handle Extended Destination ID field in RTE x86/apic: Support 15 bits of APIC ID in MSI where available iommu/hyper-v: Disable IRQ pseudo-remapping if 15 bit APIC IDs are available x86/kvm: Enable 15-bit extension when KVM_FEATURE_MSI_EXT_DEST_ID detected x86/ioapic: Use I/O-APIC ID for finding irqdomain, not index iommu/amd: Stop irq_remapping_select() matching when remapping is disabled Dexuan Cui (1): iommu/hyper-v: Remove I/O-APIC ID check from hyperv_irq_remapping_select() Thomas Gleixner (8): x86/devicetree: Fix the ioapic interrupt type table PCI: vmd: Use msi_msg shadow structs x86/kvm: Use msi_msg shadow structs x86/pci/xen: Use msi_msg shadow structs x86/msi: Remove msidef.h x86/io_apic: Cleanup trigger/polarity helpers x86/ioapic: Cleanup IO/APIC route entry structs x86/ioapic: Correct the PCI/ISA trigger type selection arch/x86/include/asm/hpet.h | 11 - arch/x86/include/asm/hw_irq.h | 13 +- arch/x86/include/asm/io_apic.h | 79 ++--- arch/x86/include/asm/irq_remapping.h | 9 - arch/x86/include/asm/irqdomain.h | 3 + arch/x86/include/asm/msi.h | 3 +- arch/x86/include/asm/msidef.h | 57 --- arch/x86/include/asm/x86_init.h | 2 + arch/x86/kernel/apic/apic.c | 26 +- arch/x86/kernel/apic/io_apic.c | 508 ++++++++++++++------------- arch/x86/kernel/apic/msi.c | 111 ------ arch/x86/kernel/apic/vector.c | 43 +++ arch/x86/kernel/devicetree.c | 30 +- arch/x86/kernel/hpet.c | 122 ++++++- arch/x86/kernel/kvm.c | 6 + arch/x86/kernel/x86_init.c | 1 + arch/x86/kvm/irq_comm.c | 31 +- arch/x86/pci/intel_mid_pci.c | 8 +- arch/x86/pci/xen.c | 26 +- drivers/iommu/amd/iommu.c | 70 ++-- drivers/iommu/hyperv-iommu.c | 44 +-- drivers/iommu/intel/irq_remapping.c | 76 ++-- drivers/iommu/irq_remapping.c | 14 - drivers/iommu/irq_remapping.h | 3 - drivers/pci/controller/vmd.c | 9 +- kernel/irq/irqdomain.c | 11 +- 26 files changed, 606 insertions(+), 710 deletions(-) delete mode 100644 arch/x86/include/asm/msidef.h -- 2.33.0