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

[Xen-changelog] [xen-unstable] IOMMU: fail HPET MSI setup on AMD


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Fri, 19 Oct 2012 22:11:25 +0000
  • Delivery-date: Fri, 19 Oct 2012 22:11:31 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1350658284 -7200
# Node ID 478ba3f146df23d2cfa95fc603d0b4b9d21ba15d
# Parent  3fa2ab30bb05297f30d9a33b30f29db960900971
IOMMU: fail HPET MSI setup on AMD

While the MSI message format doesn't need adjustment for AMD IOMMUs,
the interrupt remapping tables still need updating. The respective code
has to be able to determine the IOMMU responsible, which currently
requires an associated PCI device. The absence of that device in the
HPET case causes the code to crash, and the code determining the source
ID to be used for HPETs (parse_ivhd_device_special() afaict) isn't even
looking at whether it's dealing with an IO-APIC or a HPET (i.e. ignores
the "variety" structure member). If I tried to fix that, I would have
no way to test that I did things right, so all I can do to fix the
crash is make the setup fail if the IOMMU did not provide a handler
(which, considering the above, is the right thing anyway).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Wei Wang <wei.wang2@xxxxxxx>
---


diff -r 3fa2ab30bb05 -r 478ba3f146df xen/drivers/passthrough/iommu.c
--- a/xen/drivers/passthrough/iommu.c   Thu Oct 18 09:35:11 2012 +0100
+++ b/xen/drivers/passthrough/iommu.c   Fri Oct 19 16:51:24 2012 +0200
@@ -498,7 +498,7 @@ unsigned int iommu_read_apic_from_ire(un
 int __init iommu_setup_hpet_msi(struct msi_desc *msi)
 {
     const struct iommu_ops *ops = iommu_get_ops();
-    return ops->setup_hpet_msi ? ops->setup_hpet_msi(msi) : 0;
+    return ops->setup_hpet_msi ? ops->setup_hpet_msi(msi) : -ENODEV;
 }
 
 void iommu_resume()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.