From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
wei.liu2@citrix.com, ian.jackson@eu.citrix.com
Subject: [PATCH] libxl: put RSDP for PVH guest near 4GB
Date: Wed, 29 Nov 2017 15:13:16 +0100 [thread overview]
Message-ID: <20171129141316.20698-1-jgross@suse.com> (raw)
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>
---
tools/libxc/xc_dom_hvmloader.c | 2 +-
tools/libxl/libxl_x86_acpi.c | 4 ++--
2 files changed, 3 insertions(+), 3 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..b2a861d845 100644
--- a/tools/libxl/libxl_x86_acpi.c
+++ b/tools/libxl/libxl_x86_acpi.c
@@ -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 0xfc000000
struct 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;
--
2.12.3
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2017-11-29 14:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 14:13 Juergen Gross [this message]
2017-11-29 14:25 ` [PATCH] libxl: put RSDP for PVH guest near 4GB Jan Beulich
[not found] ` <5A1ED15C0200007800193238@suse.com>
2017-11-29 14:44 ` Juergen Gross
2017-12-01 14:03 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171129141316.20698-1-jgross@suse.com \
--to=jgross@suse.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).