summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/vmmouse.c
AgeCommit message (Collapse)Author
2022-05-18Input: vmmouse - disable vmmouse before entering suspend modeZongmin Zhou
Currently, when trying to suspend and resume with VirtualPS/2 VMMouse there is an error message after resuming: psmouse serio1: vmmouse: Unable to re-enable mouse when reconnecting, err: -6 and the mouse will no longer be operable, requiring full rescan to find a another driver to use for the port. This error is due to QEMU still generating PS2 events which the kernel is not consuming until resume time, where they interfere with mouse identification and ultimately resulting in an error getting VMMOUSE_VERSION_ID. Test scenario: 1) start virtual machine with qemu command "vmport=on" 2) click suspend botton to enter suspend mode 3) resume and observe the error message in the kernel logs Let's fix this by disabling the vmmouse in its reset handler. This will notify qemu to stop vmmouse and remove the handler. Signed-off-by: Zongmin Zhou<zhouzongmin@kylinos.cn> Reviewed-by: Zack Rusin <zackr@vmware.com> Link: https://lore.kernel.org/r/20220322021046.1087954-1-zhouzongmin@kylinos.cn Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-11-19Input: vmmouse - demote obvious abuse of kernel-doc headerLee Jones
Fixes the following W=1 kernel build warning(s): drivers/input/mouse/vmmouse.c:99: warning: Function parameter or member 'cmd' not described in 'VMMOUSE_CMD' drivers/input/mouse/vmmouse.c:99: warning: Function parameter or member 'in1' not described in 'VMMOUSE_CMD' drivers/input/mouse/vmmouse.c:99: warning: Function parameter or member 'out1' not described in 'VMMOUSE_CMD' drivers/input/mouse/vmmouse.c:99: warning: Function parameter or member 'out2' not described in 'VMMOUSE_CMD' drivers/input/mouse/vmmouse.c:99: warning: Function parameter or member 'out3' not described in 'VMMOUSE_CMD' drivers/input/mouse/vmmouse.c:99: warning: Function parameter or member 'out4' not described in 'VMMOUSE_CMD' Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20201112110204.2083435-16-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-08-28input/vmmouse: Update the backdoor call with support for new instructionsThomas Hellstrom
Use the definition provided by include/asm/vmware.h. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Doug Covelli <dcovelli@vmware.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: linux-input@vger.kernel.org Cc: Thomas Gleixner <tglx@linutronix.de> Cc: VMware Graphics <linux-graphics-maintainer@vmware.com> Cc: <pv-drivers@vmware.com> Cc: x86-ml <x86@kernel.org> Link: https://lkml.kernel.org/r/20190828080353.12658-5-thomas_os@shipmail.org
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-10x86/virt: Add enum for hypervisors to replace x86_hyperJuergen Gross
The x86_hyper pointer is only used for checking whether a virtual device is supporting the hypervisor the system is running on. Use an enum for that purpose instead and drop the x86_hyper pointer. Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Xavier Deguillard <xdeguillard@vmware.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: akataria@vmware.com Cc: arnd@arndb.de Cc: boris.ostrovsky@oracle.com Cc: devel@linuxdriverproject.org Cc: dmitry.torokhov@gmail.com Cc: gregkh@linuxfoundation.org Cc: haiyangz@microsoft.com Cc: kvm@vger.kernel.org Cc: kys@microsoft.com Cc: linux-graphics-maintainer@vmware.com Cc: linux-input@vger.kernel.org Cc: moltmann@vmware.com Cc: pbonzini@redhat.com Cc: pv-drivers@vmware.com Cc: rkrcmar@redhat.com Cc: sthemmin@microsoft.com Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20171109132739.23465-3-jgross@suse.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-06-23Input: vmmouse - remove port reservationSinclair Yeh
The VMWare EFI BIOS will expose port 0x5658 as an ACPI resource. This causes the port to be reserved by the APCI module as the system comes up, making it unavailable to be reserved again by other drivers, thus preserving this VMWare port for special use in a VMWare guest. This port is designed to be shared among multiple VMWare services, such as the VMMOUSE. Because of this, VMMOUSE should not try to reserve this port on its own. The VMWare non-EFI BIOS does not do this to preserve compatibility with existing/legacy VMs. It is known that there is small chance a VM may be configured such that these ports get reserved by other non-VMWare devices, and if this ever happens, the result is undefined. Signed-off-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Cc: <stable@vger.kernel.org> # 4.1- Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-01-27Input: vmmouse - fix absolute device registrationDmitry Torokhov
We should set device's capabilities first, and then register it, otherwise various handlers already present in the kernel will not be able to connect to the device. Reported-by: Lauri Kasanen <cand@gmx.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-04-14Input: add vmmouse driverThomas Hellstrom
VMMouse enables low-latency mouse-cursor-movements for VMWare and QEMU guests. By removing the guest cursor and using the host as a guest cursor the cursor movement appears instant although in reality there is some lag. To be able to do this, the host's view of the cursor position must exactly match the guest's view and an absolute pointer device is needed. Enter the VMMouse. While the VMMouse driver has historically been an Xorg user-space driver, implementing it as a kernel imput driver enables rootless Xorg and new compositing display servers for VMware guests. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>