Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-08-10 Thread Christoph Hellwig
sev_active() is gone now in linux-next, at least as a global API. And once again this is entirely going in the wrong direction. The only way using the DMA API is going to work at all is if the device is ready for it. So we need a flag on the virtio device, exposed by the hypervisor (or hardware

RE: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-08-10 Thread Ram Pai
On Sat, Aug 10, 2019 at 02:57:17PM -0400, Michael S. Tsirkin wrote: > On Tue, Jan 29, 2019 at 03:08:12PM -0200, Thiago Jung Bauermann wrote: > > > > Hello, > > > > With Christoph's rework of the DMA API that recently landed, the patch > > below is the only change needed in virtio to make it work

Re: [PATCH V5 0/9] Fixes for vhost metadata acceleration

2019-08-10 Thread Michael S. Tsirkin
On Thu, Aug 08, 2019 at 08:54:54PM +0800, Jason Wang wrote: > I don't have any objection to convertĀ  to spinlock() but just want to > know if any case that the above smp_mb() + counter looks good to you? So how about we try this: - revert the original patch for this release - new safe patch with

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-08-10 Thread Michael S. Tsirkin
On Tue, Jan 29, 2019 at 03:08:12PM -0200, Thiago Jung Bauermann wrote: > > Hello, > > With Christoph's rework of the DMA API that recently landed, the patch > below is the only change needed in virtio to make it work in a POWER > secure guest under the ultravisor. > > The other change we need

Re: [PATCH v3 1/2] virtio_console: free unused buffers with port delete

2019-08-10 Thread Michael S. Tsirkin
On Fri, Aug 09, 2019 at 12:18:46PM +0530, Pankaj Gupta wrote: > The commit a7a69ec0d8e4 ("virtio_console: free buffers after reset") > deferred detaching of unused buffer to virtio device unplug time. > This causes unplug/replug of single port in virtio device with an > error "Error allocating

Re: [PATCH v3 2/2] virtio: decrement avail idx with buffer detach for packed ring

2019-08-10 Thread Michael S. Tsirkin
On Fri, Aug 09, 2019 at 12:18:47PM +0530, Pankaj Gupta wrote: > This patch decrements 'next_avail_idx' count when detaching a buffer > from vq for packed ring code. Split ring code already does this in > virtqueue_detach_unused_buf_split function. This updates the > 'next_avail_idx' to the

Re: [PATCH V5 0/9] Fixes for vhost metadata acceleration

2019-08-10 Thread Michael S. Tsirkin
On Fri, Aug 09, 2019 at 01:48:42AM -0400, Jason Wang wrote: > Hi all: > > This series try to fix several issues introduced by meta data > accelreation series. Please review. > > Changes from V4: > - switch to use spinlock synchronize MMU notifier with accessors > > Changes from V3: > - remove

Re: [PATCH] drm/virtio: use virtio_max_dma_size

2019-08-10 Thread Christoph Hellwig
On Thu, Aug 08, 2019 at 05:34:45PM +0200, Gerd Hoffmann wrote: > We must make sure our scatterlist segments are not too big, otherwise > we might see swiotlb failures (happens with sev, also reproducable with > swiotlb=force). Btw, any chance I could also draft you to replace the remaining abuses

Re: [PATCH] vhost: do not reference a file that does not exist

2019-08-10 Thread Christoph Hellwig
On Wed, Aug 07, 2019 at 05:52:55PM -0700, egran...@chromium.org wrote: > From: Enrico Granata > > lguest was removed from the mainline kernel in late 2017. > > Signed-off-by: Enrico Granata But this particular file even has an override in the script looking for dead references, which together

Re: [PATCH v4 0/5] iommu/amd: Convert the AMD iommu driver to the dma-iommu api

2019-08-10 Thread Christoph Hellwig
On Sun, Jun 23, 2019 at 11:19:45PM -0700, Christoph Hellwig wrote: > Tom, > > next time please cc Jerg as the AMD IOMMU maintainer. > > Joerg, any chance you could review this? Toms patches to convert the > AMD and Intel IOMMU drivers to the dma-iommu code are going to make my > life in DMA