forked from xen-project/xen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/libxl: Correctly align the ACPI tables
The memory allocator currently calculates alignment in libxl's virtual address space, rather than guest physical address space. This results in the FACS being commonly misaligned. Furthermore, the allocator has several other bugs. The opencoded align-up calculation is currently susceptible to a bug that occurs in the corner case that the buffer is already aligned to begin with. In that case, an align-sized memory hole is introduced. The while loop is dead logic because its effects are entirely and unconditionally overwritten immediately after it. Rework the memory allocator to align in guest physical address space instead of libxl's virtual memory and improve the calculation, drop errant extra page in allocated buffer for ACPI tables, and give some of the variables better names/types. Fixes: 14c0d32 ("libxl/acpi: Build ACPI tables for HVMlite guests") Signed-off-by: Kevin Stefanov <[email protected]> Reviewed-by: Jan Beulich <[email protected]> Acked-by: Ian Jackson <[email protected]> master commit: dd6c062 master date: 2021-09-24 11:07:50 +0100
- Loading branch information
Showing
1 changed file
with
19 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters