VT-d: protect against bogus information coming from BIOS
authorJan Beulich <jbeulich@suse.com>
Wed, 14 Aug 2013 09:18:24 +0000 (11:18 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 14 Aug 2013 09:18:24 +0000 (11:18 +0200)
commite8e8b030ecf916fea19639f0b6a446c1c9dbe174
tree91e33f84c768275ca45446ae4f00a0343acc6c81
parent0c006b41a283a0a569c863d44abde5aa5750ae01
VT-d: protect against bogus information coming from BIOS

Add checks similar to those done by Linux: The DRHD address must not
be all zeros or all ones (Linux only checks for zero), and capabilities
as well as extended capabilities must not be all ones.

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