IOMMU: fail HPET MSI setup on AMD
authorJan Beulich <jbeulich@suse.com>
Fri, 19 Oct 2012 14:51:24 +0000 (16:51 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 19 Oct 2012 14:51:24 +0000 (16:51 +0200)
commit497f6ad7f0b04b265bcccf2624f798556ab3cafb
treea24674a333547687c66e4aa64141362dbddef8f9
parentccf1c30d488193abb7875d470015a86acc9d45b0
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@suse.com>
Acked-by: Wei Wang <wei.wang2@amd.com>
xen/drivers/passthrough/iommu.c