[PATCH v4 1/2] drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer using fenced version.

2019-09-11 Thread David Riley
Factor function in preparation to generating scatterlist prior to locking. Signed-off-by: David Riley --- drivers/gpu/drm/virtio/virtgpu_vq.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c

[PATCH v4 0/2] drm/virtio: Use vmalloc for command buffer alllocations.

2019-09-11 Thread David Riley
Userspace requested command buffer allocations could be too large to make as a contiguous allocation. Use vmalloc if necessary to satisfy those allocations. v1: Initial version. v2: Properly account for number of free descriptors required. v3: Remove offset handling for vmalloc'd buffers. v4:

Re: [PATCH v3 1/2] drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer using fenced version.

2019-09-11 Thread David Riley
They were based off of Linus' https://github.com/torvalds/linux master from yesterday. I can rebase onto drm-misc-next. On Tue, Sep 10, 2019 at 10:12 PM Gerd Hoffmann wrote: > > On Tue, Sep 10, 2019 at 01:06:50PM -0700, David Riley wrote: > > Factor function in preparation to generating

[PATCH v4 2/2] drm/virtio: Use vmalloc for command buffer allocations.

2019-09-11 Thread David Riley
Userspace requested command buffer allocations could be too large to make as a contiguous allocation. Use vmalloc if necessary to satisfy those allocations. Signed-off-by: David Riley --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 4 +- drivers/gpu/drm/virtio/virtgpu_vq.c| 78

[vhost:linux-next 14/17] include/linux/mmzone.h:815:3: error: implicit declaration of function 'move_page_to_reported_list'; did you mean 'move_to_free_list'?

2019-09-11 Thread kbuild test robot
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/mst/vhost.git linux-next head: 39c226b6b576b23d6d558331e6895f02b0892555 commit: 50ed0c2ecb2e254a50e4ad775840f29d42cf6c00 [14/17] mm: Introduce Reported pages config: m68k-allmodconfig (attached as .config) compiler:

Re: [RFC PATCH 3/4] virtio: introudce a mdev based transport

2019-09-11 Thread Michael S. Tsirkin
On Wed, Sep 11, 2019 at 10:38:39AM +0800, Jason Wang wrote: > > On 2019/9/10 下午9:52, Michael S. Tsirkin wrote: > > On Tue, Sep 10, 2019 at 09:13:02PM +0800, Jason Wang wrote: > > > On 2019/9/10 下午6:01, Michael S. Tsirkin wrote: > > > > > +#ifndef _LINUX_VIRTIO_MDEV_H > > > > > +#define

Re: [RFC PATCH 3/4] virtio: introudce a mdev based transport

2019-09-11 Thread Jason Wang
On 2019/9/11 下午5:36, Michael S. Tsirkin wrote: On Wed, Sep 11, 2019 at 10:38:39AM +0800, Jason Wang wrote: On 2019/9/10 下午9:52, Michael S. Tsirkin wrote: On Tue, Sep 10, 2019 at 09:13:02PM +0800, Jason Wang wrote: On 2019/9/10 下午6:01, Michael S. Tsirkin wrote: +#ifndef _LINUX_VIRTIO_MDEV_H

[PATCH v2 4/4] drm/vram: Unconditonally set BO call-back functions

2019-09-11 Thread Thomas Zimmermann
The statement's condition is always true. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann --- drivers/gpu/drm/drm_gem_vram_helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c

[PATCH v2 2/4] drm/vram: Have VRAM MM call GEM VRAM functions directly

2019-09-11 Thread Thomas Zimmermann
VRAM MM and GEM VRAM buffer objects are only used with each other; connected via 3 function pointers. Simplify this code by making the memory manager call the rsp. functions of the BOs directly; and remove the functions from the BO's public interface. v2: * typos in commit message

[PATCH v2 3/4] drm/vram: Unexport internal functions of VRAM MM

2019-09-11 Thread Thomas Zimmermann
The init, cleanup and mmap functions of VRAM MM are only used internally. Remove them from the public interface. v2: * update for debugfs support Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann --- drivers/gpu/drm/drm_gem_vram_helper.c | 38 ---

[PATCH v2 1/4] drm/vram: Move VRAM memory manager to GEM VRAM implementation

