VT-d: apply quirks at device setup time rather than only at boot
authorJan Beulich <jbeulich@suse.com>
Tue, 20 May 2014 13:53:20 +0000 (15:53 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 May 2014 13:53:20 +0000 (15:53 +0200)
commit5786718fbaafbe47d72cc1512cd93de79b8fc2fa
treea0547a967cea9d72ce952dde00eb4fb2523fbfc2
parent4f3c0c93bcfae4e0834e64a22db823abbe9a83a6
VT-d: apply quirks at device setup time rather than only at boot

Accessing extended config space may not be possible at boot time, e.g.
when the memory space used by MMCFG is reserved only via ACPI tables,
but not in the E820/UEFI memory maps (which we need Dom0 to tell us
about). Consequently the change here still leaves the issue unaddressed
for systems where the extended config space remains inaccessible (due
to firmware bugs, i.e. not properly reserving the address space of
those regions).

With the respective messages now potentially getting logged more than
once, we ought to consider whether we should issue them only if we in
fact were required to do any masking (i.e. if the relevant mask bits
weren't already set).

This is CVE-2013-3495 / XSA-59.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
Acked-by: Yang Zhang <yang.z.zhang@intel.com>
xen/drivers/passthrough/vtd/extern.h
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/quirks.c