[Qemu-devel] [PATCH] vfio: fix a typo

2019-08-21 Thread Chen Zhang via Qemu-devel
Signed-off-by: Chen Zhang --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index dc3479c..c5e6fe6 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -44,7 +44,7 @@ #define TYPE_VFIO_PCI "vfio-pci" #define PCI_VFIO(obj)OBJ

Re: [Qemu-devel] [PATCH 0/2] ui/cocoa: Fix input device issues on Mojave

2019-06-12 Thread Chen Zhang via Qemu-devel
Thank you and best regards. > On Jun 12, 2019, at 6:39 PM, Peter Maydell wrote: > > On Tue, 4 Jun 2019 at 10:34, Chen Zhang wrote: >> >> The following patches fixed issues of absolute and relative input devices >> on macOS Mojave. >> >> Chen Zhang (2): >> ui/cocoa: Fix absolute input device

[Qemu-devel] [PATCH 1/2] ui/cocoa: Fix absolute input device grabbing issue on Mojave

2019-06-04 Thread Chen Zhang via Qemu-devel
On Mojave, absolute input device, i.e. tablet, had trouble re-grabbing the cursor in re-entry into the virtual screen area. In some cases, the `window` property of NSEvent object was nil after cursor exiting from window, hinting that the `-locationInWindow` method would return value in screen coor

[Qemu-devel] [PATCH 0/2] ui/cocoa: Fix input device issues on Mojave

2019-06-04 Thread Chen Zhang via Qemu-devel
The following patches fixed issues of absolute and relative input devices on macOS Mojave. Chen Zhang (2): ui/cocoa: Fix absolute input device grabbing issue on Mojave ui/cocoa: Fix mouse grabbing in fullscreen mode for relative input device ui/cocoa.m | 50 +

[Qemu-devel] [PATCH 2/2] ui/cocoa: Fix mouse grabbing in fullscreen mode for relative input device

2019-06-04 Thread Chen Zhang via Qemu-devel
In fullscreen mode, the window property of cocoaView may not be the key window, and the current implementation would not re-grab cursor by left click in fullscreen mode after ungrabbed in fullscreen mode with hot-key ctrl-opt-g. This patch used value of isFullscreen as a short-cirtuit condition fo

[Qemu-devel] [PATCH 2/2] ui/cocoa: Fix mouse grabbing in fullscreen mode for relative input device

2019-06-04 Thread Chen Zhang via Qemu-devel
In fullscreen mode, the window property of cocoaView may not be the key window, and the current implementation would not re-grab cursor by left click in fullscreen mode after ungrabbed in fullscreen mode with hot-key ctrl-opt-g. This patch used value of isFullscreen as a short-cirtuit condition fo

[Qemu-devel] [PATCH 1/2] ui/cocoa: Fix absolute input device grabbing issue on Mojave

2019-06-04 Thread Chen Zhang via Qemu-devel
On Mojave, absolute input device, i.e. tablet, had trouble re-grabbing the cursor in re-entry into the virtual screen area. In some cases, the `window` property of NSEvent object was nil after cursor exiting from window, hinting that the `-locationInWindow` method would return value in screen coor

[Qemu-devel] [PATCH 0/2] ui/cocoa: Fix input device issues on Mojave

2019-06-04 Thread Chen Zhang via Qemu-devel
The following patches fixed issues of absolute and relative input devices on macOS Mojave. Chen Zhang (2): ui/cocoa: Fix absolute input device grabbing issue on Mojave ui/cocoa: Fix mouse grabbing in fullscreen mode for relative input device ui/cocoa.m | 50 +

[Qemu-devel] [PATCH RESEND 0/2] ui/cocoa: Fix absolute and relative input issues on Mojave

2019-04-27 Thread Chen Zhang via Qemu-devel
The following patches fixed absolute and relative input device issues on macOS Mojave. Chen Zhang (2): ui/cocoa: Fix absolute input device grabbing issue on Mojave ui/cocoa: Fix mouse grabbing in fullscreen mode for relative input device ui/cocoa.m | 50 +

[Qemu-devel] [PATCH RESEND 1/2] ui/cocoa: Fix absolute input device grabbing issue on Mojave

