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 <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao 2021-08-03 09:39:52 +08:00 committed by wenlingz
parent 07c2f604ae
commit d2543720a5

View File

@ -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)