mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-07-07 10:15:45 +00:00
When running a TDX guest, we need the virtio drivers to use the DMA API to share specific memory pages with the VMM on the host. The point is to let the VMM get access to the pages related to the buffers pointed by the virtqueues. The way to force the virtio drivers to use the DMA API is by exposing the virtio devices with the feature VIRTIO_F_IOMMU_PLATFORM. This is a feature indicating the device will require some address translation, as it will not deal directly with physical addresses. Cloud Hypervisor takes care of this requirement by adding a generic parameter called "force_iommu". This parameter value is decided based on the "tdx" feature gate, and then passed to the DeviceManager. It's up to the DeviceManager to use this parameter on every virtio device creation, which will imply setting the VIRTIO_F_IOMMU_PLATFORM feature. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |