[PATCH v2 04/18] drm/qxl: change the way slot is detected

2018-12-13 Thread Gerd Hoffmann
From: Frediano Ziglio Instead of relaying on surface type use the actual placement. This allow to have different placement for a single type of surface. Signed-off-by: Frediano Ziglio [ kraxel: rebased, adapted to upstream changes ] Signed-off-by: Gerd Hoffmann ---

[PATCH v2 13/18] drm/qxl: use shadow bo directly

2018-12-13 Thread Gerd Hoffmann
Pass the shadow bo to qxl_io_create_primary() instead of expecting qxl_io_create_primary to check bo->shadow. Set is_primary flag on the shadow bo. Move the is_primary tracking into qxl_io_create_primary() and qxl_io_destroy_primary() functions. That simplifies primary surface tracking and the

[PATCH v2 02/18] drm/qxl: drop unused qxl_fb_virtual_address

2018-12-13 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 38c5a8b1df..7eabf4a9ed 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@

[PATCH v2 18/18] drm/qxl: remove dead qxl fbdev emulation code

2018-12-13 Thread Gerd Hoffmann
Lovely diffstat, thanks to the new generic fbdev emulation. drm/qxl/Makefile |2 drm/qxl/qxl_draw.c | 232 drm/qxl/qxl_drv.h | 21 --- drm/qxl/qxl_fb.c | 300 - Signed-off-by: Gerd Hoffmann

[PATCH v2 14/18] drm/qxl: cover all crtcs in shadow bo.

2018-12-13 Thread Gerd Hoffmann
The qxl device supports only a single active framebuffer ("primary surface" in spice terminology). In multihead configurations are handled by defining rectangles within the primary surface for each head/crtc. Userspace which uses the qxl ioctl interface (xorg qxl driver) is aware of this

[PATCH v2 16/18] drm/qxl: implement prime kmap/kunmap

2018-12-13 Thread Gerd Hoffmann
Generic fbdev emulation needs this. Also: We must keep track of the number of mappings now, so we don't unmap early in case two users want a kmap of the same bo. Add a sanity check to destroy callback to make sure kmap/kunmap is balanced. Signed-off-by: Gerd Hoffmann ---

[PATCH v2 12/18] drm/qxl: track primary bo

2018-12-13 Thread Gerd Hoffmann
Track which bo is used as primary surface. With that in place we don't need the primary_created flag any more, we can just check the primary bo pointer instead. Also verify we don't already have a primary surface in qxl_io_create_primary(). Signed-off-by: Gerd Hoffmann ---

[PATCH v2 11/18] drm/qxl: drop unused offset parameter from qxl_io_create_primary()

2018-12-13 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 1 - drivers/gpu/drm/qxl/qxl_cmd.c | 7 +++ drivers/gpu/drm/qxl/qxl_display.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index

[PATCH v2 10/18] drm/qxl: move qxl_primary_apply_cursor to correct place

2018-12-13 Thread Gerd Hoffmann
The cursor must be set again after creating the primary surface. Also drop the error message. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c

[PATCH v2 08/18] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for shadow bo.

2018-12-13 Thread Gerd Hoffmann
The shadow bo is used as qxl surface, so allocate it as QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in PRIV ttm domain then, so this reduces VRAM memory pressure. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v2 09/18] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for dumb gem objects

2018-12-13 Thread Gerd Hoffmann
dumb buffers are used as qxl surfaces, so allocate them as QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in PRIV ttm domain then, so this reduces VRAM memory pressure. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_dumb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v2 07/18] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2018-12-13 Thread Gerd Hoffmann
qxl surfaces (used for framebuffers and gem objects) can live in both VRAM and PRIV ttm domains. Update placement setup to include both. Put PRIV first in the list so it is preferred, so VRAM will have more room for objects which must be allocated there. Signed-off-by: Gerd Hoffmann ---

[PATCH v2 06/18] drm/qxl: use separate offset spaces for the two slots / ttm memory types.

2018-12-13 Thread Gerd Hoffmann
Without that ttm offsets are not unique, they can refer to objects in both VRAM and PRIV memory (aka main and surfaces slot). One of those "why things didn't blow up without this" moments. Probably offset conflicts are rare enough by pure luck. Signed-off-by: Gerd Hoffmann ---

[PATCH v2 05/18] drm/qxl: drop unused fields from struct qxl_device

