mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-10 05:09:01 +00:00
hv: Use Interrupt Remapping format for programming interrupt sources
When a corresponding IOMMU is found for the device, this patch adds support to program Interrupt Remapping hardware RTEs and the original interrupt sources (MSI or IOAPIC) with IR format. Tracked-On: #2426 Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Reviewed-by: Binbin Wu <binbin.wu@intel.com>
This commit is contained in:
committed by
Eddie Dong
parent
7104f0a512
commit
970821462b
@@ -23,6 +23,24 @@ union source_id (name) = {.msi_id = {.bdf = (a), .entry_nr = (b)} }
|
||||
#define DEFINE_IOAPIC_SID(name, a, b) \
|
||||
union source_id (name) = {.intx_id = {.pin = (a), .src = (b)} }
|
||||
|
||||
union source {
|
||||
uint16_t ioapic_id;
|
||||
union pci_bdf msi;
|
||||
};
|
||||
|
||||
struct intr_source {
|
||||
bool is_msi;
|
||||
union source src;
|
||||
};
|
||||
|
||||
union irte_index {
|
||||
uint16_t index;
|
||||
struct {
|
||||
uint16_t index_low:15;
|
||||
uint16_t index_high:1;
|
||||
} bits __packed;
|
||||
};
|
||||
|
||||
union source_id {
|
||||
uint64_t value;
|
||||
struct {
|
||||
@@ -56,6 +74,16 @@ union msi_addr_reg {
|
||||
uint32_t addr_base:12;
|
||||
uint32_t hi_32;
|
||||
} bits __packed;
|
||||
struct {
|
||||
uint32_t rsvd_1:2;
|
||||
uint32_t intr_index_high:1;
|
||||
uint32_t shv:1;
|
||||
uint32_t intr_format:1;
|
||||
uint32_t intr_index_low:15;
|
||||
uint32_t constant:12;
|
||||
uint32_t hi_32;
|
||||
} ir_bits __packed;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user