WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] x86: fix tboot after c/s 23013:65d26504e843 (ACPI cl

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: fix tboot after c/s 23013:65d26504e843 (ACPI cleanup)
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Fri, 25 Mar 2011 16:01:52 +0000
Cc: Joseph Cihula <joseph.cihula@xxxxxxxxx>, Gang Wei <gang.wei@xxxxxxxxx>
Delivery-date: Fri, 25 Mar 2011 09:02:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
TXT code calls acpi_parse_dmar() with a transient copy of the DMAR
table, and hence storing the pointer for later reference was wrong.
Obtain the pointer in acpi_dmar_init() instead.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Tested-by: Gang Wei <gang.wei@xxxxxxxxx>

--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -673,7 +673,6 @@ static int __init acpi_parse_dmar(struct
     u8 dmar_host_address_width;
     int ret = 0;
 
-    dmar_table = table;
     dmar = (struct acpi_table_dmar *)table;
 
     if ( !iommu_enabled )
@@ -762,6 +761,13 @@ out:
 
 int __init acpi_dmar_init(void)
 {
+    unsigned long flags;
+
+    /* Disabling IRQs avoids cross-CPU TLB flush in map_pages_to_xen(). */
+    local_irq_save(flags);
+    acpi_get_table(ACPI_SIG_DMAR, 0, &dmar_table);
+    local_irq_restore(flags);
+
     return parse_dmar_table(acpi_parse_dmar);
 }
 



Attachment: acpi-tboot-fix-23013.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86: fix tboot after c/s 23013:65d26504e843 (ACPI cleanup), Jan Beulich <=