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-3.2-testing] vt-d: Disable VT-d if parsing ACPI DMA

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] vt-d: Disable VT-d if parsing ACPI DMAR fails
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Jul 2008 08:51:18 -0700
Delivery-date: Wed, 23 Jul 2008 08:54:12 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1216377029 -3600
# Node ID 9ed6fe0070cef54b7214177aebd758eb5dd7f287
# Parent  18402fdac81988aef300b694db7c2aa5f10a5c5d
vt-d: Disable VT-d if parsing ACPI DMAR fails

Signed-off-by: Espen Skoglund <espen.skoglund@xxxxxxxxxxxxx>
xen-unstable changeset: 18051:e3ead65e75b2e03638c032566033417ed742cd2a
xen-unstable date: Mon Jul 14 15:20:35 2008 +0100
---
 xen/arch/x86/hvm/vmx/vtd/dmar.c |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+)

diff -r 18402fdac819 -r 9ed6fe0070ce xen/arch/x86/hvm/vmx/vtd/dmar.c
--- a/xen/arch/x86/hvm/vmx/vtd/dmar.c   Fri Jul 18 11:30:12 2008 +0100
+++ b/xen/arch/x86/hvm/vmx/vtd/dmar.c   Fri Jul 18 11:30:29 2008 +0100
@@ -66,6 +66,29 @@ static int __init acpi_register_rmrr_uni
     return 0;
 }
 
+static void __init disable_all_dmar_units(void)
+{
+    struct acpi_drhd_unit *drhd, *_drhd;
+    struct acpi_rmrr_unit *rmrr, *_rmrr;
+    struct acpi_atsr_unit *atsr, *_atsr;
+
+    list_for_each_entry_safe ( drhd, _drhd, &acpi_drhd_units, list )
+    {
+        list_del(&drhd->list);
+        xfree(drhd);
+    }
+    list_for_each_entry_safe ( rmrr, _rmrr, &acpi_rmrr_units, list )
+    {
+        list_del(&rmrr->list);
+        xfree(rmrr);
+    }
+    list_for_each_entry_safe ( atsr, _atsr, &acpi_atsr_units, list )
+    {
+        list_del(&atsr->list);
+        xfree(atsr);
+    }
+}
+
 static int acpi_pci_device_match(struct pci_dev *devices, int cnt,
                                  struct pci_dev *dev)
 {
@@ -534,6 +557,12 @@ static int __init acpi_parse_dmar(unsign
     /* Zap APCI DMAR signature to prevent dom0 using vt-d HW. */
     dmar->header.signature[0] = '\0';
 
+    if ( ret )
+    {
+        printk(XENLOG_WARNING "Failed to parse ACPI DMAR.  Disabling VT-d.\n");
+        disable_all_dmar_units();
+    }
+
     return ret;
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] vt-d: Disable VT-d if parsing ACPI DMAR fails, Xen patchbot-3.2-testing <=