From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: xen-devel@lists.xen.org
Cc: andrew.cooper3@citrix.com,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
jbeulich@suse.com, roger.pau@citrix.com
Subject: [PATCH] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT
Date: Wed, 8 Nov 2017 15:19:27 -0500 [thread overview]
Message-ID: <1510172367-30688-1-git-send-email-boris.ostrovsky@oracle.com> (raw)
These tables are pointed to from FADT. Adding them will
result in duplicate entries in the guest's tables.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
xen/arch/x86/hvm/dom0_build.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
index a67071c..c878bba 100644
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -818,6 +818,19 @@ static bool __init pvh_acpi_table_allowed(const char *sig)
return true;
}
+static bool __init pvh_acpi_table_in_xsdt(const char *sig)
+{
+ /*
+ * DSDT and FACS are pointed to from FADT and thus don't belong
+ * in XSDT.
+ */
+ if ( !strncmp(sig, ACPI_SIG_DSDT, ACPI_NAME_SIZE) ||
+ !strncmp(sig, ACPI_SIG_FACS, ACPI_NAME_SIZE) )
+ return false;
+
+ return true;
+}
+
static int __init pvh_setup_acpi_xsdt(struct domain *d, paddr_t madt_addr,
paddr_t *addr)
{
@@ -841,7 +854,7 @@ static int __init pvh_setup_acpi_xsdt(struct domain *d, paddr_t madt_addr,
{
const char *sig = acpi_gbl_root_table_list.tables[i].signature.ascii;
- if ( pvh_acpi_table_allowed(sig) )
+ if ( pvh_acpi_table_allowed(sig) && pvh_acpi_table_in_xsdt(sig) )
num_tables++;
}
@@ -888,7 +901,7 @@ static int __init pvh_setup_acpi_xsdt(struct domain *d, paddr_t madt_addr,
{
const char *sig = acpi_gbl_root_table_list.tables[i].signature.ascii;
- if ( pvh_acpi_table_allowed(sig) )
+ if ( pvh_acpi_table_allowed(sig) && pvh_acpi_table_in_xsdt(sig) )
xsdt->table_offset_entry[j++] =
acpi_gbl_root_table_list.tables[i].address;
}
--
1.8.3.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2017-11-08 20:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-08 20:19 Boris Ostrovsky [this message]
2017-11-09 9:02 ` [PATCH] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT Jan Beulich
2017-11-09 10:14 ` Roger Pau Monné
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=1510172367-30688-1-git-send-email-boris.ostrovsky@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xen.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).