pci: apply workaround for Intel errata HSE43 and BDF2/BDX2
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 4 Dec 2018 13:04:54 +0000 (14:04 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 4 Dec 2018 13:04:54 +0000 (14:04 +0100)
commit70739427f55d595ad1c575c47fef00c81881e9a2
treeba5daf556104d0b0678cbf57176d208064befe50
parente59441b09790801eeaf215e1d98f47b7e9daca12
pci: apply workaround for Intel errata HSE43 and BDF2/BDX2

These errata affect the values read from the BAR registers, and could
render vPCI (and by extension PVH Dom0 unusable).

HSE43 is a Haswell erratum where a non-BAR register is implemented at
the position where the first BAR of the device should be found in a
Power Control Unit device. Note that there are no BARs on this device,
apart from the bogus CSR register positioned on top of the first BAR.

BDF2/BDX2 is a Broadwell erratum where BARs in the Home Agent device
will return bogus non-zero values.

In both cases the solution is to treat such devices as having no BARs
in the vPCI code.

Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/pci.c
xen/drivers/vpci/header.c
xen/include/xen/pci.h