hw/vmmouse.c: Disable vmmouse after reboot
PATCH 1/1 hw/vmmouse.c: Disable vmmouse after reboot
Bugfix after reboot when vmmouse was enabled and another OS which uses e.g. PS/2 mouse.
Details:
When a guest activated the vmmouse followed by a reboot the vmmouse was still enabled and the PS/2 mouse was therefore unsusable. When another guest is then booted without vmmouse support (e.g. PS/2 mouse) the mouse is not working.
Reason is that VMMouse has priority and disables all other mouse entities and therefore must be disabled on reset.
Testscenario:
1.) Boot e.g. OS with VMMouse support (e.g. Windows with VMMouse tools) 2.) reboot
3.) Boot e.g. OS without VMMouse support (e.g. DOS) => PS/2 mouse doesn't work
any more. Fixes that issue.
Testscenario 2 by Jan Kiszka <[email protected]>:
Confirm that this patch fixes a real issue. Setup: qemu.git, opensuse 11.4 guest, SDL graphic, system_reset while guest is using the vmmouse. Without the patch, the vmmouse become unusable after the reboot. Also, the mouse stays in absolute mode even before X starts again.
Fixed by:
Disabling the vmmouse in its reset handler.
--- hw/vmmouse.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
hw/vmmouse.c +2 -0
@@ -254,6 +254,8 @@ static void vmmouse_reset(DeviceState *d) s->status =0xffff ; s->queue_size =VMMOUSE_QUEUE_SIZE ; + +vmmouse_disable (s); }static int vmmouse_initfn (ISADevice *dev)
Signature · 1 line
1.7.7.6
Am 25.01.2012 21:04, schrieb Gerhard Wiesinger:
Quoted 27 lines
Bugfix after reboot when vmmouse was enabled and another OS which uses e.g. PS/2
mouse.Details:
When a guest activated the vmmouse followed by a reboot the vmmouse was still
enabled and the PS/2 mouse was therefore unsusable. When another guest is then
booted without vmmouse support (e.g. PS/2 mouse) the mouse is not working.Reason is that VMMouse has priority and disables all other mouse entities and therefore must be disabled on reset.
Testscenario:
1.) Boot e.g. OS with VMMouse support (e.g. Windows with VMMouse tools) 2.) reboot
3.) Boot e.g. OS without VMMouse support (e.g. DOS) => PS/2 mouse doesn't work
any more. Fixes that issue.Testscenario 2 by Jan Kiszka <[email protected]>:
Confirm that this patch fixes a real issue. Setup: qemu.git, opensuse 11.4 guest, SDL graphic,system_resetwhile guest is using the vmmouse. Without the patch, the vmmouse become unusable after the reboot. Also, the mouse stays in absolute mode even before X starts again.
Quoted 4 lines
Fixed by:
Disabling the vmmouse in its reset handler.Signed-off-by Gerhard Wiesinger <[email protected]>
I've been able to reproduce this the day before yesterday, on my version of qemu-kvm 0.15.1 with this patch apparently fixing the mouse after a kdump.
Yesterday however the reporter applied the patch himself to qemu.git and reported this patch not to fix it on their side.
We boot into the desktop, then do:
# echo 1 > /proc/sys/kernel/sysrq # echo c > /proc/sysrq-trigger System then reboots after a while and at login mouse does or does not work.
I had originally tried to kdump with just a virtio drive w/ default settings; then I tried with the reporter's setting of -smp 4 (and cache=unsafe) and was able to reproduce it. Afterwards I was able to reproduce without -smp 4 as well; no recompilation occurred. Guest was the same SLES11 SP2 RC2 all the time.
So, is there any indeterminism involved? I.e. is the mouse unusability maybe not 100% reproducible? Anything else that may need to be fixed beyond this patch?
Patch does not break anything, so for now:
Thanks,
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 51 lines · Andreas Färber
Am 25.01.2012 21:04, schrieb Gerhard Wiesinger:
Quoted 27 lines
Bugfix after reboot when vmmouse was enabled and another OS which uses e.g. PS/2
mouse.Details:
When a guest activated the vmmouse followed by a reboot the vmmouse was still
enabled and the PS/2 mouse was therefore unsusable. When another guest is then
booted without vmmouse support (e.g. PS/2 mouse) the mouse is not working.Reason is that VMMouse has priority and disables all other mouse entities and therefore must be disabled on reset.
Testscenario:
1.) Boot e.g. OS with VMMouse support (e.g. Windows with VMMouse tools) 2.) reboot
3.) Boot e.g. OS without VMMouse support (e.g. DOS) => PS/2 mouse doesn't work
any more. Fixes that issue.Testscenario 2 by Jan Kiszka <[email protected]>:
Confirm that this patch fixes a real issue. Setup: qemu.git, opensuse 11.4 guest, SDL graphic,system_resetwhile guest is using the vmmouse. Without the patch, the vmmouse become unusable after the reboot. Also, the mouse stays in absolute mode even before X starts again.Quoted 4 lines
Fixed by:
Disabling the vmmouse in its reset handler.Signed-off-by Gerhard Wiesinger <[email protected]>I've been able to reproduce this the day before yesterday, on my version of qemu-kvm 0.15.1 with this patch apparently fixing the mouse after a kdump.
Yesterday however the reporter applied the patch himself to qemu.git and reported this patch not to fix it on their side.
We boot into the desktop, then do:
# echo 1 > /proc/sys/kernel/sysrq # echo c > /proc/sysrq-trigger System then reboots after a while and at login mouse does or does not work.I had originally tried to kdump with just a virtio drive w/ default settings; then I tried with the reporter's setting of -smp 4 (and cache=unsafe) and was able to reproduce it. Afterwards I was able to reproduce without -smp 4 as well; no recompilation occurred. Guest was the same SLES11 SP2 RC2 all the time.
Quoted 7 lines
So, is there any indeterminism involved? I.e. is the mouse unusability maybe not 100% reproducible? Anything else that may need to be fixed beyond this patch?
Patch does not break anything, so for now:
Tested-by Andreas Färber <[email protected]>
All known issues I detected were fixed with the patch for me reproducable at least for now.
Ciao,
Gerhard
Anthony Liguori
AppliedQuoted 23 lines · Gerhard Wiesinger
Bugfix after reboot when vmmouse was enabled and another OS which uses e.g. PS/2 mouse.
Details:
When a guest activated the vmmouse followed by a reboot the vmmouse was still enabled and the PS/2 mouse was therefore unsusable. When another guest is then booted without vmmouse support (e.g. PS/2 mouse) the mouse is not working.Reason is that VMMouse has priority and disables all other mouse entities and therefore must be disabled on reset.
Testscenario:
1.) Boot e.g. OS with VMMouse support (e.g. Windows with VMMouse tools) 2.) reboot
3.) Boot e.g. OS without VMMouse support (e.g. DOS) => PS/2 mouse doesn't work any more. Fixes that issue.Testscenario 2 by Jan Kiszka <[email protected]>:
Confirm that this patch fixes a real issue. Setup: qemu.git, opensuse 11.4 guest, SDL graphic,system_resetwhile guest is using the vmmouse. Without the patch, the vmmouse become unusable after the reboot. Also, the mouse stays in absolute mode even before X starts again.
Quoted 4 lines
Fixed by:
Disabling the vmmouse in its reset handler.Signed-off-by Gerhard Wiesinger <[email protected]>
Applied. Thanks.
Regards,
Anthony Liguori
Quoted 17 lines
---
hw/vmmouse.c| 2 ++1 files changed, 2 insertions(+), 0 deletions(-)hw/vmmouse.c +2
-0@@ -254,6 +254,8 @@ static void vmmouse_reset(DeviceState *d) s->status =0xffff ; s->queue_size =VMMOUSE_QUEUE_SIZE ; + +vmmouse_disable (s); }static int vmmouse_initfn (ISADevice *dev)
Quoted 27 lines · Anthony Liguori
Quoted 26 lines · Gerhard Wiesinger
Bugfix after reboot when vmmouse was enabled and another OS which uses e.g. PS/2 mouse.
Details:
When a guest activated the vmmouse followed by a reboot the vmmouse was still enabled and the PS/2 mouse was therefore unsusable. When another guest is then booted without vmmouse support (e.g. PS/2 mouse) the mouse is not working.Reason is that VMMouse has priority and disables all other mouse entities and therefore must be disabled on reset.
Testscenario:
1.) Boot e.g. OS with VMMouse support (e.g. Windows with VMMouse tools) 2.) reboot
3.) Boot e.g. OS without VMMouse support (e.g. DOS) => PS/2 mouse doesn't work any more. Fixes that issue.Testscenario 2 by Jan Kiszka <[email protected]>:
Confirm that this patch fixes a real issue. Setup: qemu.git, opensuse 11.4 guest, SDL graphic,system_resetwhile guest is using the vmmouse. Without the patch, the vmmouse become unusable after the reboot. Also, the mouse stays in absolute mode even before X starts again.Fixed by:
Disabling the vmmouse in its reset handler.
Quoted 7 lines
Quoted 1 line
Signed-off-by Gerhard Wiesinger <[email protected]>Applied. Thanks.
Regards,
Anthony Liguori
Thanks.
BTW: Why are always "signed offs" generated when a maintainer commits? e.g. 069ab0eb8a46bc4ff6f4d4d81bf037d3441347da
Ciao,
Gerhard
Andreas Färber
AppliedAm 03.02.2012 18:21, schrieb Anthony Liguori:
Quoted 30 lines · Gerhard Wiesinger
Quoted 29 lines
Bugfix after reboot when vmmouse was enabled and another OS which uses e.g. PS/2
mouse.Details:
When a guest activated the vmmouse followed by a reboot the vmmouse was still
enabled and the PS/2 mouse was therefore unsusable. When another guest is then
booted without vmmouse support (e.g. PS/2 mouse) the mouse is not working.Reason is that VMMouse has priority and disables all other mouse entities and therefore must be disabled on reset.
Testscenario:
1.) Boot e.g. OS with VMMouse support (e.g. Windows with VMMouse tools) 2.) reboot
3.) Boot e.g. OS without VMMouse support (e.g. DOS) => PS/2 mouse doesn't work
any more. Fixes that issue.Testscenario 2 by Jan Kiszka <[email protected]>:
Confirm that this patch fixes a real issue. Setup: qemu.git, opensuse 11.4 guest, SDL graphic,system_resetwhile guest is using the vmmouse. Without the patch, the vmmouse become unusable after the reboot. Also, the mouse stays in absolute mode even before X starts again.
Quoted 6 lines
Quoted 4 lines
Fixed by:
Disabling the vmmouse in its reset handler.Signed-off-by Gerhard Wiesinger <[email protected]>Applied. Thanks.
Applied to stable-0.15. Thanks again,
Andreas
Quoted 21 lines
Regards,
Anthony Liguori
Quoted 17 lines
---
hw/vmmouse.c| 2 ++1 files changed, 2 insertions(+), 0 deletions(-)hw/vmmouse.c +2
-0@@ -254,6 +254,8 @@ static void vmmouse_reset(DeviceState *d) s->status =0xffff ; s->queue_size =VMMOUSE_QUEUE_SIZE ; + +vmmouse_disable (s); }static int vmmouse_initfn (ISADevice *dev)
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Am 03.02.2012 18:57, schrieb Gerhard Wiesinger:
Quoted 3 lines
BTW: Why are always "signed offs" generated when a maintainer commits? e.g.
069ab0eb8a46bc4ff6f4d4d81bf037d3441347daSigned-off-by Anthony Liguori <[email protected]>
It documents who touched the patch (possibly including resolving minor merge conflicts or changing the commit message) and builds a chain of certifications that the origin and contents are okay:
Cheers,
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg