Re: [PATCH] vhost: Don't use defined in VHOST_ARCH_CAN_ACCEL_UACCESS definition

2019-06-06 Thread Michael S. Tsirkin
On Thu, Jun 06, 2019 at 09:12:23AM -0700, Nathan Chancellor wrote: > Clang warns: > > drivers/vhost/vhost.c:2085:5: warning: macro expansion producing > 'defined' has undefined behavior [-Wexpansion-to-defined] > #if VHOST_ARCH_CAN_ACCEL_UACCESS > ^ > drivers/vhost/vhost.h:98:38: not

[PATCH v4 6/8] virtio/s390: add indirection to indicators access

2019-06-06 Thread Halil Pasic
This will come in handy soon when we pull out the indicators from virtio_ccw_device to a memory area that is shared with the hypervisor (in particular for protected virtualization guests). Signed-off-by: Halil Pasic Reviewed-by: Pierre Morel Reviewed-by: Cornelia Huck --- drivers/s390/virtio/v

[PATCH v4 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers

2019-06-06 Thread Halil Pasic
Before virtio-ccw could get away with not using DMA API for the pieces of memory it does ccw I/O with. With protected virtualization this has to change, since the hypervisor needs to read and sometimes also write these pieces of memory. The hypervisor is supposed to poke the classic notifiers, if

[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts

2019-06-06 Thread Halil Pasic
Protected virtualization guests have to use shared pages for airq notifier bit vectors, because hypervisor needs to write these bits. Let us make sure we allocate DMA memory for the notifier bit vectors by replacing the kmem_cache with a dma_cache and kalloc() with cio_dma_zalloc(). Signed-off-by

[PATCH v4 8/8] virtio/s390: make airq summary indicators DMA

2019-06-06 Thread Halil Pasic
Hypervisor needs to interact with the summary indicators, so these need to be DMA memory as well (at least for protected virtualization guests). Signed-off-by: Halil Pasic --- drivers/s390/virtio/virtio_ccw.c | 32 1 file changed, 24 insertions(+), 8 deletions(-)

[PATCH v4 2/8] s390/cio: introduce DMA pools to cio

2019-06-06 Thread Halil Pasic
To support protected virtualization cio will need to make sure the memory used for communication with the hypervisor is DMA memory. Let us introduce one global pool for cio. Our DMA pools are implemented as a gen_pool backed with DMA pages. The idea is to avoid each allocation effectively wasting

[PATCH v4 5/8] virtio/s390: use cacheline aligned airq bit vectors

2019-06-06 Thread Halil Pasic
The flag AIRQ_IV_CACHELINE was recently added to airq_iv_create(). Let us use it! We actually wanted the vector to span a cacheline all along. Signed-off-by: Halil Pasic Reviewed-by: Christian Borntraeger Reviewed-by: Cornelia Huck --- drivers/s390/virtio/virtio_ccw.c | 3 ++- 1 file changed,

[PATCH v4 0/8] s390: virtio: support protected virtualization

2019-06-06 Thread Halil Pasic
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (

[PATCH v4 3/8] s390/cio: add basic protected virtualization support

2019-06-06 Thread Halil Pasic
As virtio-ccw devices are channel devices, we need to use the dma area within the common I/O layer for any communication with the hypervisor. Note that we do not need to use that area for control blocks directly referenced by instructions, e.g. the orb. It handles neither QDIO in the common code,

[PATCH v4 1/8] s390/mm: force swiotlb for protected virtualization

2019-06-06 Thread Halil Pasic
On s390, protected virtualization guests have to use bounced I/O buffers. That requires some plumbing. Let us make sure, any device that uses DMA API with direct ops correctly is spared from the problems, that a hypervisor attempting I/O to a non-shared page would bring. Signed-off-by: Halil Pas

Re: [PATCH 12/13] drm/virtio: drop DRM_AUTH usage from the driver

2019-06-06 Thread Emil Velikov
On Mon, 27 May 2019 at 09:19, Emil Velikov wrote: > > From: Emil Velikov > > The authentication can be circumvented, by design, by using the render > node. > > From the driver POV there is no distinction between primary and render > nodes, thus we can drop the token. > > Cc: Gerd Hoffmann > Cc:

Re: [PATCH 3/4] vsock/virtio: fix flush of works during the .remove()

2019-06-06 Thread Stefano Garzarella
On Fri, May 31, 2019 at 05:56:39PM +0800, Jason Wang wrote: > On 2019/5/31 下午4:18, Stefano Garzarella wrote: > > On Thu, May 30, 2019 at 07:59:14PM +0800, Jason Wang wrote: > > > On 2019/5/30 下午6:10, Stefano Garzarella wrote: > > > > On Thu, May 30, 2019 at 05:46:18PM +0800, Jason Wang wrote: > > >

Re: [PATCH 4/4] drm/virtio: Add memory barriers for capset cache.

2019-06-06 Thread Gerd Hoffmann
On Wed, Jun 05, 2019 at 04:44:23PM -0700, davidri...@chromium.org wrote: > From: David Riley > > After data is copied to the cache entry, atomic_set is used indicate > that the data is the entry is valid without appropriate memory barriers. > Similarly the read side was missing the same memory ba