All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] libxl: put RSDP for PVH guest near 4GB
@ 2017-12-01 14:14 Juergen Gross
  2017-12-19 15:19 ` Juergen Gross
                   ` (3 more replies)
  0 siblings, 4 replies; 34+ messages in thread
From: Juergen Gross @ 2017-12-01 14:14 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

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 <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 tools/libxc/xc_dom_hvmloader.c | 2 +-
 tools/libxl/libxl_x86_acpi.c   | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/libxc/xc_dom_hvmloader.c b/tools/libxc/xc_dom_hvmloader.c
index 59f94e51e5..3f0bd65547 100644
--- a/tools/libxc/xc_dom_hvmloader.c
+++ b/tools/libxc/xc_dom_hvmloader.c
@@ -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;
diff --git a/tools/libxl/libxl_x86_acpi.c b/tools/libxl/libxl_x86_acpi.c
index 9a7c90467d..fe87418bc1 100644
--- a/tools/libxl/libxl_x86_acpi.c
+++ b/tools/libxl/libxl_x86_acpi.c
@@ -22,8 +22,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 0xfc000000
 
 struct libxl_acpi_ctxt {
@@ -220,7 +218,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;
-- 
2.12.3


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2018-03-13 18:06 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01 14:14 [PATCH v2] libxl: put RSDP for PVH guest near 4GB Juergen Gross
2017-12-19 15:19 ` Juergen Gross
2017-12-19 15:38 ` Roger Pau Monné
2017-12-19 15:46   ` Juergen Gross
2017-12-19 16:11     ` Roger Pau Monné
2017-12-19 16:20       ` Juergen Gross
2017-12-20 11:42         ` Roger Pau Monné
2017-12-19 15:47 ` Ian Jackson
2018-01-18 10:31 ` Juergen Gross
2018-01-18 10:33   ` Wei Liu
2018-01-24  2:41     ` Boris Ostrovsky
2018-01-24 10:42       ` George Dunlap
2018-01-24 10:54         ` Roger Pau Monné
2018-01-24 12:06           ` Juergen Gross
2018-01-24 14:10             ` Boris Ostrovsky
2018-01-24 14:25               ` Juergen Gross
2018-01-24 14:42                 ` Boris Ostrovsky
2018-01-24 14:47                   ` Wei Liu
2018-01-24 15:07               ` George Dunlap
2018-01-24 15:20                 ` Juergen Gross
2018-01-24 15:26                   ` George Dunlap
2018-01-24 16:10                     ` Boris Ostrovsky
2018-01-24 16:15                       ` Juergen Gross
2018-01-24 16:38                         ` Boris Ostrovsky
2018-02-19  9:47                     ` Sander Eikelenboom
2018-02-19 10:16                       ` Juergen Gross
2018-02-19 21:13                         ` Sander Eikelenboom
2018-03-12 19:26                           ` Sander Eikelenboom
2018-03-12 20:08                             ` Boris Ostrovsky
2018-03-13  5:27                             ` Juergen Gross
2018-03-13 17:51                               ` Boris Ostrovsky
2018-03-13 18:06                                 ` Juergen Gross
2018-01-25 10:38             ` Hans van Kranenburg
2018-01-25 10:55               ` Juergen Gross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.