hv: Avoid run-time buffer overflows with IOAPIC data structures

Remove couple of run-time ASSERTs in ioapic module by checking for the
number of interrupt pins per IO-APICs against the configured MAX_IOAPIC_LINES
in the initialization flow.
Also remove the need for two MACROs specifying the max. number of
interrupt lines per IO-APIC and add a config item MAX_IOAPIC_LINES for the
same.

Tracked-On: #3299
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Sainath Grandhi
2019-06-18 13:35:05 -07:00
committed by ACRN System Integration
parent c1e23f1a4a
commit 0a8bf6cee4
3 changed files with 61 additions and 28 deletions

View File

@@ -264,6 +264,11 @@ config MAX_IOAPIC_NUM
range 1 8
default 1
config MAX_IOAPIC_LINES
int "Maximum number of interrupt lines per IOAPIC"
range 1 120
default 120
config MAX_IR_ENTRIES
int "Maximum number of Interrupt Remapping Entries"
default 256