2018-12-13 Thread Gerd Hoffmann
slot_id_bits and slot_gen_bits can be read directly from qxlrom instead. va_slot_mask is never used anywhere. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 3 --- drivers/gpu/drm/qxl/qxl_kms.c | 10 ++ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git

[PATCH v2 03/18] drm/qxl: simplify slot management

2018-12-13 Thread Gerd Hoffmann
Drop pointless indirection, remove the mem_slots array and index variables, drop dynamic allocation. Store memslots in qxl_device instead. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.h | 15 + drivers/gpu/drm/qxl/qxl_kms.c | 72

CISTI'2019 - Doctoral Symposium

2018-12-13 Thread Maria Lemos
* Proceedings published in IEEE Xplore and indexed by ISI, Scopus, etc. --- Doctoral Symposium of CISTI'2019 - 14th Iberian Conference on Information Systems and Technologies

Re: [PATCH 7/7] drm: Split out drm_probe_helper.h

2018-12-13 Thread Daniel Vetter
On Mon, Dec 10, 2018 at 02:40:25PM +0100, Benjamin Gaignard wrote: > Le lun. 10 déc. 2018 à 12:10, Benjamin Gaignard > a écrit : > > > > Le lun. 10 déc. 2018 à 11:24, Thierry Reding > > a écrit : > > > > > > On Mon, Dec 10, 2018 at 11:11:33AM +0100, Daniel Vetter wrote: > > > > Having the probe

Re: [PATCH v6 0/7] Add virtio-iommu driver

2018-12-13 Thread Joerg Roedel
Hi, to make progress on this, we should first agree on the protocol used between guest and host. I have a few points to discuss on the protocol first. On Tue, Dec 11, 2018 at 06:20:57PM +, Jean-Philippe Brucker wrote: > [1] Virtio-iommu specification v0.9, sources and pdf >

[PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-13 Thread Jason Wang
Vhost dirty page logging API is designed to sync through GPA. But we try to log GIOVA when device IOTLB is enabled. This is wrong and may lead to missing data after migration. To solve this issue, when logging with device IOTLB enabled, we will: 1) reuse the device IOTLB translation result of

Re: [PATCH] kbuild, x86: revert macros in extended asm workarounds

2018-12-13 Thread Peter Zijlstra
On Thu, Dec 13, 2018 at 06:17:41PM +0900, Masahiro Yamada wrote: > Revert the following commits: > > - 5bdcd510c2ac9efaf55c4cbd8d46421d8e2320cd > ("x86/jump-labels: Macrofy inline assembly code to work around GCC inlining > bugs") > > - d5a581d84ae6b8a4a740464b80d8d9cf1e7947b2 >

[PATCH net V2 3/4] Revert "net: vhost: lock the vqs one by one"

2018-12-13 Thread Jason Wang
This reverts commit 78139c94dc8c96a478e67dab3bee84dc6eccb5fd. We don't protect device IOTLB with vq mutex, which will lead e.g use after free for device IOTLB entries. And since we've switched to use mutex_trylock() in previous patch, it's safe to revert it without having deadlock. Fixes: commit

[PATCH net V2 2/4] vhost_net: switch to use mutex_trylock() in vhost_net_busy_poll()

2018-12-13 Thread Jason Wang
We used to hold the mutex of paired virtqueue in vhost_net_busy_poll(). But this will results an inconsistent lock order which may cause deadlock if we try to bring back the protection of device IOTLB with vq mutex that requires to hold mutex of all virtqueues at the same time. Fix this simply by

[PATCH net V2 1/4] vhost: make sure used idx is seen before log in vhost_add_used_n()

2018-12-13 Thread Jason Wang
We miss a write barrier that guarantees used idx is updated and seen before log. This will let userspace sync and copy used ring before used idx is update. Fix this by adding a barrier before log_write(). Fixes: 8dd014adfea6f ("vhost-net: mergeable buffers support") Signed-off-by: Jason Wang ---

[PATCH net V2 0/4] Fix various issue of vhost

2018-12-13 Thread Jason Wang
Hi: This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. - Patch 4-7 fixes the diry

[PATCH] VSOCK: Send reset control packet when socket is partially bound

2018-12-13 Thread Jorgen Hansen
If a server side socket is bound to an address, but not in the listening state yet, incoming connection requests should receive a reset control packet in response. However, the function used to send the reset silently drops the reset packet if the sending socket isn't bound to a remote address (as