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

[PATCH 3/3] tools/libxl: Only allocate 64 bytes for RSDP


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx>
  • Date: Thu, 9 Sep 2021 17:34:41 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Thu, 09 Sep 2021 16:35:27 +0000
  • Ironport-hdrordr: A9a23:JrjuMKqUL6XpiV/Pgrs0ai8aV5oReYIsimQD101hICG8cqSj9v xG+85rrCMc6QxhI03I9urwW5VoLUmyyXcx2/h0AV7AZniBhILLFvAB0WKK+VSJcEeSmtK1l5 0QFJSWYOeAdWSS5vyb3ODXKbgdKaG8gcWVuds=
  • Ironport-sdr: +3BrRwVXpvZbjpR1G8slxnNa4TcWQuzGqFyaK4jzKYmOgVzZAGW7BJak7M4ilt8IuygVnycUPl fdnIS4tL8LlFuebY7o+OLbA0v9e//IBQ9q9kqcvl+nT9Bj8btOFNfmJignX1TnFIYuoY3oRj2G vP9HSz2jG83xwFbpHkTtSD3IXnpT6oi0eQk1TXEQS4LPGIGQxaKK38dpiv5epUWk1S6BMATZyx NOfjkxBxXJRH7Hvela+Gvf2tgq2NlALRjl6zJqfd0K+57+a9Huu2cYNTARp6qfrgAUzQ8x0iRf MibL/Z7zcqxNeFZvLC4eRm1G
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 <kevin.stefanov@xxxxxxxxxx>
---
CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Ian Jackson <iwj@xxxxxxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 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;
     }
 
-    config.rsdp = (unsigned long)libxl__malloc(gc, libxl_ctxt.page_size);
+    config.rsdp = (unsigned long)libxl__malloc(gc, 64);
     config.infop = (unsigned long)libxl__malloc(gc, libxl_ctxt.page_size);
     /* Pages to hold ACPI tables */
     acpi_pages =  libxl__malloc(gc, (NUM_ACPI_PAGES + 1) *
-- 
2.25.1




 


Rackspace

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