[RFC PATCH v4 3/6] drm/i915/gvt: Register vGPU display event irq

2019-07-18 Thread Kechen Lu
From: Tina Zhang Gvt-g emulates and injects the vGPU's display interrupts in kernel space. However the dma-buf based framebuffer consumer in the user land (e.g. Qemu vfio/display) may also need to be notified by this event. Register the display irq as VFIO_IRQ_SUBTYPE_GFX_DISPLAY_IRQ to each vGP

[RFC PATCH v4 6/6] drm/i915/gvt: Add cursor plane reg update trap emulation handler

2019-07-18 Thread Kechen Lu
plane updates and corresponding cursor plane flip interrupts reporting. Signed-off-by: Kechen Lu --- drivers/gpu/drm/i915/gvt/display.c | 11 +++ drivers/gpu/drm/i915/gvt/handlers.c | 27 --- drivers/gpu/drm/i915/gvt/interrupt.c | 7 +++ drivers/gpu/drm

[RFC PATCH v4 5/6] drm/i915/gvt: Deliver async primary plane page flip events at vblank

2019-07-18 Thread Kechen Lu
check bitset. Signed-off-by: Kechen Lu --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 5 +++-- drivers/gpu/drm/i915/gvt/display.c| 12 drivers/gpu/drm/i915/gvt/gvt.h| 2 ++ drivers/gpu/drm/i915/gvt/handlers.c | 5 +++-- 4 files changed, 20 insertions(+), 4 deletions

[RFC PATCH v4 4/6] drm/i915/gvt: Deliver vGPU refresh event to userspace

2019-07-18 Thread Kechen Lu
eventfd and 8 byte eventfd counter partition are leveraged. Signed-off-by: Tina Zhang Signed-off-by: Kechen Lu --- drivers/gpu/drm/i915/gvt/display.c | 21 drivers/gpu/drm/i915/gvt/gvt.h | 7 ++ drivers/gpu/drm/i915/gvt/kvmgt.c | 154 +++-- 3 files changed

[RFC PATCH v4 2/6] vfio: Introduce vGPU display irq type

2019-07-18 Thread Kechen Lu
From: Tina Zhang Introduce vGPU specific irq type VFIO_IRQ_TYPE_GFX, and VFIO_IRQ_SUBTYPE_GFX_DISPLAY_IRQ as the subtype for vGPU display Signed-off-by: Tina Zhang --- include/uapi/linux/vfio.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/vfio.h b/include/uapi/linu

[RFC PATCH v4 1/6] vfio: Define device specific irq type capability

2019-07-18 Thread Kechen Lu
From: Tina Zhang Cap the number of irqs with fixed indexes and use capability chains to chain device specific irqs. Signed-off-by: Tina Zhang Signed-off-by: Eric Auger --- include/uapi/linux/vfio.h | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/include

[RFC PATCH v4 0/6] Deliver vGPU display refresh event to userspace

2019-07-18 Thread Kechen Lu
e VFIO irq chain to get eventfds from userspace instead of adding a new ABI. (Alex) v1: - https://patchwork.kernel.org/cover/10962341/ Kechen Lu (2): drm/i915/gvt: Deliver async primary plane page flip events at vblank drm/i915/gvt: Add cursor plane reg update trap emulation handler Tina Zhang (