2019-04-27 Thread Chen Zhang via Qemu-devel
This patches fixed boundary check methods for cursor in normal and fullscreen modes with/without Zoom-to-Fit on Mojave. On Mojave, absolute input device, i.e. tablet, had trouble re-grabbing the cursor in re-entry into the virtual screen area. In some cases, the `window` property of NSEvent object

[Qemu-devel] [PATCH RESEND 2/2] ui/cocoa: Fix mouse grabbing in fullscreen mode for relative input device

2019-04-27 Thread Chen Zhang via Qemu-devel
In fullscreen mode, the window property of cocoaView may not be the key window, and the current implementation would not grab mouse in fullscreen mode after user ungrabs cursor in fullscreen mode with hot-key, and left clicks the relative input devices to re-grab it. This patch used value of isFul

Re: [Qemu-devel] [PATCH 0/2] ui/cocoa: Fix absolute and relative input issues on Mojave

2019-04-21 Thread Chen Zhang via Qemu-devel
Ping https://patchwork.kernel.org/patch/10888727/ https://patchwork.kernel.org/patch/10888725/ > On Apr 8, 2019, at 10:04 AM, Chen Zhang wrote: > > The following patches fixed absolute and relative

[Qemu-devel] [PATCH] hvf: Add missing break statement

2019-04-21 Thread Chen Zhang via Qemu-devel
In target/i386/hvf/hvf.c, a break statement was probably missing in `hvf_vcpu_exec()`, in handling EXIT_REASON_HLT. These lines seemed to be equivalent to `kvm_handle_halt()`. Signed-off-by: Chen Zhang --- target/i386/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/hv

Re: [Qemu-devel] [PATCH 0/2] ui/cocoa: Fix absolute and relative input issues on Mojave

2019-04-14 Thread Chen Zhang via Qemu-devel
ping > On Apr 8, 2019, at 10:04 AM, Chen Zhang wrote: > > The following patches fixed absolute and relative input device issues on > macOS Mojave. > > Chen Zhang (2): > ui/cocoa: Fix absolute input device grabbing issue on Mojave > ui/cocoa: Fix mouse grabbing in fullscreen mode for relati

[Qemu-devel] [PATCH 1/2] ui/cocoa: Fix absolute input device grabbing issue on

2019-04-07 Thread Chen Zhang via Qemu-devel
This patches fixed boundary check methods for cursor in normal and fullscreen modes with/without Zoom-to-Fit on Mojave. On Mojave, absolute input device, i.e. tablet, had trouble re-grabbing the cursor in re-entry into the virtual screen area. In some cases, the `window` property of NSEvent object

[Qemu-devel] [PATCH 2/2] ui/cocoa: Fix mouse grabbing in fullscreen mode for relative input device

2019-04-07 Thread Chen Zhang via Qemu-devel
In fullscreen mode, the window property of cocoaView may not be the key window, and the current implementation would not grab mouse in fullscreen mode after user ungrabs cursor in fullscreen mode with hot-key, and left clicks the relative input devices to re-grab it. This patch used value of isFul

[Qemu-devel] [PATCH 0/2] ui/cocoa: Fix absolute and relative input issues on Mojave

2019-04-07 Thread Chen Zhang via Qemu-devel
The following patches fixed absolute and relative input device issues on macOS Mojave. Chen Zhang (2): ui/cocoa: Fix absolute input device grabbing issue on Mojave ui/cocoa: Fix mouse grabbing in fullscreen mode for relative input device ui/cocoa.m | 50 +

Re: [Qemu-devel] [PATCH] ui/cocoa: Fix mouse grabbing in fullscreen mode for relative input device

2019-04-05 Thread Chen Zhang via Qemu-devel
ping http://patchwork.ozlabs.org/patch/1059842/ > On Mar 27, 2019, at 10:00 AM, Chen Zhang wrote: > > > >> On Mar 27, 2019, at 12:20 AM, Peter Maydell wrote: >> >> On Thu, 21 Mar 2019 at 07:10, Chen Zhang wrote: >>> >>> In fullscreen mode, the window property of cocoaView may not be the k

