]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 9 Nov 2017 15:37:53 +0000 (10:37 -0500)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 1 Dec 2017 19:03:27 +0000 (19:03 +0000)
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>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/hvm/dom0_build.c

index a67071c739baa67469c4f498482200f79ca96127..4338965bf6e85afaed8c19afa857f90af8fa6538 100644 (file)
@@ -818,6 +818,17 @@ static bool __init pvh_acpi_table_allowed(const char *sig)
     return true;
 }
 
+static bool __init pvh_acpi_xsdt_table_allowed(const char *sig)
+{
+    /*
+     * DSDT and FACS are pointed to from FADT and thus don't belong
+     * in XSDT.
+     */
+    return (pvh_acpi_table_allowed(sig) &&
+            strncmp(sig, ACPI_SIG_DSDT, ACPI_NAME_SIZE) &&
+            strncmp(sig, ACPI_SIG_FACS, ACPI_NAME_SIZE));
+}
+
 static int __init pvh_setup_acpi_xsdt(struct domain *d, paddr_t madt_addr,
                                       paddr_t *addr)
 {
@@ -841,7 +852,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_xsdt_table_allowed(sig) )
             num_tables++;
     }
 
@@ -888,7 +899,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_xsdt_table_allowed(sig) )
             xsdt->table_offset_entry[j++] =
                 acpi_gbl_root_table_list.tables[i].address;
     }