On Wed, Sep 15, 2021 at 03:30:00PM +0100, Kevin Stefanov wrote: > 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: 14c0d328da2b ("libxl/acpi: Build ACPI tables for HVMlite guests") > Signed-off-by: Kevin Stefanov <kevin.stefa...@citrix.com> > Reviewed-by: Jan Beulich <jbeul...@suse.com>
Reviewed-by: Roger Pau Monné <roger....@citrix.com> Thanks, Roger.