[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] vt-d: Minor fixing of interrupt remapping



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1214572301 -3600
# Node ID 37ff3322d4f345b5678e3d920fad90efcd16ca68
# Parent  baf3cc0faffc51a6a2619ddf665b12ab0963c868
vt-d: Minor fixing of interrupt remapping
When ir_ctrl->iremap_index == -1, it means there is no remap
entry. So it needn't to convert from remap format to normal ioapic
format.

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

diff -r baf3cc0faffc -r 37ff3322d4f3 xen/drivers/passthrough/vtd/intremap.c
--- a/xen/drivers/passthrough/vtd/intremap.c    Fri Jun 27 14:03:52 2008 +0100
+++ b/xen/drivers/passthrough/vtd/intremap.c    Fri Jun 27 14:11:41 2008 +0100
@@ -52,7 +52,7 @@ static void remap_entry_to_ioapic_rte(
     unsigned long flags;
     struct ir_ctrl *ir_ctrl = iommu_ir_ctrl(iommu);
 
-    if ( ir_ctrl == NULL || ir_ctrl->iremap_index < 0 )
+    if ( ir_ctrl == NULL )
     {
         dprintk(XENLOG_ERR VTDPREFIX,
                 "remap_entry_to_ioapic_rte: ir_ctl is not ready\n");
@@ -170,7 +170,8 @@ unsigned int io_apic_read_remap_rte(
     struct iommu *iommu = ioapic_to_iommu(mp_ioapics[apic].mpc_apicid);
     struct ir_ctrl *ir_ctrl = iommu_ir_ctrl(iommu);
 
-    if ( !iommu || !ir_ctrl || ir_ctrl->iremap_maddr == 0 )
+    if ( !iommu || !ir_ctrl || ir_ctrl->iremap_maddr == 0 ||
+         ir_ctrl->iremap_index == -1 )
     {
         *IO_APIC_BASE(apic) = reg;
         return *(IO_APIC_BASE(apic)+4);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.