diff options
author | Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> | 2013-09-30 14:00:44 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-09-30 14:00:44 +0200 |
commit | 0a6b415d5212af68249ddf41a20dfc3998c8d670 (patch) | |
tree | 8a7a3622abf816ce766078936b4ef021c3cf4844 /xen/drivers/passthrough/amd/iommu_intr.c | |
parent | 93be8285a79c6cbbf66c8681fec1d1bfb71d84cc (diff) | |
download | xen-0a6b415d5212af68249ddf41a20dfc3998c8d670.tar.gz xen-0a6b415d5212af68249ddf41a20dfc3998c8d670.tar.bz2 xen-0a6b415d5212af68249ddf41a20dfc3998c8d670.zip |
x86/AMD-Vi: Fix IVRS HPET special->handle override
The current logic does not handle the case when HPET special->handle
is invalid in IVRS. On such system, the following message is shown:
(XEN) AMD-Vi: Failed to setup HPET MSI remapping: Wrong HPET
This patch will allow the ivrs_hpet[<handle>]=<sbdf> to override the
IVRS. Also, it removes struct hpet_sbdf.iommu since it is not
used anywhere in the code.
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Diffstat (limited to 'xen/drivers/passthrough/amd/iommu_intr.c')
-rw-r--r-- | xen/drivers/passthrough/amd/iommu_intr.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/xen/drivers/passthrough/amd/iommu_intr.c b/xen/drivers/passthrough/amd/iommu_intr.c index 213f4d7bab..c1b76fb9d0 100644 --- a/xen/drivers/passthrough/amd/iommu_intr.c +++ b/xen/drivers/passthrough/amd/iommu_intr.c @@ -598,10 +598,16 @@ int __init amd_setup_hpet_msi(struct msi_desc *msi_desc) unsigned long flags; int rc = 0; - if ( msi_desc->hpet_id != hpet_sbdf.id || !hpet_sbdf.iommu ) + if ( hpet_sbdf.init == HPET_NONE ) { - AMD_IOMMU_DEBUG("Failed to setup HPET MSI remapping: %s\n", - hpet_sbdf.iommu ? "Wrong HPET" : "No IOMMU"); + AMD_IOMMU_DEBUG("Failed to setup HPET MSI remapping." + " Missing IVRS HPET info.\n"); + return -ENODEV; + } + if ( msi_desc->hpet_id != hpet_sbdf.id ) + { + AMD_IOMMU_DEBUG("Failed to setup HPET MSI remapping." + " Wrong HPET.\n"); return -ENODEV; } |