[Qemu-devel] Proof of concept for GPU forwarding for Linux guest on Linux host

2019-04-03 Thread Tao Wu via Qemu-devel
Hi, This is a proof of concept of GPU forwarding for Linux guest on Linux host. I'd like to get comments and suggestions from community before I put more time on it. To summarize what it is: 1. It's a solution to bring GPU acceleration for Linux vm guest on Linux host. It could works with differe

[Qemu-devel] [PATCH 1/1] proof of concept for GPU forwarding

2019-04-03 Thread Tao Wu via Qemu-devel
--- arch/x86/configs/x86_64_defconfig |5 + drivers/char/Makefile |1 + drivers/char/forwarder/Makefile|8 + drivers/char/forwarder/forwarder.h | 103 ++ drivers/char/forwarder/forwarder_drv.c | 2104 fs/open.c

[Qemu-devel] [PATCH] sdl2: redraw correctly when scanout_mode enabled.

2018-07-26 Thread Tao Wu via Qemu-devel
When scanout_mode enabled, surface is out of sync with actual screen. In such case, we just call sdl2_gl_scanout_flush to do redraw. This fixes bug reported in https://lists.freedesktop.org/archives/virglrenderer-devel/2018-July/001330.html Signed-off-by: Tao Wu --- ui/sdl2-gl.c | 5 + 1 fil

[Qemu-devel] [PATCH v2 3/3] target/i386: hax: Move x86_update_hflags.

2018-01-10 Thread Tao Wu via Qemu-devel
x86_update_hflags reference env->efer which is updated in hax_get_msrs, so it has to be called after hax_get_msrs. This fix the bug that sometimes dump_state show 32 bits regs even in 64 bits mode. Signed-off-by: Tao Wu --- target/i386/hax-all.c | 4 +--- 1 file changed, 1 insertion(+), 3 deleti

[Qemu-devel] [PATCH v2 2/3] target/i386: hax: change to use x86_update_hflags

2018-01-10 Thread Tao Wu via Qemu-devel
Change to use x86_update_hflags instead of keeping another copy at hax side. This also fix bug like HF_CPL_MASK should be SS.DPL, not CS.DPL. Signed-off-by: Tao Wu --- target/i386/hax-all.c | 53 ++- 1 file changed, 2 insertions(+), 51 deletions(-)

[Qemu-devel] [PATCH v2 1/3] target/i386: move hflags update code to a function

2018-01-10 Thread Tao Wu via Qemu-devel
We will share the same code for hax/kvm. Signed-off-by: Tao Wu --- target/i386/Makefile.objs | 2 +- target/i386/common_i386.c | 50 +++ target/i386/common_i386.h | 14 + target/i386/kvm.c | 41 ++---

[Qemu-devel] [PATCH] target/i386: hax: Move hax_setup_qemu_emulator.

2018-01-09 Thread Tao Wu via Qemu-devel
hax_setup_qemu_emulator reference env->efer which is updated in hax_get_msrs, so it has to be called after hax_get_msrs. This fix the bug that sometimes dump_state show 32 bits regs even in 64 bits mode. Signed-off-by: Tao Wu --- target/i386/hax-all.c | 4 +--- 1 file changed, 1 insertion(+), 3

[Qemu-devel] [PATCH] hw/input/hid: Add support for several keys.

2017-12-06 Thread Tao Wu via Qemu-devel
Add support for these keys: audiomute volumedown volumeup power. Tested with "sendkey" command in monitor and verify the behavior in guest OS. Signed-off-by: Tao Wu --- hw/input/hid.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/input/hid.c b/hw/input/hid.c inde

[Qemu-devel] [PATCH] hw/input/hid: Fix some wrong hid usage mappings.

2017-11-21 Thread Tao Wu via Qemu-devel
There are some wrong hid usage mapping in hid_usage_keys table. It can be confirmed with "sendkey" command in monitor and verify the behavior in guest OS. This CL fixed some wrong hid usage mapping for these keys: kp_equals kp_comma audiomute volumedown volumeup power There still are some wrong m

[Qemu-devel] [PATCH] virtio-gpu: fix bug in host memory calculation.

2017-11-09 Thread Tao Wu via Qemu-devel
The old code treats bits as bytes when calculating host memory usage. Change it to be consistent with allocation logic in pixman library. Signed-off-by: Tao Wu --- hw/display/virtio-gpu.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/display/virtio-gpu.

[Qemu-devel] [PATCH] slirp: don't zero ti_i since we access it later.

2017-11-08 Thread Tao Wu via Qemu-devel
The current code looks buggy, we zero ti_i while we access ti_dst/ti_src later. Signed-off-by: Tao Wu --- slirp/tcp_subr.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index dc8b4bbb50..da0d53743f 100644 --- a/slirp/tcp_subr.

[Qemu-devel] [PATCH] virtio-gpu: fix bug in host memory calculation.

2017-11-08 Thread Tao Wu via Qemu-devel
The old code treats bits as bytes when calculating host memory usage. Change it to be consistent with allocation logic in pixman library. Signed-off-by: Tao Wu --- hw/display/virtio-gpu.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/display/virtio-gpu.c b