From d2543720a5e04f5481e68e52a0a39cc77fb9ad6e Mon Sep 17 00:00:00 2001 From: Junjie Mao Date: Tue, 3 Aug 2021 09:39:52 +0800 Subject: [PATCH] config_tools: adjust the layout of vACPI images The current vACPI image layout reserves 512 bytes for vDSDT. Given the fact that the size of vDSDT of a pre-launched VM grows when more devices are assigned to the VM, this size limit can be easily exceeded. As an example, a single pass-through TSN NIC requires 291 bytes in vDSDT to define device objects representing its PCS (Physical Coding Sublayer), which means the current reserved space for vDSDT does not allow two TSN NICs to be assigned to the same VM. This patch enlarges the reserved space for vDSDT to 2432 bytes by moving the MCFG and MADT spaces. 768 bytes are still reserved for MADT which is sufficient to encode the LAPIC information for more than 64 vCPUs. This patch is added in v2 of the series. Tracked-On: #6287 Signed-off-by: Junjie Mao --- misc/config_tools/acpi_gen/acpi_const.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/config_tools/acpi_gen/acpi_const.py b/misc/config_tools/acpi_gen/acpi_const.py index c187d4291..813ba4a7a 100644 --- a/misc/config_tools/acpi_gen/acpi_const.py +++ b/misc/config_tools/acpi_gen/acpi_const.py @@ -23,8 +23,8 @@ ACPI_RSDP_ADDR_OFFSET = 0x0 # (36 bytes fixed) ACPI_XSDT_ADDR_OFFSET = 0x80 # (36 bytes + 8*7 table addrs) ACPI_FADT_ADDR_OFFSET = 0x100 # (268 bytes) ACPI_DSDT_ADDR_OFFSET = 0x240 # (variable) -ACPI_MCFG_ADDR_OFFSET = 0x440 # (60 bytes) -ACPI_MADT_ADDR_OFFSET = 0x480 # (depends on #CPUs) +ACPI_MCFG_ADDR_OFFSET = 0xBC0 # (60 bytes) +ACPI_MADT_ADDR_OFFSET = 0xC00 # (62 + 8*n bytes, where n is the number of vCPUs) ACPI_RTCT_ADDR_OFFSET = 0xF00 ACPI_TPM2_ADDR_OFFSET = 0x1300 # (52 bytes)