mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: vtd: fix the pre-allocated context table number
In current code, there is an out of range access to the array buses defined in struct struct context_table. This patch defines CONFIG_IOMMU_BUS_NUM to replace CONFIG_IOMMU_INIT_BUS_LIMIT, which is clearer. CONFIG_IOMMU_BUS_NUM equals to (CONFIG_IOMMU_INIT_BUS_LIMIT + 1). Tracked-On: #1807 Signed-off-by: Binbin Wu <binbin.wu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -304,12 +304,12 @@ config RELOC
|
||||
wherever appropriate. Without relocation the bootloader must put the
|
||||
image to RAM_START, otherwise the hypervisor will not start up.
|
||||
|
||||
config IOMMU_INIT_BUS_LIMIT
|
||||
config IOMMU_BUS_NUM
|
||||
hex "Limit of PCI bus on IOMMU initialization"
|
||||
default 0xf if PLATFORM_SBL
|
||||
default 0xff if PLATFORM_UEFI
|
||||
default 0x10 if PLATFORM_SBL
|
||||
default 0x100 if PLATFORM_UEFI
|
||||
help
|
||||
Any BDF with a bus ID smaller than or equal to this limit is mapped to
|
||||
Any BDF with a bus ID smaller than this number is mapped to
|
||||
the IOMMU domain of the first VM.
|
||||
|
||||
config MAX_PCI_DEV_NUM
|
||||
|
Reference in New Issue
Block a user