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.4-testing] vtd: interrupt remapping: be more defe

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] vtd: interrupt remapping: be more defensive
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Feb 2010 03:20:53 -0800
Delivery-date: Wed, 24 Feb 2010 03:22:38 -0800
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 1267009976 0
# Node ID 8101ab9db4de83fdc6fd1520c079701bea13df49
# Parent  e22aeb8a017723a74c7aa44dc979d7d115b9ac82
vtd: interrupt remapping: be more defensive

1) A buggy BIOS may not report IOAPIC in DRHD. Currently we still try
to enable IR while the IOAPIC RTEs are still in non-remappable format
and the host would hang. The patch detects this case and will not try
to enable IR.

2) Currently HPET's MSI mode doesn't work if IR is enabled because we
have no code to allocate IRTE for it. Luckily this HW configuration is
rather rarely at present, we can just work it around by only using
HPET's IOAPIC mode for now.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
xen-unstable changeset:   20974:3b475d9ed6b5
xen-unstable date:        Wed Feb 24 10:59:37 2010 +0000
---
 xen/arch/x86/hpet.c                 |    8 ++++++++
 xen/drivers/passthrough/vtd/iommu.c |   17 +++++++++++++++++
 2 files changed, 25 insertions(+)

diff -r e22aeb8a0177 -r 8101ab9db4de xen/arch/x86/hpet.c
--- a/xen/arch/x86/hpet.c       Wed Feb 24 11:11:36 2010 +0000
+++ b/xen/arch/x86/hpet.c       Wed Feb 24 11:12:56 2010 +0000
@@ -377,6 +377,14 @@ static int hpet_fsb_cap_lookup(void)
     unsigned int id;
     unsigned int num_chs, num_chs_used;
     int i;
+
+    /* TODO. */
+    if ( iommu_intremap )
+    {
+        printk(XENLOG_INFO "HPET's MSI mode hasn't been supported when "
+            "Interrupt Remapping is enabled.\n");
+        return 0;
+    }
 
     id = hpet_read32(HPET_ID);
 
diff -r e22aeb8a0177 -r 8101ab9db4de xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Wed Feb 24 11:11:36 2010 +0000
+++ b/xen/drivers/passthrough/vtd/iommu.c       Wed Feb 24 11:12:56 2010 +0000
@@ -1702,6 +1702,23 @@ static int init_vtd_hw(void)
 
     if ( iommu_intremap )
     {
+        int apic;
+        for ( apic = 0; apic < nr_ioapics; apic++ )
+        {
+            if ( ioapic_to_iommu(IO_APIC_ID(apic)) == NULL )
+            {
+                iommu_intremap = 0;
+                dprintk(XENLOG_ERR VTDPREFIX,
+                    "ioapic_to_iommu: ioapic 0x%x (id: 0x%x) is NULL! "
+                    "Will not try to enable Interrupt Remapping.\n",
+                    apic, IO_APIC_ID(apic));
+                break;
+            }
+        }
+    }
+
+    if ( iommu_intremap )
+    {
         for_each_drhd_unit ( drhd )
         {
             iommu = drhd->iommu;

_______________________________________________
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.4-testing] vtd: interrupt remapping: be more defensive, Xen patchbot-3.4-testing <=