Skip to contentSkip to conversation

x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT

PATCH In review Boris Ostrovsky 4 participants 4 messages Nov 9, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT

These tables are pointed to from FADT. Adding them will result in duplicate entries in the guest's tables.

---
Changes in v2:
* Merge (pvh_acpi_table_allowed(sig) && pvh_acpi_table_in_xsdt(sig)) into a single call
* Make this call return a boolean expression as opposed to explicit true/false

 xen/arch/x86/hvm/dom0_build.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
xen/arch/x86/hvm/dom0_build.c +13 -2
index a67071c..cfcf461 100644
@@ -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;
     }
Signature · 7 lines
1.8.3.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#2 lore raw
Quoted 8 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 09.11.17 at 16:37, <[email protected]> wrote:

These tables are pointed to from FADT. Adding them will result in duplicate entries in the guest's tables.

Pulled into x86-next, thanks.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel