From nobody Fri Apr 19 22:00:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1631205323; cv=none; d=zohomail.com; s=zohoarc; b=ktMJdSz8vH8dM67FDVLfUJGHGYPhJ8RfE4+DkEU9jLFNVzaUxeL5yvixktGV6AgUwyKHyuOscooIBCLv2XC3BNx7ptdIM7WtM/Yz2BjJhLQ4NhEAoYtp9kVCY8lms2lXVR8w/4HPRHpgOuCye1/1r76DvuqJ6tXdLkQEQomAdTw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631205323; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=T14M9YHJvyX+QPFK6zMTfp3yEBsBUu8BanI3KKQXxjc=; b=QuvigrNkSOTzSAbThlci3g5hVXZnvt9LVsiOfuYtdPxm5ixI+3evTwqE5H3/C6okCEjGJcTtqSQxYxYjPdSINOYugCJGR+EmqY3i5xnB8FhEkjV35JtRNbjHIfrKipNtwzjE+Y4PweoC3Q+hgioM45QaJkfIi+szSP0dzHUrB/U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1631205322874482.8355670842577; Thu, 9 Sep 2021 09:35:22 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.183372.331505 (Exim 4.92) (envelope-from ) id 1mON0v-00013I-Uf; Thu, 09 Sep 2021 16:35:01 +0000 Received: by outflank-mailman (output) from mailman id 183372.331505; Thu, 09 Sep 2021 16:35:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mON0v-00012U-QK; Thu, 09 Sep 2021 16:35:01 +0000 Received: by outflank-mailman (input) for mailman id 183372; Thu, 09 Sep 2021 16:35:01 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mON0u-0000zO-WF for xen-devel@lists.xenproject.org; Thu, 09 Sep 2021 16:35:01 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ba95b034-5d64-4cc1-a1cd-3fed2c23f413; Thu, 09 Sep 2021 16:35:00 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ba95b034-5d64-4cc1-a1cd-3fed2c23f413 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1631205299; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XyAZ9tVbkw9oc4UHQy0JFhFEp2DcwLj5o9RUfsQCO+g=; b=VFk6BqzxThNnwtO4gmsA9vgW024qNm7ph8AeUvGJfz2IVPQYxkvG9UyP fdi3LEayfC4k6SPgBJmKOVSCcBlECmJp1hh9hpMUphZc6ZV5xt9DBpzdb pNAHHnG4+tUkGFAHMupxqVvhbvPY5oU9rroDxTJ4qG/KLpyhLAvERtGJE c=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: iE/xgJg82yj680ioyAa0b2lSBDNg2lrMOdcpF/khdp9jdLLxQOmQeCOzQtO7f1GJaOgtEH5PBi R5oof9iLR+Lxsi1f1hR1tlcwVfcNDowsKLHn7LjqJfyXeYbo8rqHhqukWRLUTLBe29vi1QfL88 dbs0kweLe5SxIIrUDlgdsRDLixFc9gQBjUmPyKLWsWTIjHVZaE9/WseJoI0vfUDiEBUtKfMbC4 Pd9lYF+CuxJqqZEnEqitm2CNOc5xUbeo1YVPH761ZYxZ/tdcp3tIcghAWw5XlAPuf/5701V8Ct ROtsKKj1iZuocqYWslQbcSHo X-SBRS: 5.1 X-MesageID: 52390010 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:kN+zQaDblaqxrPvlHelo55DYdb4zR+YMi2TDt3oddfU1SL38qy nKpp4mPHDP5wr5NEtPpTniAtjjfZq/z/5ICOAqVN/PYOCPggCVxepZnOjfKlPbehEX9oRmpN 1dm6oVMqyMMbCt5/yKnDVRELwbsaa6GLjDv5a785/0JzsaE52J6W1Ce2GmO3wzfiZqL7wjGq GR48JWzgDQAkj+PqyAdx84t/GonayzqK7b X-IronPort-AV: E=Sophos;i="5.85,280,1624334400"; d="scan'208";a="52390010" From: Kevin Stefanov To: Xen-devel CC: Kevin Stefanov , Jan Beulich , Andrew Cooper Subject: [PATCH 1/3] tools/libacpi: Use 64-byte alignment for FACS Date: Thu, 9 Sep 2021 17:34:39 +0100 Message-ID: <20210909163441.44418-2-kevin.stefanov@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210909163441.44418-1-kevin.stefanov@citrix.com> References: <20210909163441.44418-1-kevin.stefanov@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1631205326788100001 Content-Type: text/plain; charset="utf-8" The spec requires 64-byte alignment, not 16. Signed-off-by: Kevin Stefanov Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper Note: This does not fix the FACS alignment inside guests yet. See next patch. --- tools/libacpi/build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libacpi/build.c b/tools/libacpi/build.c index a61dd5583a..fe2db66a62 100644 --- a/tools/libacpi/build.c +++ b/tools/libacpi/build.c @@ -532,7 +532,7 @@ int acpi_build_tables(struct acpi_ctxt *ctxt, struct ac= pi_config *config) * Fill in high-memory data structures, starting at @buf. */ =20 - facs =3D ctxt->mem_ops.alloc(ctxt, sizeof(struct acpi_20_facs), 16); + facs =3D ctxt->mem_ops.alloc(ctxt, sizeof(struct acpi_20_facs), 64); if (!facs) goto oom; memcpy(facs, &Facs, sizeof(struct acpi_20_facs)); =20 --=20 2.25.1 From nobody Fri Apr 19 22:00:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1631205326; cv=none; d=zohomail.com; s=zohoarc; b=VikuOSBuCl1piiYuk8kmhbdFh9Xa3Z8Y9yHPMEZNykeZQAGdrGeJcNz8URK2OFmmJtZ+TYZZAzYBEUu2uwHgllDvf8P693VyqWaxhhXgO5MYDQBmrX6Q/31iaEygrWNnEmNCr/JvEg1TZwRSPry2krxKk19U6KsX3hibNrocfPY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631205326; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=L9FAE7nTIUW8YiqGd+PxTbs8/6gSYvncwdkuTMlSaLc=; b=E4oWwuPFPofwDW4lghCuTz8pvE+pI4L8YpKXLjBIWbWY96ToPJMpP8rl/SQDTmkx+lDmHEY4EW0ceVRud3DCe9EQ79+u1ojGcmLFWqpMNTMBWU4MCrF+zFgD7EgPeL7u+/pGI0o5Jw7K5UaiCqjGGUktwzvJA/hnyzKQ5AcYUX0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1631205326421856.2511055006267; Thu, 9 Sep 2021 09:35:26 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.183373.331523 (Exim 4.92) (envelope-from ) id 1mON11-0001YY-7P; Thu, 09 Sep 2021 16:35:07 +0000 Received: by outflank-mailman (output) from mailman id 183373.331523; Thu, 09 Sep 2021 16:35:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mON11-0001YR-3G; Thu, 09 Sep 2021 16:35:07 +0000 Received: by outflank-mailman (input) for mailman id 183373; Thu, 09 Sep 2021 16:35:05 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mON0z-0000zH-AQ for xen-devel@lists.xenproject.org; Thu, 09 Sep 2021 16:35:05 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e0509478-118b-11ec-b1cb-12813bfff9fa; Thu, 09 Sep 2021 16:35:00 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e0509478-118b-11ec-b1cb-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1631205300; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=05ujbDwCHYeB1etSWskRRxGCGEOzl35sXRnTpQwyYyQ=; b=cH07yqkzdQwzzNUANa+GYhsu01sNhjU0VydsHYHzi3h2lMFlqvDI3k2A nsuNzoVRf4fKZnqtzNDdDnxYWAx1t+6N5Mf2sKqTRRe+9N2f3z9j8UYL1 K+IHV4cXSM0N7e0nYff82ZksjU7gI1l2ULYxcAumk/Kxi3Qpub9PRsat+ 8=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: XVrzfeg/RpgzLA8csCHC+Mc3NGz0xP5HCaQGB9gx1e3k6S9orcQfSFmA0+ddQ1jZv1hQpKl7Lt TAx3JpmSlonEk2KEpz5CfKpHdOs22WSLO4F3HgPjwjfKG8+jNgACYVqVHP0zksNEuZc4kNvkJ7 c4rVsOFS01/8Y66KPMfohKkfFtx5CJHo2W2gn7WeNoG/4R+ERdHnRZfVY/+207j7R89HZ8W3Fj gHReyXDEGgvC7jQjXf6rtm3IPMMNE87lh3IIPJy3/QqJcyyskQ6/aC8C/dYAjMA8HGUDye4z8A tsQ4oQ/2Q3tv69Jp0U1HmxZS X-SBRS: 5.1 X-MesageID: 51975738 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:GiRqhKzLr91ncqQjwy5MKrPw2r1zdoMgy1knxilNoHxuH/BwWf rPoB17726TtN91YhsdcL+7V5VoLUmzyXcx2/hyAV7AZniAhILLFvAA0WKK+VSJdxEWtNQtsJ uIG5IUNDSaNykfsS+V2miF+9ZL+qj5zEir792usUuEm2tRGtBdBwQSMHfqLqVvLjM2fKbQjP Cnl7d6TzzLQwVuUu2LQkMrcsLkvNPxmJfvcXc9dmIaAFnnt0LS1FbieSLopCsjbw== X-IronPort-AV: E=Sophos;i="5.85,280,1624334400"; d="scan'208";a="51975738" From: Kevin Stefanov To: Xen-devel CC: Kevin Stefanov , Andrew Cooper , Ian Jackson , Wei Liu , Anthony PERARD Subject: [PATCH 2/3] tools/libxl: Correctly aligned buffer for ACPI tables Date: Thu, 9 Sep 2021 17:34:40 +0100 Message-ID: <20210909163441.44418-3-kevin.stefanov@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210909163441.44418-1-kevin.stefanov@citrix.com> References: <20210909163441.44418-1-kevin.stefanov@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1631205328687100005 Content-Type: text/plain; charset="utf-8" The pointer resulting from libxl__malloc() has no explicit alignment. As an implementation detail, it has 16-byte alignment. When this buffer is used by libacpi aligning ACPI tables to greater than 16 does not work correctly. This causes the FACS to not be 64-byte aligned when the ACPI tables are copied into guest memory. Align the ACPI tables buffer to a page, to match the alignment inside guest memory. The buffer is already one page too large, presumably intended for this purpose originally. Fixes: 14c0d328da2b ("libxl/acpi: Build ACPI tables for HVMlite guests") Signed-off-by: Kevin Stefanov --- CC: Andrew Cooper CC: Ian Jackson CC: Wei Liu CC: Anthony PERARD --- tools/libs/light/libxl_x86_acpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libs/light/libxl_x86_acpi.c b/tools/libs/light/libxl_x86= _acpi.c index 3eca1c7a9f..0a82e7cacd 100644 --- a/tools/libs/light/libxl_x86_acpi.c +++ b/tools/libs/light/libxl_x86_acpi.c @@ -193,6 +193,7 @@ int libxl__dom_load_acpi(libxl__gc *gc, * Set up allocator memory. * Start next to acpi_info page to avoid fracturing e820. */ + acpi_pages =3D (void *)ROUNDUP((unsigned long)acpi_pages, libxl_ctxt.p= age_shift); libxl_ctxt.alloc_base_paddr =3D ACPI_INFO_PHYSICAL_ADDRESS + libxl_ctxt.page_size; libxl_ctxt.alloc_base_vaddr =3D libxl_ctxt.alloc_currp =3D --=20 2.25.1 From nobody Fri Apr 19 22:00:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1631205340; cv=none; d=zohomail.com; s=zohoarc; b=i3KQ1CI35uOOL/TbisWJJsiRzLlWtgBa4Z+jcoZPItgtC71MfUSykHCDw3zCL1yjmXqz8d5PPPD6UcpQyXQru4Xn+8Yt4N2o90U288IDfUgBgCNRHy24mcP3Y1yQB1++5zOdlJMNa2F9FWJF+dM1xYNomepqaOzqA34uC1nwC1E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631205340; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NsEoXItxnPtgrWvGtgmjP3EIp9XZv1eYviJ51VF+U+A=; b=alYq3w87fr8koZeqihWt3+3Q/WGzqi5T6rdl1H+jvynSxEXhwl+xNMqhnzHMeB+X+ozTNbnnBjO/lAMcpD7lPlX/sjeHdS+LKi6ues0kXHJEjV4Ey1+Ha9Tbzqu8dUdvzjWjhZHDX9+UmYISqyCiP//nQs6aiAHOod96zFoa7k4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1631205340542935.1976790494132; Thu, 9 Sep 2021 09:35:40 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.183381.331534 (Exim 4.92) (envelope-from ) id 1mON1L-0002Ru-G2; Thu, 09 Sep 2021 16:35:27 +0000 Received: by outflank-mailman (output) from mailman id 183381.331534; Thu, 09 Sep 2021 16:35:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mON1L-0002Rn-CO; Thu, 09 Sep 2021 16:35:27 +0000 Received: by outflank-mailman (input) for mailman id 183381; Thu, 09 Sep 2021 16:35:25 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mON1J-0001rN-SV for xen-devel@lists.xenproject.org; Thu, 09 Sep 2021 16:35:25 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 24a98b95-d76e-4665-9e6e-14ec9f6de728; Thu, 09 Sep 2021 16:35:19 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 24a98b95-d76e-4665-9e6e-14ec9f6de728 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1631205319; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=35xQpM/thu7zR5kkv+/e98XVppVGc4tUolZlEnqQblo=; b=gSswPpum84z4Z/owIYBzPDHY6McJ5qQI2EwOAlQsnYk1jR4gpM2wqE1/ YE9Vhkx9n960L7WettWQAKbsuVQdzCEzqQ2+DcKSHq3vUDxB8v+Xn8Qru tEBVbLqqMZSULsF1WuWJQaSxAQE8mbV0XHJNQbDCfmSu3kJKX3LccnvtE A=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: +3BrRwVXpvZbjpR1G8slxnNa4TcWQuzGqFyaK4jzKYmOgVzZAGW7BJak7M4ilt8IuygVnycUPl fdnIS4tL8LlFuebY7o+OLbA0v9e//IBQ9q9kqcvl+nT9Bj8btOFNfmJignX1TnFIYuoY3oRj2G vP9HSz2jG83xwFbpHkTtSD3IXnpT6oi0eQk1TXEQS4LPGIGQxaKK38dpiv5epUWk1S6BMATZyx NOfjkxBxXJRH7Hvela+Gvf2tgq2NlALRjl6zJqfd0K+57+a9Huu2cYNTARp6qfrgAUzQ8x0iRf MibL/Z7zcqxNeFZvLC4eRm1G X-SBRS: 5.1 X-MesageID: 54142780 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:JrjuMKqUL6XpiV/Pgrs0ai8aV5oReYIsimQD101hICG8cqSj9v xG+85rrCMc6QxhI03I9urwW5VoLUmyyXcx2/h0AV7AZniBhILLFvAB0WKK+VSJcEeSmtK1l5 0QFJSWYOeAdWSS5vyb3ODXKbgdKaG8gcWVuds= X-IronPort-AV: E=Sophos;i="5.85,280,1624334400"; d="scan'208";a="54142780" From: Kevin Stefanov To: Xen-devel CC: Kevin Stefanov , Andrew Cooper , Ian Jackson , Wei Liu , Anthony PERARD Subject: [PATCH 3/3] tools/libxl: Only allocate 64 bytes for RSDP Date: Thu, 9 Sep 2021 17:34:41 +0100 Message-ID: <20210909163441.44418-4-kevin.stefanov@citrix.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210909163441.44418-1-kevin.stefanov@citrix.com> References: <20210909163441.44418-1-kevin.stefanov@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1631205342470100001 Content-Type: text/plain; charset="utf-8" RSDP's size is 64 bytes and later in the function, its buffer is hardcoded to be 64 bytes long. Don't bother to allocate a whole page. Signed-off-by: Kevin Stefanov Reviewed-by: Jan Beulich --- CC: Andrew Cooper CC: Ian Jackson CC: Wei Liu CC: Anthony PERARD --- tools/libs/light/libxl_x86_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/light/libxl_x86_acpi.c b/tools/libs/light/libxl_x86= _acpi.c index 0a82e7cacd..2aea1eca31 100644 --- a/tools/libs/light/libxl_x86_acpi.c +++ b/tools/libs/light/libxl_x86_acpi.c @@ -183,7 +183,7 @@ int libxl__dom_load_acpi(libxl__gc *gc, goto out; } =20 - config.rsdp =3D (unsigned long)libxl__malloc(gc, libxl_ctxt.page_size); + config.rsdp =3D (unsigned long)libxl__malloc(gc, 64); config.infop =3D (unsigned long)libxl__malloc(gc, libxl_ctxt.page_size= ); /* Pages to hold ACPI tables */ acpi_pages =3D libxl__malloc(gc, (NUM_ACPI_PAGES + 1) * --=20 2.25.1