Skip to content
Permalink
Browse files
virtio: Use shared mappings for virtio PCI devices
In a TDX guest the pci device mappings of virtio must be shared
with the host, so use explicit shared mappings.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
  • Loading branch information
Andi Kleen authored and Kuppuswamy Sathyanarayanan committed Oct 19, 2021
1 parent ad71023 commit 4abfd963687d3a538e1c7e0d3a93dabeb0637660
Showing 1 changed file with 1 addition and 1 deletion.
@@ -83,7 +83,7 @@ vp_modern_map_capability(struct virtio_pci_modern_device *mdev, int off,
return NULL;
}

p = pci_iomap_range(dev, bar, offset, length);
p = pci_iomap_host_shared_range(dev, bar, offset, length);
if (!p)
dev_err(&dev->dev,
"virtio_pci: unable to map virtio %u@%u on bar %i\n",

0 comments on commit 4abfd96

Please sign in to comment.