[lkml]   [2019]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/2] virtio_ring: Use DMA API if memory is encrypted
On Fri, Oct 11, 2019 at 06:25:19PM -0700, Ram Pai wrote:
> From: Thiago Jung Bauermann <>
> Normally, virtio enables DMA API with VIRTIO_F_IOMMU_PLATFORM, which must
> be set by both device and guest driver. However, as a hack, when DMA API
> returns physical addresses, guest driver can use the DMA API; even though
> device does not set VIRTIO_F_IOMMU_PLATFORM and just uses physical
> addresses.
> Doing this works-around POWER secure guests for which only the bounce
> buffer is accessible to the device, but which don't set
> VIRTIO_F_IOMMU_PLATFORM due to a set of hypervisor and architectural bugs.
> To guard against platform changes, breaking any of these assumptions down
> the road, we check at probe time and fail if that's not the case.
> cc: Benjamin Herrenschmidt <>
> cc: David Gibson <>
> cc: Michael Ellerman <>
> cc: Paul Mackerras <>
> cc: Michael Roth <>
> cc: Alexey Kardashevskiy <>
> cc: Jason Wang <>
> cc: Christoph Hellwig <>
> Suggested-by: Michael S. Tsirkin <>
> Signed-off-by: Ram Pai <>
> Signed-off-by: Thiago Jung Bauermann <>

Reviewed-by: David Gibson <>

I don't know that this is the most elegant solution possible. But
it's simple, gets the job done and pretty unlikely to cause mysterious
breakage down the road.

David Gibson | I'll have my music baroque, and my code
david AT | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2019-10-14 06:54    [W:0.157 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site