• Jacob Pan's avatar
    iommu/vt-d: Enable posted mode for device MSIs · ed1e48ea
    Jacob Pan authored
    With posted MSI feature enabled on the CPU side, iommu interrupt
    remapping table entries (IRTEs) for device MSI/x can be allocated,
    activated, and programed in posted mode. This means that IRTEs are
    linked with their respective PIDs of the target CPU.
    
    Handlers for the posted MSI notification vector will de-multiplex
    device MSI handlers. CPU notifications are coalesced if interrupts
    arrive at a high frequency.
    
    Posted interrupts are only used for device MSI and not for legacy devices
    (IO/APIC, HPET).
    
    Introduce a new irq_chip for posted MSIs, which has a dummy irq_ack()
    callback as EOI is performed in the notification handler once.
    
    When posted MSI is enabled, MSI domain/chip hierarchy will look like
    this example:
    
    domain:  IR-PCI-MSIX-0000:50:00.0-12
     hwirq:   0x29
     chip:    IR-PCI-MSIX-0000:50:00.0
      flags:   0x430
                 IRQCHIP_SKIP_SET_WAKE
                 IRQCHIP_ONESHOT_SAFE
     parent:
        domain:  INTEL-IR-10-13
         hwirq:   0x2d0000
         chip:    INTEL-IR-POST
          flags:   0x0
         parent:
            domain:  VECTOR
             hwirq:   0x77
             chip:    APIC
    Suggested-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarJacob Pan <jacob.jun.pan@linux.intel.com>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20240423174114.526704-13-jacob.jun.pan@linux.intel.com
    ed1e48ea
irq_remapping.c 40.1 KB