Re: [Qemu-devel] [PATCH v2] ui/cocoa: Fix absolute input device grabbing issues on Mojave

2019-04-05 Thread Chen Zhang via Qemu-devel
ping http://patchwork.ozlabs.org/patch/1058186/ > On Mar 28, 2019, at 10:05 AM, Chen Zhang wrote: > > > >> On Mar 27, 2019, at 7:37 PM, Peter Maydell wrote: >> >> On Wed, 27 Mar 2019 at 01:09, Chen Zhang wrote: >>> Just double-checked on a MacMini mid 2011 with macOS 10.13.6, Xcode 10.1.

Re: [Qemu-devel] [PATCH v2] ui/cocoa: Fix absolute input device grabbing issues on Mojave

2019-03-27 Thread Chen Zhang via Qemu-devel
> On Mar 27, 2019, at 7:37 PM, Peter Maydell wrote: > > On Wed, 27 Mar 2019 at 01:09, Chen Zhang wrote: >> Just double-checked on a MacMini mid 2011 with macOS 10.13.6, Xcode 10.1. >> This NSWindow API did exist, and the patch could be built without error. >> Searching convertPointFromScreen

Re: [Qemu-devel] [PATCH] ui/cocoa: Fix mouse grabbing in fullscreen mode for relative input device

2019-03-26 Thread Chen Zhang via Qemu-devel
> On Mar 27, 2019, at 12:20 AM, Peter Maydell wrote: > > On Thu, 21 Mar 2019 at 07:10, Chen Zhang wrote: >> >> In fullscreen mode, the window property of cocoaView may not be the key >> window, and the current implementation would not grab mouse in >> fullscreen mode after left clicks on rel

Re: [Qemu-devel] [PATCH v2] ui/cocoa: Fix absolute input device grabbing issues on Mojave

