arch/x86/include/asm/irq_remapping.h
Source file repositories/reference/linux-study-clean/arch/x86/include/asm/irq_remapping.h
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/include/asm/irq_remapping.h- Extension
.h- Size
- 2580 bytes
- Lines
- 99
- Domain
- Architecture Layer
- Bucket
- arch/x86
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/irqdomain.hasm/hw_irq.hasm/io_apic.h
Detected Declarations
struct msi_msgstruct irq_alloc_infostruct amd_iommu_pi_datastruct intel_iommu_pi_dataenum irq_remap_capfunction posted_msi_enabledfunction irq_remapping_capfunction set_irq_remapping_brokenfunction irq_remapping_enablefunction irq_remapping_disablefunction irq_remap_enable_fault_handlingfunction panic_if_irq_remap
Annotated Snippet
struct amd_iommu_pi_data {
u64 vapic_addr; /* Physical address of the vCPU's vAPIC. */
u32 ga_tag;
u32 vector; /* Guest vector of the interrupt */
int cpu;
bool ga_log_intr;
bool is_guest_mode;
void *ir_data;
};
struct intel_iommu_pi_data {
u64 pi_desc_addr; /* Physical address of PI Descriptor */
u32 vector; /* Guest vector of the interrupt */
};
#ifdef CONFIG_IRQ_REMAP
extern raw_spinlock_t irq_2_ir_lock;
extern bool irq_remapping_cap(enum irq_remap_cap cap);
extern void set_irq_remapping_broken(void);
extern int irq_remapping_prepare(void);
extern int irq_remapping_enable(void);
extern void irq_remapping_disable(void);
extern int irq_remapping_reenable(int);
extern int irq_remap_enable_fault_handling(void);
extern void panic_if_irq_remap(const char *msg);
/* Get parent irqdomain for interrupt remapping irqdomain */
static inline struct irq_domain *arch_get_ir_parent_domain(void)
{
return x86_vector_domain;
}
extern bool enable_posted_msi;
static inline bool posted_msi_enabled(void)
{
return IS_ENABLED(CONFIG_X86_POSTED_MSI) &&
enable_posted_msi && irq_remapping_cap(IRQ_POSTING_CAP);
}
#else /* CONFIG_IRQ_REMAP */
static inline bool irq_remapping_cap(enum irq_remap_cap cap) { return 0; }
static inline void set_irq_remapping_broken(void) { }
static inline int irq_remapping_prepare(void) { return -ENODEV; }
static inline int irq_remapping_enable(void) { return -ENODEV; }
static inline void irq_remapping_disable(void) { }
static inline int irq_remapping_reenable(int eim) { return -ENODEV; }
static inline int irq_remap_enable_fault_handling(void) { return -ENODEV; }
static inline void panic_if_irq_remap(const char *msg)
{
}
#endif /* CONFIG_IRQ_REMAP */
#ifdef CONFIG_X86_POSTED_MSI
void intel_ack_posted_msi_irq(struct irq_data *irqd);
#else
#define intel_ack_posted_msi_irq NULL
#endif
#endif /* __X86_IRQ_REMAPPING_H */
Annotation
- Immediate include surface: `asm/irqdomain.h`, `asm/hw_irq.h`, `asm/io_apic.h`.
- Detected declarations: `struct msi_msg`, `struct irq_alloc_info`, `struct amd_iommu_pi_data`, `struct intel_iommu_pi_data`, `enum irq_remap_cap`, `function posted_msi_enabled`, `function irq_remapping_cap`, `function set_irq_remapping_broken`, `function irq_remapping_enable`, `function irq_remapping_disable`.
- Atlas domain: Architecture Layer / arch/x86.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.