Re: [PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers

2019-12-11 Thread Paolo Bonzini
On 12/12/19 00:05, Michael S. Tsirkin wrote: >> @@ -405,6 +405,9 @@ static int virtblk_getgeo(struct block_device *bd, >> struct hd_geometry *geo) >> >> static const struct block_device_operations virtblk_fops = { >> .ioctl = virtblk_ioctl, >> +#ifdef CONFIG_COMPAT >> +.compat_ioctl =

Re: [PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers

2019-12-11 Thread Michael S. Tsirkin
On Wed, Dec 11, 2019 at 09:42:49PM +0100, Arnd Bergmann wrote: > Each driver calling scsi_ioctl() gets an equivalent compat_ioctl() > handler that implements the same commands by calling scsi_compat_ioctl(). > > The scsi_cmd_ioctl() and scsi_cmd_blk_ioctl() functions are compatible > at this point

Re: [PATCH net-next v2 0/6] vsock: add local transport support

2019-12-11 Thread David Miller
From: Stefano Garzarella Date: Tue, 10 Dec 2019 11:43:01 +0100 > v2: > - style fixes [Dave] > - removed RCU sync and changed 'the_vsock_loopback' in a global >static variable [Stefan] > - use G2H transport when local transport is not loaded and remote cid >is VMADDR_CID_LOCAL [Stefan]

[PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers

2019-12-11 Thread Arnd Bergmann
Each driver calling scsi_ioctl() gets an equivalent compat_ioctl() handler that implements the same commands by calling scsi_compat_ioctl(). The scsi_cmd_ioctl() and scsi_cmd_blk_ioctl() functions are compatible at this point, so any driver that calls those can do so for both native and compat mod

[PATCH 00/24] block, scsi: final compat_ioctl cleanup

2019-12-11 Thread Arnd Bergmann
Hi Jens, James and Martin, This series concludes the work I did for linux-5.5 on the compat_ioctl() cleanup, killing off fs/compat_ioctl.c and block/compat_ioctl.c by moving everything into drivers. Overall this would be a reduction both in complexity and line count, but as I'm also adding docume

Re: [PATCH 3/3] virtio-gpu: use damage info for display updates.

2019-12-11 Thread Chia-I Wu
On Wed, Dec 11, 2019 at 12:42 AM Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/virtio/virtgpu_plane.c | 41 +++--- > 1 file changed, 24 insertions(+), 17 deletions(-) > > diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c > b/drivers/gpu/drm/

Re: [PATCH 1/3] drm/virtio: skip set_scanout if framebuffer didn't change

2019-12-11 Thread Chia-I Wu
On Wed, Dec 11, 2019 at 12:42 AM Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/virtio/virtgpu_plane.c | 31 ++ > 1 file changed, 17 insertions(+), 14 deletions(-) > > diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c > b/drivers/gpu/drm/

Re: [PATCH] vhost/vsock: accept only packets with the right dst_cid

2019-12-11 Thread Michael S. Tsirkin
On Fri, Dec 06, 2019 at 03:39:12PM +0100, Stefano Garzarella wrote: > When we receive a new packet from the guest, we check if the > src_cid is correct, but we forgot to check the dst_cid. > > The host should accept only packets where dst_cid is > equal to the host CID. > > Signed-off-by: Stefano

Re: [PATCH v2 5/5] iommu: virtio: Use iommu_put_resv_regions_simple()

2019-12-11 Thread Jean-Philippe Brucker
On Mon, Dec 09, 2019 at 03:50:07PM +0100, Thierry Reding wrote: > From: Thierry Reding > > Use the new standard function instead of open-coding it. > > Cc: Jean-Philippe Brucker > Cc: virtualization@lists.linux-foundation.org > Signed-off-by: Thierry Reding Reviewed-by: Jean-Philippe Brucker

[PATCH v3 3/4] drm/virtio: fix mmap page attributes

2019-12-11 Thread Gerd Hoffmann
virtio-gpu uses cached mappings, set virtio_gpu_gem_funcs.pgprot accordingly. Reported-by: Gurchetan Singh Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virt

Re: [PATCH v3] virtio-balloon: fix managed page counts when migrating pages between zones

2019-12-11 Thread Michael S. Tsirkin
On Wed, Dec 11, 2019 at 12:11:52PM +0100, David Hildenbrand wrote: > In case we have to migrate a ballon page to a newpage of another zone, the > managed page count of both zones is wrong. Paired with memory offlining > (which will adjust the managed page count), we can trigger kernel crashes > and

[PATCH v3] virtio-balloon: fix managed page counts when migrating pages between zones

2019-12-11 Thread David Hildenbrand
In case we have to migrate a ballon page to a newpage of another zone, the managed page count of both zones is wrong. Paired with memory offlining (which will adjust the managed page count), we can trigger kernel crashes and all kinds of different symptoms. One way to reproduce: 1. Start a QEMU gu

[PATCH 2/3] virtio-gpu: batch display update commands.

2019-12-11 Thread Gerd Hoffmann
When the driver submits multiple commands in a row it makes sense to notify the host only after submitting the last one, so the host can process them all at once, with a single vmexit. Add functions to enable/disable notifications to allow that. Use the new functions for primary plane updates. S

[PATCH 1/3] drm/virtio: skip set_scanout if framebuffer didn't change

2019-12-11 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_plane.c | 31 ++ 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index bc4bc4475a8c..a0f91658c2bc 100644 --- a/d

[PATCH 3/3] virtio-gpu: use damage info for display updates.

2019-12-11 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_plane.c | 41 +++--- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index 2e0d14e005db..1a0fbbb91ec7 100644 --- a/d

[PATCH v2 2/2] drm/virtio: fix mmap page attributes

2019-12-11 Thread Gerd Hoffmann
virtio-gpu uses cached mappings, set shmem->caching accordingly. Reported-by: Gurchetan Singh Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_ob

Re: [PATCH] drm/virtio: fix mmap page attributes

2019-12-11 Thread Gerd Hoffmann
Hi, > There's similar code in udl, [1] which still uses writecombine for > imported buffers. Virtio does not need this? virtio doesn't support dma-buf imports (yet). So no worries for now. Why pick writecombine for the imported buffer btw? It'll probably be correct for the majority of imports,