2019-03-26 Thread Chen Zhang via Qemu-devel
> On Mar 27, 2019, at 12:15 AM, Peter Maydell wrote: > > On Tue, 19 Mar 2019 at 03:51, Chen Zhang > wrote: >> >> On Mojave, absolute input device, i.e. tablet, had trouble re-grabbing >> the cursor in re-entry into the virtual screen area. In some cases, >> the `window

[Qemu-devel] [PATCH] ui/cocoa: Fix mouse grabbing in fullscreen mode for relative input device

2019-03-21 Thread Chen Zhang via Qemu-devel
In fullscreen mode, the window property of cocoaView may not be the key window, and the current implementation would not grab mouse in fullscreen mode after left clicks on relative input devices. This patch used isFullscreen value as a short-cirtuit condition for relative input device grabbing. N

[Qemu-devel] [PATCH v2] ui/cocoa: Fix absolute input device grabbing issues on Mojave

2019-03-18 Thread Chen Zhang via Qemu-devel
On Mojave, absolute input device, i.e. tablet, had trouble re-grabbing the cursor in re-entry into the virtual screen area. In some cases, the `window` property of NSEvent object is nil, after exit of cursor, meaning that the `-locationInWindow` method would return value in screen coordinates. Curr

[Qemu-devel] [PATCH 1/2] ui/cocoa: Fix absolute input device grabbing issues on Mojave

2019-03-15 Thread Chen Zhang via Qemu-devel
Signed-off-by: Chen Zhang mailto:tgfb...@me.com>> --- ui/cocoa.m | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 420b2411c1..5d0a6599d9 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -405,6 +405,24 @@ QemuCocoaView *coco

[Qemu-devel] [PATCH 2/2] ui/cocoa: fix grabbing issue in fullscreen mode

2019-03-15 Thread Chen Zhang via Qemu-devel
Signed-off-by: Chen Zhang mailto:tgfb...@me.com>> --- ui/cocoa.m | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 5d0a6599d9..8e74f6e283 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -410,11 +410,31 @@ QemuCocoaView

[Qemu-devel] [PATCH 2/2] ui/cocoa: fix grabbing issue in fullscreen mode

2019-03-15 Thread Chen Zhang via Qemu-devel
Signed-off-by: Chen Zhang --- ui/cocoa.m | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 5d0a6599d9..8e74f6e283 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -410,11 +410,31 @@ QemuCocoaView *cocoaView; { N

[Qemu-devel] [PATCH 1/2] Fix absolute input device grabbing issues on Mojave

2019-03-15 Thread Chen Zhang via Qemu-devel
Signed-off-by: Chen Zhang --- ui/cocoa.m | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 420b2411c1..5d0a6599d9 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -405,6 +405,24 @@ QemuCocoaView *cocoaView; return (p

[Qemu-devel] [PATCH 0/2] ui/cocoa: Fix absolute input device grabbing issue on Mojave

2019-03-15 Thread Chen Zhang via Qemu-devel
On Mojave, absolute input device, i.e. tablet, had trouble re-grabbing the cursor in re-entry into the virtual screen area. In some cases, the `window` property of NSEvent object is nil, after exit of cursor, meaning that the `-locationInWindow` method would return value in screen coordinates. T

Re: [Qemu-devel] [PATCH] ui/cocoa: Adding cursor support

2019-03-14 Thread Chen Zhang via Qemu-devel
tead-of-the-deprecated [2] https://lists.apple.com/archives/cocoa-dev/2012/Feb/msg00372.html > > Regards, > BALATON Zoltan > >> >>> On Mar 12, 2019, at 8:32 PM, BALATON Zoltan wrote: >>> >>> On Tue, 12 Mar 2019, Chen Zhang via Qemu-devel wro

Re: [Qemu-devel] [PATCH] ui/cocoa: Adding cursor support

2019-03-12 Thread Chen Zhang via Qemu-devel
dpy_mouse_set call. > On Mar 12, 2019, at 8:32 PM, BALATON Zoltan wrote: > > On Tue, 12 Mar 2019, Chen Zhang via Qemu-devel wrote: >> Hi, >> >> I did try to utilize NSCursor and CGWarpMouseCursorPosition API before this >> compromise. In cocoa_mouse_set, the position of

Re: [Qemu-devel] [PATCH] ui/cocoa: Adding cursor support

2019-03-12 Thread Chen Zhang via Qemu-devel
Hi, I did try to utilize NSCursor and CGWarpMouseCursorPosition API before this compromise. In cocoa_mouse_set, the position of cursor should to be modified, but the bottom half that called it was not scheduled on main thread. UI operations have to be queued on main thread asynchronously therea

[Qemu-devel] [PATCH] ui/cocoa: Adding cursor support

2019-03-11 Thread Chen Zhang via Qemu-devel
This patch added cocoa_mouse_set() and cocoa_cursor_define(), supporting virtio-gpu simple rendering on macOS host. Image content, rect and visibility of the cursor buffer were added as ivars in QemuCocoaView class. Corresponding accessors were added. Note that the rect of the cursor was in coord

[Qemu-devel] [PATCH v2] ui/egl-helpers: Augment parameter list of egl_texture_blend() to convey scales of viewport

2019-01-24 Thread Chen Zhang via Qemu-devel
From 0be823a56682be57fe0370bb91e4062ec7b47be5 Mon Sep 17 00:00:00 2001 From: Chen Zhang Date: Fri, 25 Jan 2019 15:33:08 +0800 Subject: [PATCH v2] ui/egl-helpers: Augment parameter list of egl_texture_blend() to convey scales of viewport. This would help gtk-egl display showing scaled DMABuf cur

Re: [Qemu-devel] [PATCH]gtk-egl: Blend cursor buffer within a scaled viewport

2019-01-24 Thread Chen Zhang via Qemu-devel
Hi, > On Jan 24, 2019, at 8:07 PM, Gerd Hoffmann wrote: > >> diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h >> index 3fc656a..63ffc2d 100644 >> --- a/include/ui/egl-helpers.h >> +++ b/include/ui/egl-helpers.h >> @@ -28,6 +28,8 @@ void egl_fb_read(void *dst, egl_fb *src); >> voi

Re: [Qemu-devel] [PATCH]gtk-egl: Blend cursor buffer within a scaled viewport

2019-01-23 Thread Chen Zhang via Qemu-devel
The patch pasted in previous mail lost some indentations and spaces. Sorry. From 7921a69f106233ebc0ff9bdc29d7c6182160fc6f Mon Sep 17 00:00:00 2001 From: Chen Zhang Date: Thu, 24 Jan 2019 09:16:23 +0800 Subject: [PATCH] DMABuf: Blend cursor buf within a scaled viewport Signed-off-by: Chen Zhang

[Qemu-devel] [PATCH]gtk-egl: Blend cursor buffer within a scaled viewport

2019-01-23 Thread Chen Zhang via Qemu-devel
When a gtk-egl window (for gvt-g DMABuf) was zoomed, the cursor plane buffer did not zoom covariantly, resulting in a mismatched cursor size. In this patch, `egl_texture_blend()` is augmented with two extra parameters to convey the size for a scaled viewport, as in `egl_texture_blend2()`.  Sig

Re: [Qemu-devel] [PATCH] gtk: sync guest display updates to host display refresh

2018-11-25 Thread Chen Zhang via Qemu-devel
Update refresh interval upon frame tick; Add callback of window state events to adjust refresh rate during iconified. The callback handle is saved in struct VirtualConsole for its removal when the window is iconified. Signed-off-by: Chen Zhang --- include/ui/gtk.h | 1 + ui/gtk.c | 48

Re: [Qemu-devel] [PATCH] gtk: sync guest display updates to host display refresh

2018-11-14 Thread Chen Zhang via Qemu-devel
Additionally, the aforementioned patch performs OK for non-vfio OpenGL enabled GTK displays, and fails DMA Buf iGVT-g display only, so far as I could tell. Perhaps a change like the following is better? static gboolean gd_frame_tick(GtkWidget *widget, GdkFrameCloc

Re: [Qemu-devel] [PATCH] gtk: sync guest display updates to host display refresh

2018-11-13 Thread Chen Zhang via Qemu-devel
Hi, I have briefly tested this patch. Unfortunately, it apparently caused deteriorated performance on a previously working Windows 10 guest with DMA Buf. The patched qemu not only clogged up graphics drawing, but also obstructed the guest OS. The boot time and latency for guest operations (e.g.

[Qemu-devel] GTK: default display refresh rate at 60Hz

2018-11-08 Thread Chen Zhang via Qemu-devel
Hi, It’s observed that GTK display performs poorly compared with native environment. The display refresh timer fires at a interval of GUI_REFRESH_INTERVAL_DEFAULT milliseconds which is defined as 30 in include/ui/console.h. This throttles refresh rate to 33Hz. Changing its value to 16 (i.e. 60

Re: [Qemu-devel] [PATCH] gtk: Fix mouse offset in scaled gtk-gl display for VFIO/iGVT-g DMA Buf mode

2018-11-06 Thread Chen Zhang via Qemu-devel
Yes, this patch just works. Thank you. Best regards On Nov 06, 2018, at 08:22 PM, Gerd Hoffmann wrote: On Wed, Oct 31, 2018 at 06:24:56AM +, Chen Zhang wrote: The issue was reported as in https://bugs.launchpad.net/qemu/+bug/1793859 When an OpenGL accelerated GTK window is used for iGVT-

[Qemu-devel] [PATCH] gtk: Fix mouse offset in scaled gtk-gl display for VFIO/iGVT-g DMA Buf mode

2018-10-31 Thread Chen Zhang via Qemu-devel
The issue was reported as in https://bugs.launchpad.net/qemu/+bug/1793859 When an OpenGL accelerated GTK window is used for iGVT-g DMA Buf device, window scaling would cause guest cursor to move in undesirable velocity. To fix this usability issue, the gtk mouse motion events was modified to sca

[Qemu-devel] [PATCH] Add support for TCP path/QMP_PATH in scripts/qmp/qmp

2018-08-28 Thread Chen Zhang via Qemu-devel
From a1f93198020b8c043edab5292db39b52ac77f78b Mon Sep 17 00:00:00 2001 Signed-off-by: Zhang Chen --- scripts/qmp/qmp | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/qmp/qmp b/scripts/qmp/qmp index 6cb46fd..0e8ed19 100755 --- a/scripts/qmp/qmp +++ b/scr