summaryrefslogtreecommitdiffstats
path: root/hw/vmmouse.c
Commit message (Collapse)AuthorAgeFilesLines
* Make all static TypeInfos constAndreas Färber2013-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all types natively through QEMU Object Model), TypeInfo as used in the common, non-iterative pattern is no longer amended with information and should therefore be const. Fix the documented QOM examples: sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree: sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c This also avoids to piggy-back these changes onto real functional changes or other refactorings. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'bonzini/header-dirs' into stagingAnthony Liguori2012-12-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/header-dirs: (45 commits) janitor: move remaining public headers to include/ hw: move executable format header files to hw/ fpu: move public header file to include/fpu softmmu: move remaining include files to include/ subdirectories softmmu: move include files to include/sysemu/ misc: move include files to include/qemu/ qom: move include files to include/qom/ migration: move include files to include/migration/ monitor: move include files to include/monitor/ exec: move include files to include/exec/ block: move include files to include/block/ qapi: move include files to include/qobject/ janitor: add guards to headers qapi: make struct Visitor opaque qapi: remove qapi/qapi-types-core.h qapi: move inclusions of qemu-common.h from headers to .c files ui: move files to ui/ and include/ui/ qemu-ga: move qemu-ga files to qga/ net: reorganize headers net: move net.c to net/ ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * ui: move files to ui/ and include/ui/Paolo Bonzini2012-12-191-1/+1
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | vmmouse_reset(): remove minimal code duplicationLaszlo Ersek2012-12-181-1/+0
|/ | | | | | | | Commit 069ab0eb added a vmmouse_disable() call to vmmouse_reset(). vmmouse_disable() resets the status already. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qom: Unify type registrationAndreas Färber2012-02-151-2/+3
| | | | | | | | | | | | | Replace device_init() with generalized type_init(). While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: register all types natively through QEMU Object ModelAnthony Liguori2012-02-031-12/+16
| | | | | | | | | | | | | | | | | | | | | This was done in a mostly automated fashion. I did it in three steps and then rebased it into a single step which avoids repeatedly touching every file in the tree. The first step was a sed-based addition of the parent type to the subclass registration functions. The second step was another sed-based removal of subclass registration functions while also adding virtual functions from the base class into a class_init function as appropriate. Finally, a python script was used to convert the DeviceInfo structures and qdev_register_subclass functions to TypeInfo structures, class_init functions, and type_register_static calls. We are almost fully converted to QOM after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hw/vmmouse.c: Disable vmmouse after rebootGerhard Wiesinger2012-02-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jan.kiszka@siemens.com>: 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. Tested-by: Andreas F=E4rber <afaerber@suse.de> Signed-off-by: Gerhard Wiesinger <lists@wiesinger.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* isa: pic: convert to QEMU Object ModelAnthony Liguori2012-01-271-8/+14
| | | | | | | This converts two devices at once because PIC subclasses ISA and converting subclasses independently is extremely hard. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmmouse: Register vmstate via qdevJan Kiszka2011-03-221-1/+1
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* vmmouse: fix queue_size field initializationBlue Swirl2011-02-121-0/+1
| | | | | | | Initialize the field queue_size, dropped by 91c9e09147ba1f3604a3d5d29b4de7702082a33f. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* x86: make vmmouse optionalBlue Swirl2011-02-121-24/+0
| | | | | | | Compile vmmouse in hwlib. Ignore failure if vmmouse device can't be created. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vmmouse: convert to qdevBlue Swirl2011-02-121-8/+29
| | | | | | Convert to qdev, also add a proper reset function. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vmmouse: adapt to mouse handler changes.Gerd Hoffmann2010-10-201-10/+21
| | | | | | | | | | | | | | | | | | | | | This patch updates the vmmouse handler registration and activation. Old behavior: vmmouse_read_id, vmmouse_request_relative and vmmouse_request_absolute unregister the handler and re-register it. New behavior: vmmouse_request_relative and vmmouse_request_absolute will unregister the handler in case the mode did change. Then register and active the handler with current mode if needed. Note that the old code never ever *activates* the handler, so the vmmouse doesn't receive events. This trips up Fedora 14 for example: Boot a default install without usb tablet, watch the X-Server activating the vmmouse then, enjoy a non-functional mouse. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* savevm: Add DeviceState paramAlex Williamson2010-07-061-1/+1
| | | | | | | | | | When available, we'd like to be able to access the DeviceState when registering a savevm. For buses with a get_dev_path() function, this will allow us to create more unique savevm id strings. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Compile pckbd only onceBlue Swirl2010-05-221-1/+1
| | | | | | | Use a qemu_irq to indicate A20 line changes. Move I/O port 92 to pckbd.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vmstate: add version_id argument to post_loadJuan Quintela2009-10-051-1/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: port vmmouse deviceJuan Quintela2009-09-111-28/+20
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hw: remove error handling from qemu_malloc() callers (Avi Kivity)aliguori2009-02-051-2/+0
| | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove unnecessary trailing newlinesblueswir12008-12-131-1/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6000 c046a42c-6fe2-441c-8c8c-71466251a162
* Break up vl.h.pbrook2007-11-171-1/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
* find -type f | xargs sed -i 's/[\t ]$//g' # on most filesths2007-09-161-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
* Use the framework for the VMware mouse emulation, by Herve Poussineau.ths2007-08-261-15/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3150 c046a42c-6fe2-441c-8c8c-71466251a162
* Replace tabs by 8 spaces. No code change, by Herve Poussineau.ths2007-08-261-52/+52
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3148 c046a42c-6fe2-441c-8c8c-71466251a162
* VMMouse Emulation, by Anthony Liguori.ths2007-03-201-0/+300
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2514 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud