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] x86: x2apic pre-enabled but intr-remappin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: x2apic pre-enabled but intr-remapping is not enabled
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 2010 05:34:37 -0800
Delivery-date: Thu, 23 Dec 2010 05:43:09 -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@xxxxxxx>
# Date 1292414185 0
# Node ID fcc91cb3efcb83823b7e9c74ee3c97c4a9c0b7d5
# Parent  d4b373ec948bed71b8683e09e41c6afc99f1edb6
x86: x2apic pre-enabled but intr-remapping is not enabled

Make it aligned with Linux kernel.

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>

Removed unnecessary bits from the original patch, and removed
intremap_enabled() with its only caller gone.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/apic.c                    |   13 ++++---------
 xen/drivers/passthrough/vtd/intremap.c |   20 --------------------
 xen/include/xen/iommu.h                |    1 -
 3 files changed, 4 insertions(+), 30 deletions(-)

diff -r d4b373ec948b -r fcc91cb3efcb xen/arch/x86/apic.c
--- a/xen/arch/x86/apic.c       Wed Dec 15 11:55:48 2010 +0000
+++ b/xen/arch/x86/apic.c       Wed Dec 15 11:56:25 2010 +0000
@@ -967,15 +967,6 @@ void x2apic_setup(void)
     rdmsrl(MSR_IA32_APICBASE, msr_content);
     if ( msr_content & MSR_IA32_APICBASE_EXTD )
     {
-        /*
-         * Interrupt remapping should be also enabled by BIOS when
-         * x2APIC is already enabled by BIOS, otherwise it's a BIOS
-         * bug
-         */
-        if ( !intremap_enabled() )
-            panic("Interrupt remapping is not enabled by BIOS while "
-                  "x2APIC is already enabled by BIOS!\n");
-
         printk("x2APIC mode is already enabled by BIOS.\n");
         x2apic_enabled = 1;
     }
@@ -1018,6 +1009,10 @@ void x2apic_setup(void)
 
     if ( iommu_enable_IR() )
     {
+        if ( x2apic_enabled )
+            panic("Interrupt remapping could not be enabled while "
+                  "x2APIC is already enabled by BIOS!\n");
+
         printk("Would not enable x2APIC due to interrupt remapping "
                "cannot be enabled.\n");
         goto restore_out;
diff -r d4b373ec948b -r fcc91cb3efcb xen/drivers/passthrough/vtd/intremap.c
--- a/xen/drivers/passthrough/vtd/intremap.c    Wed Dec 15 11:55:48 2010 +0000
+++ b/xen/drivers/passthrough/vtd/intremap.c    Wed Dec 15 11:56:25 2010 +0000
@@ -894,23 +894,3 @@ void iommu_disable_IR(void)
     for_each_drhd_unit ( drhd )
         disable_qinval(drhd->iommu);
 }
-
-/*
- * Check if interrupt remapping is enabled or not
- * return 1: enabled
- * return 0: not enabled
- */
-int intremap_enabled(void)
-{
-    struct acpi_drhd_unit *drhd;
-    u32 sts;
-
-    for_each_drhd_unit ( drhd )
-    {
-        sts = dmar_readl(drhd->iommu->reg, DMAR_GSTS_REG);
-        if ( !(sts & DMA_GSTS_IRES) )
-            return 0;
-    }
-
-    return 1;
-}
diff -r d4b373ec948b -r fcc91cb3efcb xen/include/xen/iommu.h
--- a/xen/include/xen/iommu.h   Wed Dec 15 11:55:48 2010 +0000
+++ b/xen/include/xen/iommu.h   Wed Dec 15 11:56:25 2010 +0000
@@ -64,7 +64,6 @@ int iommu_supports_eim(void);
 int iommu_supports_eim(void);
 int iommu_enable_IR(void);
 void iommu_disable_IR(void);
-int intremap_enabled(void);
 
 int iommu_add_device(struct pci_dev *pdev);
 int iommu_remove_device(struct pci_dev *pdev);

_______________________________________________
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] x86: x2apic pre-enabled but intr-remapping is not enabled, Xen patchbot-unstable <=