]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: vmd: Filter resource type bits from shadow register
authorJon Derrick <jonathan.derrick@intel.com>
Thu, 28 May 2020 03:02:39 +0000 (23:02 -0400)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 29 May 2020 16:05:06 +0000 (17:05 +0100)
commit8141c5f6173de261a6659c448b34ebddf155a6e3
tree8ed1eafbf68b0398f87879fdd91d9a523bc245ef
parent9b8057e7f937f20763a90a8fc2333168af101732
PCI: vmd: Filter resource type bits from shadow register

Versions of VMD with the Host Physical Address shadow register use this
register to calculate the bus address offset needed to do guest
passthrough of the domain. This register shadows the Host Physical
Address registers including the resource type bits. After calculating
the offset, the extra resource type bits lead to the VMD resources being
over-provisioned at the front and under-provisioned at the back.

Example:
pci 10000:80:02.0: reg 0x10: [mem 0xf801fffc-0xf803fffb 64bit]

Expected:
pci 10000:80:02.0: reg 0x10: [mem 0xf8020000-0xf803ffff 64bit]

If other devices are mapped in the over-provisioned front, it could lead
to resource conflict issues with VMD or those devices.

Link: https://lore.kernel.org/r/20200528030240.16024-3-jonathan.derrick@intel.com
Fixes: e7e737ab649a7 ("PCI: vmd: Fix shadow offsets to reflect spec changes")
Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/controller/vmd.c