[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] tools/libxl: Correctly align the ACPI tables


  • To: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 24 Sep 2021 11:49:18 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=V0DzXFN+t1jwWMbnCdqzLLN0qwlkJwPhGT2ZBTZkP8U=; b=Np+8i1KcS+wsVeh83yjMxFW954MTY8ZL8SNggxPT9cnrUhdd75bHpsm7RIRa01ssJGHCTmdOmSPy20ZaTxk5efTSEJjoFLJABfd3+w3UD3YtvhR2EybJo1FyglgRDj5Oj7f0my7QvzIuzjVqTYtFqdhFnKMfwpIbK6cZzepCgryWbVdTwlsbjxW/BsHA1i37ktKpNgDYyzfVw5XPF/bR71Cy0s2FYF9GVMZOT7KronSFZ5GtEE7FVBOoLPhF2skkfpxtO2JmHKJyHF2NICU5jNZNaK+4xGehrXRw2491E9eqHXb/ggLSegJ5eHfmhUGMWpnqv1BncPXyTHxXIRYsXQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S1DpJ0UYQll5O40jQoweMFmhR7K7J4Sw9h8lDYhnxKYMevakd0F8ZkPHfhwytOngzFfnvQCEwfn+TxKK8jZkKFhzQfHM/Sws+hL8Ndjso1iOZGTCmiRu51eRKBsrSHvnEvqfGUVjS3wLyx7zaRo/R4XWx8cPCOdEa9MOtFGlTIWrg+4E36GqOHJpAtI//PxGuTGH0H/ToIFDYSZXR+JTIob0gXeaop+VJCvX7PIXe8wK7CBxoPQhxlBXzijPfYuhko89I/tp5v0IhpOKoHm0AcawW1VDA7UT5XXzGmUe/v4ZGTDRu/FouNBuDCYwaBzE06ioSZ1i1NbMQ9Cay/3e+g==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Fri, 24 Sep 2021 09:49:30 +0000
  • Ironport-data: A9a23:d84Lz6N9qeiaszfvrR1PkMFynXyQoLVcMsEvi/4bfWQNrUp2gjFUz 2cdWzvSO/eKamukfo0lPIrl/R9QsZDXmoRiSAto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdpJYz/uUGuCJQUNUjMlkfZKhTr6ZUsxNbVU8En552Eg/w7dRbrNA2rBVPSvc4 bsenOWHULOV82Yc3rU8sv/rRLtH5ZweiRtA1rAMTakjUGz2zhH5OKk3N6CpR0YUd6EPdgKMq 0Qv+5nilo/R109F5tpICd8XeGVSKlLZFVDmZna7x8FOK/WNz8A/+v9TCRYSVatYozPOoN1vy vd9jKS1eTkTB7Ljku8YcBYNRkmSPYUekFPGCX22sMjVxEzaaXr8hf5pCSnaP6VBpLwxWzsXs 6VFdnZdNXhvhMrvqF6/YvNrick5atHiIasUu216zCGfBvEjKXzGa/iRvIUCh2dp7ixINdD3f +sQUiB/VxWebD5sKGgrEpAhls790xETdBUH8QnI9MLb+VP7zRNz+KjgNsLPfd6HTtkTmVyXz krZ+0zpDxdcM8aQoRKV/3TpiuLRkCfTXIMJCKb+5vNsmEeUxGEYFFsRT1TTifuzh1O6WtlfA 1cJ4Sdopq83nHFHVfGkAUf++iTd+EdBBZwASIXW9T1h1ILSpDmUGGomfgd5bewYjvYpajYh0 3yGyoa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/LfHCWuDYq8dKbC8mcjC74eurAYccegpUdAZ0+4QMHfkLqQcfnghOXNWLu v52iIRzADQBkj/I/7LS0UtbqzmnZnmhZjmaRkJC1oO7xSPtyqh7PrfHwKD1hkTfjtTyfN6mF K13DDR1+GGibWW2xXc32jc49B/n8bg8MJKAIiphtIOIjvhpw60bMBKWqGEvhoyvOazgWxa3O XkklMFBYBe+nnRdma6rV/E3BTh6i8n7zvYxVqRkRLY0ITEbQN/L/AEqZNScxPf5UZllsp7yr h302WQsIcSJQ/cnQzmjuK4Fy1Cpw6Rmz4PgOQTh3tQXc81c7lKt7ES+0tTDdMpAD/60oY6C+ NjZfuspcq+SWnqLUwxg1MfheBFBh8Ib1O7qwk5y4KoOgFt7TNEJxBy/r1Zop8CnKhNAqWsqd 60dJiBOdl1P7srhJlGdZU8qP2MexrwqCL3QRGvyGvcZdQ60lL22tXKCeYOlauXkKJh9upEpH 2GaiIAiVIP
  • Ironport-sdr: 9bB0sOGC8/U61e/kpQPqlWaJTZs3EgXixKSKbP1h/cvKKVUyRT6c9jf4JEue/HZvv3jqf8cSyj mW5vfkYM/BweM13D9ea5ZoHUz139sCfwbp3tiDCn4SdTncCKbjjFZDDfXagJO5NhkygL89gxu4 W8gEmGMfqzNeqdK06Mk2I+pzbJjXgZ7A9X5EvtDIYYGHwZKXUCCOIw93x1+BcsfcevOL1Xvvwa Tl+y5XWcDQhwLVy73WRXASL9AUBjTM8gRnXO5hMUpBk0ax4kurJy4rwMcJCYzis4ElpIVI++Hg 6ANb/W0giWFMG0InaeQE85s2
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.stefanov@xxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.