Merge branch 'remotes/lorenzo/pci/vmd'

- Fix vmd resource address calculation using Host Physical Address shadow
    register (Jon Derrick)

* remotes/lorenzo/pci/vmd:
  PCI: vmd: Filter resource type bits from shadow register
This commit is contained in:
Bjorn Helgaas 2020-06-04 12:59:20 -05:00
commit 2bd81cd04a
1 changed files with 4 additions and 2 deletions

View File

@ -445,9 +445,11 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
if (!membar2)
return -ENOMEM;
offset[0] = vmd->dev->resource[VMD_MEMBAR1].start -
readq(membar2 + MB2_SHADOW_OFFSET);
(readq(membar2 + MB2_SHADOW_OFFSET) &
PCI_BASE_ADDRESS_MEM_MASK);
offset[1] = vmd->dev->resource[VMD_MEMBAR2].start -
readq(membar2 + MB2_SHADOW_OFFSET + 8);
(readq(membar2 + MB2_SHADOW_OFFSET + 8) &
PCI_BASE_ADDRESS_MEM_MASK);
pci_iounmap(vmd->dev, membar2);
}
}