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: There is only one INCLUDE_ALL DMAR u

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] vtd: There is only one INCLUDE_ALL DMAR unit in system, but no
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 25 Jul 2008 10:00:09 -0700
Delivery-date: Fri, 25 Jul 2008 10:00:00 -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 1216975541 -3600
# Node ID 5e44f5d764323c713ee804c5b78087c652bd9747
# Parent  7b6942ad565c95a770d53f3670b69b010ef4d4b1
vtd: There is only one INCLUDE_ALL DMAR unit in system, but no
restriction on whether it's the last unit.

Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>
---
 xen/drivers/passthrough/vtd/dmar.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff -r 7b6942ad565c -r 5e44f5d76432 xen/drivers/passthrough/vtd/dmar.c
--- a/xen/drivers/passthrough/vtd/dmar.c        Fri Jul 25 09:44:48 2008 +0100
+++ b/xen/drivers/passthrough/vtd/dmar.c        Fri Jul 25 09:45:41 2008 +0100
@@ -255,7 +255,7 @@ static int __init acpi_parse_dev_scope(v
             break;
         }
 
-       case ACPI_DEV_MSI_HPET:
+        case ACPI_DEV_MSI_HPET:
             dprintk(XENLOG_INFO VTDPREFIX, "found MSI HPET: bdf = %x:%x.%x\n",
                     bus, path->dev, path->fn);
             scope->devices[didx++] = PCI_BDF(bus, path->dev, path->fn);
@@ -305,13 +305,6 @@ acpi_parse_one_drhd(struct acpi_dmar_ent
     int ret = 0;
     static int include_all = 0;
 
-    if ( include_all )
-    {
-        dprintk(XENLOG_WARNING VTDPREFIX,
-                "DMAR unit with INCLUDE_ALL is not not the last unit.\n");
-        return -EINVAL;
-    }
-
     dmaru = xmalloc(struct acpi_drhd_unit);
     if ( !dmaru )
         return -ENOMEM;
@@ -331,10 +324,17 @@ acpi_parse_one_drhd(struct acpi_dmar_ent
     if ( dmaru->include_all )
     {
         dprintk(XENLOG_INFO VTDPREFIX, "found INCLUDE_ALL\n");
+        /* Only allow one INCLUDE_ALL */
+        if ( include_all )
+        {
+            dprintk(XENLOG_WARNING VTDPREFIX,
+                    "Onlyu onw INCLUDE_ALL device scope is allowed\n");
+            return -EINVAL;
+        }
         include_all = 1;
     }
 
-    if ( ret )
+    if ( ret || (dmaru->scope.devices_cnt == 0 && !dmaru->include_all) )
         xfree(dmaru);
     else
         acpi_register_drhd_unit(dmaru);

_______________________________________________
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: There is only one INCLUDE_ALL DMAR unit in system, but no, Xen patchbot-unstable <=