2019-09-11 Thread Thomas Zimmermann
The separation between GEM VRAM objects and the memory manager is artificial, as they are only used with each other. Copying both implementations into the same file is a first step to simplifying the code. This patch only moves code without functional changes. v2: * update for debugfs

[PATCH v2 0/4] Merge VRAM MM and GEM VRAM source files

2019-09-11 Thread Thomas Zimmermann
VRAM MM and GEM VRAM are only used with each other. This patch set moves VRAM MM into GEM VRAM source files and cleans up the helper's public interface. Version 2 of the patch set doesn't contain functional changes. I'm reposting due to the rebasing onto the debugfs patches. v2: *

Re: [PATCH v2] virtio: add VIRTIO_RING_NO_LEGACY

2019-09-11 Thread Michael S. Tsirkin
On Tue, Sep 10, 2019 at 05:53:44PM +, Matej Genci wrote: > Add macro to disable legacy functions vring_init and vring_size. > > Signed-off-by: Matej Genci > --- > > V2: Put all legacy APIs inside guards. > > --- > include/uapi/linux/virtio_ring.h | 8 > 1 file changed, 8

Re: [PATCH v2] virtio: add VIRTIO_RING_NO_LEGACY

2019-09-11 Thread Michael S. Tsirkin
On Tue, Sep 10, 2019 at 05:53:44PM +, Matej Genci wrote: > Add macro to disable legacy functions vring_init and vring_size. > > Signed-off-by: Matej Genci And I guess we should be able to define this macro in drivers/virtio/virtio_pci_modern.c ? Will be handy to make sure we don't mask too

[vhost:linux-next 16/17] include/linux/page_reporting.h:9:34: note: in expansion of macro 'pageblock_order'

2019-09-11 Thread kbuild test robot
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/mst/vhost.git linux-next head: 39c226b6b576b23d6d558331e6895f02b0892555 commit: 990055c63121520ad29deca72b1167b392563ddd [16/17] virtio-balloon: Add support for providing unused page reports to host config: riscv-allmodconfig

[vhost:linux-next 8/9] drivers/vhost/vhost.c:2076:5: note: in expansion of macro 'array_index_nospec'

