libxl: put RSDP for PVH guest near 4GB
PATCH 1/1 libxl: put RSDP for PVH guest near 4GB
Instead of locating the RSDP table below 1MB put it just below 4GB like the rest of the ACPI tables in case of PVH guests. This will avoid punching more holes than necessary into the memory map.
--- tools/libxc/xc_dom_hvmloader.c | 2 +- tools/libxl/libxl_x86_acpi.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
tools/libxc/xc_dom_hvmloader.c +1 -1
@@ -136,7 +136,7 @@ static int module_init_one(struct xc_dom_image *dom,struct xc_dom_seg seg;void *dest; -if ( module->length ) +if ( module->length && !module->guest_addr_out ) {if (xc_dom_alloc_segment (dom, &seg, name,0 , module->length) ) goto err;
tools/libxl/libxl_x86_acpi.c +2 -2
@@ -23,7 +23,6 @@/* Number of pages holding ACPI tables */ #define NUM_ACPI_PAGES 16/* Store RSDP in the last 64 bytes of BIOS RO memory */ -#define RSDP_ADDRESS (0x100000 - 64)#define ACPI_INFO_PHYSICAL_ADDRESS 0xfc000000struct libxl_acpi_ctxt {
@@ -220,7 +219,8 @@ int libxl__dom_load_acpi(libxl__gc *gc, dom->acpi_modules[0 ].data = (void *)config.rsdp; dom->acpi_modules[0 ].length =64 ; - dom->acpi_modules[0 ].guest_addr_out =RSDP_ADDRESS ; + dom->acpi_modules[0 ].guest_addr_out =ACPI_INFO_PHYSICAL_ADDRESS + + (1 + acpi_pages_num) * libxl_ctxt.page_size; dom->acpi_modules[1 ].data = (void *)config.infop; dom->acpi_modules[1 ].length =4096 ;
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
tools/libxl/libxl_x86_acpi.c line 26
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 29.11.17 at 15:13, <[email protected]> wrote:
tools/libxl/libxl_x86_acpi.c +0
-1@@ -23,7 +23,6 @@/* Number of pages holding ACPI tables */ #define NUM_ACPI_PAGES 16/* Store RSDP in the last 64 bytes of BIOS RO memory */ -#define RSDP_ADDRESS (0x100000 - 64)
Leaving a then stale comment around?
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Jan Beulich
tools/libxl/libxl_x86_acpi.c line 26
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 29.11.17 at 15:13, <[email protected]> wrote:
tools/libxl/libxl_x86_acpi.c +0
-1@@ -23,7 +23,6 @@/* Number of pages holding ACPI tables */ #define NUM_ACPI_PAGES 16/* Store RSDP in the last 64 bytes of BIOS RO memory */ -#define RSDP_ADDRESS (0x100000 - 64)Leaving a then stale comment around?
Indeed. Thanks for noticing.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 5 lines · Juergen Gross
Instead of locating the RSDP table below 1MB put it just below 4GB like the rest of the ACPI tables in case of PVH guests. This will avoid punching more holes than necessary into the memory map.
Signed-off-by Juergen Gross <[email protected]>
With Jan's comment addressed:
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel