debuggers.hg
changeset 17934:37ff3322d4f3
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@intel.com>
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@intel.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Fri Jun 27 14:11:41 2008 +0100 (2008-06-27) |
parents | baf3cc0faffc |
children | be52424a543e |
files | xen/drivers/passthrough/vtd/intremap.c |
line diff
1.1 --- a/xen/drivers/passthrough/vtd/intremap.c Fri Jun 27 14:03:52 2008 +0100 1.2 +++ b/xen/drivers/passthrough/vtd/intremap.c Fri Jun 27 14:11:41 2008 +0100 1.3 @@ -52,7 +52,7 @@ static void remap_entry_to_ioapic_rte( 1.4 unsigned long flags; 1.5 struct ir_ctrl *ir_ctrl = iommu_ir_ctrl(iommu); 1.6 1.7 - if ( ir_ctrl == NULL || ir_ctrl->iremap_index < 0 ) 1.8 + if ( ir_ctrl == NULL ) 1.9 { 1.10 dprintk(XENLOG_ERR VTDPREFIX, 1.11 "remap_entry_to_ioapic_rte: ir_ctl is not ready\n"); 1.12 @@ -170,7 +170,8 @@ unsigned int io_apic_read_remap_rte( 1.13 struct iommu *iommu = ioapic_to_iommu(mp_ioapics[apic].mpc_apicid); 1.14 struct ir_ctrl *ir_ctrl = iommu_ir_ctrl(iommu); 1.15 1.16 - if ( !iommu || !ir_ctrl || ir_ctrl->iremap_maddr == 0 ) 1.17 + if ( !iommu || !ir_ctrl || ir_ctrl->iremap_maddr == 0 || 1.18 + ir_ctrl->iremap_index == -1 ) 1.19 { 1.20 *IO_APIC_BASE(apic) = reg; 1.21 return *(IO_APIC_BASE(apic)+4);