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 Aug 13, 2021
1 parent d62f0aa commit 0cc1e5f4768c949169e055da3b26a7fc342258e6
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_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 0cc1e5f

Please sign in to comment.