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-changelog

[Xen-changelog] [xen-unstable] [VTD] Fixes to ACPI DMAR flag checks.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [VTD] Fixes to ACPI DMAR flag checks.
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Sat, 09 Apr 2011 09:20:10 +0100
Delivery-date: Sat, 09 Apr 2011 01:20:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Allen Kay <allen.m.kay@xxxxxxxxx>
# Date 1302077462 -3600
# Node ID c7916d6f4dfba9d6c7eeb0fc2796068d75e2fb4a
# Parent  42fa70e0761bbb0596618ca5323664f31a2faa76
[VTD] Fixes to ACPI DMAR flag checks.

 * platform_supports_{intremap,x2apic} should not be marked __init as
   they are used during S3 resume.
 * DMAR flags should be taken from the table passed to
   acpi_parse_dmar() -- this is the trusted copy of the DMAR, when
   running in TXT mode.

Signed-off-by: Allen Kay <allen.m.kay@xxxxxxxxx>
---


diff -r 42fa70e0761b -r c7916d6f4dfb xen/drivers/passthrough/vtd/dmar.c
--- a/xen/drivers/passthrough/vtd/dmar.c        Wed Apr 06 09:02:13 2011 +0100
+++ b/xen/drivers/passthrough/vtd/dmar.c        Wed Apr 06 09:11:02 2011 +0100
@@ -675,6 +675,7 @@
     int ret = 0;
 
     dmar = (struct acpi_table_dmar *)table;
+    dmar_flags = dmar->flags;
 
     if ( !iommu_enabled )
     {
@@ -762,12 +763,7 @@
 
 int __init acpi_dmar_init(void)
 {
-    struct acpi_table_dmar *dmar;
-
     acpi_get_table(ACPI_SIG_DMAR, 0, &dmar_table);
-    dmar = (struct acpi_table_dmar *) dmar_table;
-    dmar_flags = dmar->flags;
-
     return parse_dmar_table(acpi_parse_dmar);
 }
 
@@ -787,7 +783,7 @@
     dmar_table->checksum -= 'X'-'D';
 }
 
-int __init platform_supports_intremap(void)
+int platform_supports_intremap(void)
 {
     unsigned int flags = 0;
 
@@ -795,7 +791,7 @@
     return ((dmar_flags & flags) == DMAR_INTR_REMAP);
 }
 
-int __init platform_supports_x2apic(void)
+int platform_supports_x2apic(void)
 {
     unsigned int flags = 0;
 
diff -r 42fa70e0761b -r c7916d6f4dfb xen/drivers/passthrough/vtd/extern.h
--- a/xen/drivers/passthrough/vtd/extern.h      Wed Apr 06 09:02:13 2011 +0100
+++ b/xen/drivers/passthrough/vtd/extern.h      Wed Apr 06 09:11:02 2011 +0100
@@ -119,7 +119,7 @@
 void vtd_ops_postamble_quirk(struct iommu* iommu);
 void me_wifi_quirk(struct domain *domain, u8 bus, u8 devfn, int map);
 void pci_vtd_quirk(struct pci_dev *pdev);
-int __init platform_supports_intremap(void);
-int __init platform_supports_x2apic(void);
+int platform_supports_intremap(void);
+int platform_supports_x2apic(void);
 
 #endif // _VTD_EXTERN_H_

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [VTD] Fixes to ACPI DMAR flag checks., Xen patchbot-unstable <=