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] intel vtd: Remove the BUG_ON in domain_co

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] intel vtd: Remove the BUG_ON in domain_context_mapping().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Apr 2009 07:00:25 -0700
Delivery-date: Wed, 22 Apr 2009 07:02:08 -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 1240327886 -3600
# Node ID 6ba4e34d21d33509c5f64b1f8feb95bc4a1577a4
# Parent  5599cc1e0a848d9fea537d02c5a89ea9df6b3b88
intel vtd: Remove the BUG_ON in domain_context_mapping().

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
---
 xen/drivers/passthrough/vtd/iommu.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletion(-)

diff -r 5599cc1e0a84 -r 6ba4e34d21d3 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Tue Apr 21 18:27:59 2009 +0900
+++ b/xen/drivers/passthrough/vtd/iommu.c       Tue Apr 21 16:31:26 2009 +0100
@@ -1196,7 +1196,20 @@ static int domain_context_mapping(struct
     u8 secbus, secdevfn;
     struct pci_dev *pdev = pci_get_pdev(bus, devfn);
 
-    BUG_ON(!pdev);
+    if ( pdev == NULL )
+    {
+        /* We can reach here by setup_dom0_rmrr() -> iommu_prepare_rmrr_dev()
+         * -> domain_context_mapping().
+         * In the case a user enables VT-d and disables USB (that usually needs
+         * RMRR) in BIOS, we can't discover the BDF of the USB controller in
+         * setup_dom0_devices(), but the ACPI RMRR structures may still contain
+         * the BDF and at last pci_get_pdev() returns NULL here.
+         */
+        gdprintk(XENLOG_WARNING VTDPREFIX,
+                "domain_context_mapping: can't find bdf = %x:%x.%x\n",
+                 bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
+        return 0;
+    }
 
     drhd = acpi_find_matched_drhd_unit(pdev);
     if ( !drhd )

_______________________________________________
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] intel vtd: Remove the BUG_ON in domain_context_mapping()., Xen patchbot-unstable <=