From eb1e0a839260c32976e8b4962fdcfe69d705de7333e4565a4d498309fd333bee Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Tue, 18 Jul 2017 22:46:57 +0000 Subject: [PATCH] Accepting request 511335 from home:bfrogers:branches:Virtualization Include two recent fixes from Alex Graf. OBS-URL: https://build.opensuse.org/request/show/511335 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=349 --- ...-xhci-only-update-dequeue-ptr-on-com.patch | 54 +++++++++++++++++++ 0068-vnc-Set-default-kbd-delay-to-10ms.patch | 54 +++++++++++++++++++ qemu-linux-user.changes | 8 +++ qemu-linux-user.spec | 4 ++ qemu-testsuite.changes | 9 ++++ qemu-testsuite.spec | 4 ++ qemu.changes | 9 ++++ qemu.spec | 4 ++ 8 files changed, 146 insertions(+) create mode 100644 0067-xhci-only-update-dequeue-ptr-on-com.patch create mode 100644 0068-vnc-Set-default-kbd-delay-to-10ms.patch diff --git a/0067-xhci-only-update-dequeue-ptr-on-com.patch b/0067-xhci-only-update-dequeue-ptr-on-com.patch new file mode 100644 index 00000000..c77ae9c8 --- /dev/null +++ b/0067-xhci-only-update-dequeue-ptr-on-com.patch @@ -0,0 +1,54 @@ +From a049f58c32e0c783d2d524a918d40ba4b22d96b8 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Thu, 8 Jun 2017 09:41:22 +0200 +Subject: [PATCH] xhci: only update dequeue ptr on completed transfers + +The dequeue pointer should only be updated in case the transfer +is actually completed. If we update it for inflight transfers +we will not pick them up again after migration, which easily +triggers with HID devices as they typically have a pending +transfer, waiting for user input to happen. + +Fixes: 243afe858b95765b98d16a1f0dd50dca262858ad +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1451631 +Signed-off-by: Gerd Hoffmann +Tested-by: Laurent Vivier +Message-id: 20170608074122.32099-1-kraxel@redhat.com +(cherry picked from commit d54fddea989ba4aa2912d49583d86ce01c0d27ea) +Fixes: https://bugzilla.suse.com/show_bug.cgi?id=1048296 +Signed-off-by: Alexander Graf +--- + hw/usb/hcd-xhci.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c +index a2d3143bf4..ed0f13f37b 100644 +--- a/hw/usb/hcd-xhci.c ++++ b/hw/usb/hcd-xhci.c +@@ -2119,6 +2119,8 @@ static void xhci_kick_epctx(XHCIEPContext *epctx, unsigned int streamid) + } + assert(!xfer->running_retry); + if (xfer->complete) { ++ /* update ring dequeue ptr */ ++ xhci_set_ep_state(xhci, epctx, stctx, epctx->state); + xhci_ep_free_xfer(epctx->retry); + } + epctx->retry = NULL; +@@ -2169,6 +2171,8 @@ static void xhci_kick_epctx(XHCIEPContext *epctx, unsigned int streamid) + xhci_fire_transfer(xhci, xfer, epctx); + } + if (xfer->complete) { ++ /* update ring dequeue ptr */ ++ xhci_set_ep_state(xhci, epctx, stctx, epctx->state); + xhci_ep_free_xfer(xfer); + xfer = NULL; + } +@@ -2186,8 +2190,6 @@ static void xhci_kick_epctx(XHCIEPContext *epctx, unsigned int streamid) + break; + } + } +- /* update ring dequeue ptr */ +- xhci_set_ep_state(xhci, epctx, stctx, epctx->state); + epctx->kick_active--; + + ep = xhci_epid_to_usbep(epctx); diff --git a/0068-vnc-Set-default-kbd-delay-to-10ms.patch b/0068-vnc-Set-default-kbd-delay-to-10ms.patch new file mode 100644 index 00000000..c8332332 --- /dev/null +++ b/0068-vnc-Set-default-kbd-delay-to-10ms.patch @@ -0,0 +1,54 @@ +From ea61b5439c77d6fdeb62a04c39affa534b09fcdd Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Wed, 12 Jul 2017 14:43:45 +0200 +Subject: [PATCH] vnc: Set default kbd delay to 10ms + +The current VNC default keyboard delay is 1ms. With that we're constantly +typing faster than the guest receives keyboard events from an XHCI attached +USB HID device. + +The default keyboard delay time in the input layer however is 10ms. I don't know +how that number came to be, but empirical tests on some OpenQA driven ARM +systems show that 10ms really is a reasonable default number for the delay. + +This patch moves the VNC delay also to 10ms. That way our default is much +safer (good!) and also consistent with the input layer default (also good!). + +Signed-off-by: Alexander Graf +Reviewed-by: Daniel P. Berrange +Message-id: 1499863425-103133-1-git-send-email-agraf@suse.de +Signed-off-by: Gerd Hoffmann +(cherry picked from commit d3b0db6dfea6b3a9ee0d96aceb796bdcafa84314) +[BR: BSC#1031692] +Signed-off-by: Bruce Rogers +--- + qemu-options.hx | 2 +- + ui/vnc.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/qemu-options.hx b/qemu-options.hx +index 4712277d7c..ab7e32a4a0 100644 +--- a/qemu-options.hx ++++ b/qemu-options.hx +@@ -1491,7 +1491,7 @@ spec but is traditional QEMU behavior. + @item key-delay-ms + + Set keyboard delay, for key down and key up events, in milliseconds. +-Default is 1. Keyboards are low-bandwidth devices, so this slowdown ++Default is 10. Keyboards are low-bandwidth devices, so this slowdown + can help the device and guest to keep up and not lose events in case + events are arriving in bulk. Possible causes for the latter are flaky + network connections, or scripts for automated testing. +diff --git a/ui/vnc.c b/ui/vnc.c +index 51d6f2353f..3528d50c8a 100644 +--- a/ui/vnc.c ++++ b/ui/vnc.c +@@ -3884,7 +3884,7 @@ void vnc_display_open(const char *id, Error **errp) + } + + lock_key_sync = qemu_opt_get_bool(opts, "lock-key-sync", true); +- key_delay_ms = qemu_opt_get_number(opts, "key-delay-ms", 1); ++ key_delay_ms = qemu_opt_get_number(opts, "key-delay-ms", 10); + sasl = qemu_opt_get_bool(opts, "sasl", false); + #ifndef CONFIG_VNC_SASL + if (sasl) { diff --git a/qemu-linux-user.changes b/qemu-linux-user.changes index 3ee090fc..18a821ce 100644 --- a/qemu-linux-user.changes +++ b/qemu-linux-user.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jul 18 19:51:49 UTC 2017 - brogers@suse.com + +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.9 +* Patches added: + 0067-xhci-only-update-dequeue-ptr-on-com.patch + 0068-vnc-Set-default-kbd-delay-to-10ms.patch + ------------------------------------------------------------------- Mon Jun 26 08:51:24 UTC 2017 - brogers@suse.com diff --git a/qemu-linux-user.spec b/qemu-linux-user.spec index 894083f3..7d1856b4 100644 --- a/qemu-linux-user.spec +++ b/qemu-linux-user.spec @@ -92,6 +92,8 @@ Patch0063: 0063-nbd-Fully-initialize-client-in-case.patch Patch0064: 0064-9pfs-local-remove-use-correct-path-.patch Patch0065: 0065-hid-Reset-kbd-modifiers-on-reset.patch Patch0066: 0066-input-Decrement-queue-count-on-kbd-.patch +Patch0067: 0067-xhci-only-update-dequeue-ptr-on-com.patch +Patch0068: 0068-vnc-Set-default-kbd-delay-to-10ms.patch # Please do not add QEMU patches manually here. # Run update_git.sh to regenerate this queue. Source400: update_git.sh @@ -211,6 +213,8 @@ run cross-architecture builds. %patch0064 -p1 %patch0065 -p1 %patch0066 -p1 +%patch0067 -p1 +%patch0068 -p1 %build ./configure \ diff --git a/qemu-testsuite.changes b/qemu-testsuite.changes index 17bcf8b1..0c91c65a 100644 --- a/qemu-testsuite.changes +++ b/qemu-testsuite.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jul 18 19:51:45 UTC 2017 - brogers@suse.com + +- Fix migration with xhci (bsc#1048296) + 0067-xhci-only-update-dequeue-ptr-on-com.patch +- Increase VNC delay to fix missing keyboard input events (bsc#1031692) + 0068-vnc-Set-default-kbd-delay-to-10ms.patch +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.9 + ------------------------------------------------------------------- Thu Jun 29 10:58:13 UTC 2017 - lyan@suse.com diff --git a/qemu-testsuite.spec b/qemu-testsuite.spec index 2db327bb..318a9ea1 100644 --- a/qemu-testsuite.spec +++ b/qemu-testsuite.spec @@ -196,6 +196,8 @@ Patch0063: 0063-nbd-Fully-initialize-client-in-case.patch Patch0064: 0064-9pfs-local-remove-use-correct-path-.patch Patch0065: 0065-hid-Reset-kbd-modifiers-on-reset.patch Patch0066: 0066-input-Decrement-queue-count-on-kbd-.patch +Patch0067: 0067-xhci-only-update-dequeue-ptr-on-com.patch +Patch0068: 0068-vnc-Set-default-kbd-delay-to-10ms.patch # Please do not add QEMU patches manually here. # Run update_git.sh to regenerate this queue. @@ -910,6 +912,8 @@ This package provides a service file for starting and stopping KSM. %patch0064 -p1 %patch0065 -p1 %patch0066 -p1 +%patch0067 -p1 +%patch0068 -p1 pushd roms/ipxe %patch1100 -p1 diff --git a/qemu.changes b/qemu.changes index 17bcf8b1..0c91c65a 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jul 18 19:51:45 UTC 2017 - brogers@suse.com + +- Fix migration with xhci (bsc#1048296) + 0067-xhci-only-update-dequeue-ptr-on-com.patch +- Increase VNC delay to fix missing keyboard input events (bsc#1031692) + 0068-vnc-Set-default-kbd-delay-to-10ms.patch +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.9 + ------------------------------------------------------------------- Thu Jun 29 10:58:13 UTC 2017 - lyan@suse.com diff --git a/qemu.spec b/qemu.spec index 015686df..87611348 100644 --- a/qemu.spec +++ b/qemu.spec @@ -196,6 +196,8 @@ Patch0063: 0063-nbd-Fully-initialize-client-in-case.patch Patch0064: 0064-9pfs-local-remove-use-correct-path-.patch Patch0065: 0065-hid-Reset-kbd-modifiers-on-reset.patch Patch0066: 0066-input-Decrement-queue-count-on-kbd-.patch +Patch0067: 0067-xhci-only-update-dequeue-ptr-on-com.patch +Patch0068: 0068-vnc-Set-default-kbd-delay-to-10ms.patch # Please do not add QEMU patches manually here. # Run update_git.sh to regenerate this queue. @@ -910,6 +912,8 @@ This package provides a service file for starting and stopping KSM. %patch0064 -p1 %patch0065 -p1 %patch0066 -p1 +%patch0067 -p1 +%patch0068 -p1 pushd roms/ipxe %patch1100 -p1