Skip to content

vhost-vdpa: Add support for NO-IOMMU mode

Srujana Challa kvm virtualization 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesNew
  2. v22 patches 23 repliesSuperseded
  3. v11 patch 17 repliesSuperseded

Changes in v3 from the cover letter

- Resolved the sparse error reported by kernel test robot.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2vhost-vdpa: introduce module parameter for no-IOMMU modedrivers/vhost/vdpa.c+28 -00 replies
2/2vhost-vdpa: introduce NO-IOMMU backend feature bitdrivers/vhost/vdpa.c include/uapi/linux/vhost_types.h+12 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] vhost-vdpa: Add support for NO-IOMMU mode

This patchset introduces support for an UNSAFE, no-IOMMU mode in the vhost-vdpa driver. When enabled, this mode provides no device isolation, no DMA translation, no host kernel protection, and cannot be used for device assignment to virtual machines. It requires RAWIO permissions and will taint the kernel.

This mode requires enabling the "enable_vhost_vdpa_unsafe_noiommu_mode" option on the vhost-vdpa driver and also negotiate the feature flag VHOST_BACKEND_F_NOIOMMU. This mode would be useful to get better performance on specifice low end machines and can be leveraged by embedded platforms where applications run in controlled environment.

First patch introduces a module parameter "enable_vhost_vdpa_unsafe_noiommu_mode", while the second patch introduces a feature flag VHOST_BACKEND_F_NOIOMMU to the vhost vdpa driver to support NO-IOMMU mode.

This feature flag indicates to userspace that the driver can safely operate in NO-IOMMU mode. If the flag is not present, userspace should assume NO-IOMMU mode is unsupported and must not proceed.

v1->v2:
- Introduced new feature flag to vhost backend features for negotiating NO-IOMMU feature.
v1->v3:
- Resolved the sparse error reported by kernel test robot.

Srujana Challa (2):
vhost-vdpa: introduce module parameter for no-IOMMU mode
vhost-vdpa: introduce NO-IOMMU backend feature bit

 drivers/vhost/vdpa.c             | 39 +++++++++++++++++++++++++++++++-
 include/uapi/linux/vhost_types.h |  2 ++
 2 files changed, 40 insertions(+), 1 deletion(-)
Signature · 1 line
2.25.1