2019-09-11 Thread kbuild test robot
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/mst/vhost.git linux-next head: f2c4b499aecc0c5a1ec67f3a2a7310cb7168a8ab commit: 4c145987a955269da79312a79ec26638712644bb [8/9] vhost: block speculation of translated descriptors config: mips-malta_kvm_defconfig (attached as

[PATCH v2] vhost: block speculation of translated descriptors

2019-09-11 Thread Michael S. Tsirkin
iovec addresses coming from vhost are assumed to be pre-validated, but in fact can be speculated to a value out of range. Userspace address are later validated with array_index_nospec so we can be sure kernel info does not leak through these addresses, but vhost must also not leak userspace info

Re: [PATCH v2] vhost: block speculation of translated descriptors

2019-09-11 Thread Michal Hocko
On Wed 11-09-19 08:10:00, Michael S. Tsirkin wrote: > iovec addresses coming from vhost are assumed to be > pre-validated, but in fact can be speculated to a value > out of range. > > Userspace address are later validated with array_index_nospec so we can > be sure kernel info does not leak

Re: [PATCH v2] vhost: block speculation of translated descriptors

2019-09-11 Thread Michal Hocko
On Wed 11-09-19 09:03:10, Michael S. Tsirkin wrote: > On Wed, Sep 11, 2019 at 02:33:16PM +0200, Michal Hocko wrote: > > On Wed 11-09-19 08:25:03, Michael S. Tsirkin wrote: > > > On Wed, Sep 11, 2019 at 02:16:28PM +0200, Michal Hocko wrote: > > > > On Wed 11-09-19 08:10:00, Michael S. Tsirkin

Re: [PATCH v2] vhost: block speculation of translated descriptors

2019-09-11 Thread Michal Hocko
On Wed 11-09-19 08:25:03, Michael S. Tsirkin wrote: > On Wed, Sep 11, 2019 at 02:16:28PM +0200, Michal Hocko wrote: > > On Wed 11-09-19 08:10:00, Michael S. Tsirkin wrote: > > > iovec addresses coming from vhost are assumed to be > > > pre-validated, but in fact can be speculated to a value > > >

Re: [PATCH v2] vhost: block speculation of translated descriptors

2019-09-11 Thread Michael S. Tsirkin
On Wed, Sep 11, 2019 at 02:33:16PM +0200, Michal Hocko wrote: > On Wed 11-09-19 08:25:03, Michael S. Tsirkin wrote: > > On Wed, Sep 11, 2019 at 02:16:28PM +0200, Michal Hocko wrote: > > > On Wed 11-09-19 08:10:00, Michael S. Tsirkin wrote: > > > > iovec addresses coming from vhost are assumed to

Re: [PATCH v2] vhost: block speculation of translated descriptors

2019-09-11 Thread Michael S. Tsirkin
On Wed, Sep 11, 2019 at 02:16:28PM +0200, Michal Hocko wrote: > On Wed 11-09-19 08:10:00, Michael S. Tsirkin wrote: > > iovec addresses coming from vhost are assumed to be > > pre-validated, but in fact can be speculated to a value > > out of range. > > > > Userspace address are later validated

Re: [PATCH v5 0/4] virtio-fs: shared file system for virtual machines

2019-09-11 Thread Stefan Hajnoczi
On Tue, Sep 10, 2019 at 05:12:02PM +0200, Miklos Szeredi wrote: > Git tree for this version is available here: > > git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git#virtiofs-v5 > > Only post patches that actually add virtiofs (virtiofs-v5-base..virtiofs-v5). > > I've folded the

Re: [PATCH v2] vhost: block speculation of translated descriptors

2019-09-11 Thread Michael S. Tsirkin
On Wed, Sep 11, 2019 at 08:10:00AM -0400, Michael S. Tsirkin wrote: > iovec addresses coming from vhost are assumed to be > pre-validated, but in fact can be speculated to a value > out of range. > > Userspace address are later validated with array_index_nospec so we can > be sure kernel info

Re: [PATCH v2] vhost: block speculation of translated descriptors

2019-09-11 Thread Michael S. Tsirkin
On Wed, Sep 11, 2019 at 03:12:35PM +0200, Michal Hocko wrote: > On Wed 11-09-19 09:03:10, Michael S. Tsirkin wrote: > > On Wed, Sep 11, 2019 at 02:33:16PM +0200, Michal Hocko wrote: > > > On Wed 11-09-19 08:25:03, Michael S. Tsirkin wrote: > > > > On Wed, Sep 11, 2019 at 02:16:28PM +0200, Michal

Re: [PATCH v5 0/4] virtio-fs: shared file system for virtual machines

2019-09-11 Thread Vivek Goyal
On Tue, Sep 10, 2019 at 05:12:02PM +0200, Miklos Szeredi wrote: > Git tree for this version is available here: > > git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git#virtiofs-v5 > > Only post patches that actually add virtiofs (virtiofs-v5-base..virtiofs-v5). > > I've folded the

Re: [PATCH v2] vhost: block speculation of translated descriptors

2019-09-11 Thread Will Deacon
On Wed, Sep 11, 2019 at 09:52:25AM -0400, Michael S. Tsirkin wrote: > On Wed, Sep 11, 2019 at 08:10:00AM -0400, Michael S. Tsirkin wrote: > > iovec addresses coming from vhost are assumed to be > > pre-validated, but in fact can be speculated to a value > > out of range. > > > > Userspace address

Re: [PATCH v2] drm/qxl: get vga ioports

2019-09-11 Thread Frediano Ziglio
> > qxl has two modes: "native" (used by the drm driver) and "vga" (vga > compatibility mode, typically used for boot display and firmware > framebuffers). > > Accessing any vga ioport will switch the qxl device into vga mode. > The qxl driver never does that, but other drivers accessing vga

Re: [PATCH v5 0/4] virtio-fs: shared file system for virtual machines

2019-09-11 Thread Stefan Hajnoczi
On Tue, Sep 10, 2019 at 05:12:02PM +0200, Miklos Szeredi wrote: > I've folded the series from Vivek and fixed a couple of TODO comments > myself. AFAICS two issues remain that need to be resolved in the short > term, one way or the other: freeze/restore and full virtqueue. I have researched