From: Bhavna Sarathy <bnagendr@redhat.com> Date: Mon, 8 Jun 2009 15:37:19 -0400 Subject: [x86_64] iommu: fix the handling of device aliases Message-id: 20090608193823.7837.61546.sendpatchset@localhost.localdomain O-Subject: [RHEL5.4 PATCH 2/5] [KVM] Fix the handling of device aliases in AMD IOMMU driver Bugzilla: 501571 RH-Acked-by: Rik van Riel <riel@redhat.com> RH-Acked-by: Juan Quintela <quintela@redhat.com> RH-Acked-by: Don Dutile <ddutile@redhat.com> Resolves BZ 501571 The devid parameter to set_dev_entry_from_acpi is the requester ID rather than the device ID since it is used to index the IOMMU device table. The handling of IVHD_DEV_ALIAS used to pass the device ID. This patch fixes it to pass the requester ID. diff --git a/arch/x86_64/kernel/amd_iommu_init.c b/arch/x86_64/kernel/amd_iommu_init.c index d9c195e..23cab50 100644 --- a/arch/x86_64/kernel/amd_iommu_init.c +++ b/arch/x86_64/kernel/amd_iommu_init.c @@ -618,7 +618,7 @@ static void __init init_iommu_from_acpi(struct amd_iommu *iommu, case IVHD_DEV_ALIAS: devid = e->devid; devid_to = e->ext >> 8; - set_dev_entry_from_acpi(iommu, devid, e->flags, 0); + set_dev_entry_from_acpi(iommu, devid_to, e->flags, 0); amd_iommu_alias_table[devid] = devid_to; break; case IVHD_DEV_ALIAS_RANGE: