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: Fix check for interrupt remapping of

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] vtd: Fix check for interrupt remapping of ioapic RTE
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 26 Sep 2008 07:10:13 -0700
Delivery-date: Fri, 26 Sep 2008 07:10:01 -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 1222423949 -3600
# Node ID 5274aa966231ad5f050987e1fb00c6f6ee75a007
# Parent  b642e39d96cf62731c37d29fdf2dea9fe512e3e9
vtd: Fix check for interrupt remapping of ioapic RTE

For IOAPIC interrupt remapping, it only needs to remap ioapci RTE,
should not remap other IOAPIC registers, which are IOAPIC ID, VERSION
and Arbitration ID. This patch adds the check for this and only remap
ioapci RTE.

Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/include/asm-x86/io_apic.h |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff -r b642e39d96cf -r 5274aa966231 xen/include/asm-x86/io_apic.h
--- a/xen/include/asm-x86/io_apic.h     Thu Sep 25 17:41:29 2008 +0100
+++ b/xen/include/asm-x86/io_apic.h     Fri Sep 26 11:12:29 2008 +0100
@@ -123,9 +123,12 @@ extern struct mpc_config_intsrc mp_irqs[
 /* non-0 if default (table-less) MP configuration */
 extern int mpc_default_type;
 
+/* Only need to remap ioapic RTE (reg: 10~3Fh) */
+#define ioapic_reg_remapped(reg) (iommu_enabled && ((reg) >= 0x10))
+
 static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
 {
-       if (iommu_enabled)
+       if (ioapic_reg_remapped(reg))
                return io_apic_read_remap_rte(apic, reg);
        *IO_APIC_BASE(apic) = reg;
        return *(IO_APIC_BASE(apic)+4);
@@ -133,7 +136,7 @@ static inline unsigned int io_apic_read(
 
 static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned 
int value)
 {
-       if (iommu_enabled)
+       if (ioapic_reg_remapped(reg))
                return iommu_update_ire_from_apic(apic, reg, value);
        *IO_APIC_BASE(apic) = reg;
        *(IO_APIC_BASE(apic)+4) = value;
@@ -152,7 +155,7 @@ extern int sis_apic_bug;
 #endif
 static inline void io_apic_modify(unsigned int apic, unsigned int reg, 
unsigned int value)
 {
-       if (iommu_enabled)
+       if (ioapic_reg_remapped(reg))
                return iommu_update_ire_from_apic(apic, reg, value);
        if (sis_apic_bug)
                *IO_APIC_BASE(apic) = reg;

_______________________________________________
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: Fix check for interrupt remapping of ioapic RTE, Xen patchbot-unstable <=