Skip to content

Commit

Permalink
virtio: Use shared mappings for virtio PCI devices
Browse files Browse the repository at this point in the history
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 Sep 8, 2021
1 parent 4c92b87 commit 3f87064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/virtio/virtio_pci_modern_dev.c
Expand Up @@ -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",
Expand Down

0 comments on commit 3f87064

Please sign in to comment.