mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +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
@@ -9,6 +9,7 @@
|
||||
#include <acpi.h>
|
||||
|
||||
#define IOAPIC_MAX_PIN 240U
|
||||
#define IOAPIC_INVALID_ID 0xFFU
|
||||
|
||||
/*
|
||||
* IOAPIC_MAX_LINES is architecturally defined.
|
||||
@@ -370,6 +371,19 @@ ioapic_nr_pins(void *ioapic_base)
|
||||
return nr_pins;
|
||||
}
|
||||
|
||||
uint8_t ioapic_irq_to_ioapic_id(uint32_t irq)
|
||||
{
|
||||
uint8_t ret;
|
||||
|
||||
if (ioapic_irq_is_gsi(irq)) {
|
||||
ret = gsi_table_data[irq].ioapic_id;
|
||||
} else {
|
||||
ret = IOAPIC_INVALID_ID;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int32_t init_ioapic_id_info(void)
|
||||
{
|
||||
int32_t ret = 0;
|
||||
|
Reference in New Issue
Block a user