summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-03-21Compile vga-isa only onceBlue Swirl8-2/+9
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Compile pcspk only onceBlue Swirl8-2/+9
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Compile i8254 only onceBlue Swirl11-3/+13
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Compile parallel only onceBlue Swirl9-3/+12
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Compile vga-pci only onceBlue Swirl12-4/+17
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Move x86 specific PC declarations to a separate fileBlue Swirl6-17/+24
x86 definitions (especially CPUState uses) prevent many files from being compiled within libhw. Move x86 specific declarations (APIC stuff) to a separate file. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Revert 'Fix build'Blue Swirl1-1/+1
Partially revert 80a1ab598c6960e7a941e38c5d8638c532c585c3. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Revert "Introduce a default qmp session"Anthony Liguori1-63/+0
This reverts commit 3290c4aac5b97bb1e3b2b28d94669f2c611ce84a. Conflicts: vl.c
2010-03-21Revert "qmp: don't make -qmp disable the default monitor"Anthony Liguori1-11/+2
This reverts commit d49f626ed00cecc90fb1ff88da9bdf11e57094d1.
2010-03-21Revert "tap: invoke downscript when we exit abnormally"Anthony Liguori1-16/+0
This reverts commit 8af8ce4d6116e3d46ad298ca8fe50d3b515b1aac.
2010-03-21Revert "Convert atexit users to exit_notifier"Anthony Liguori8-26/+12
This reverts commit d7234f4d7e373a708e1df9ab565a71b71b189025. Conflicts: hw/xen_machine_pv.c This should have never been committed. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-21Revert "Add exit notifiers"Anthony Liguori2-32/+0
This reverts commit 3b6304f706ef7eebc0b3b3f3a5093ec75448ee19. This was mistakenly committed. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-21Fix a typoBlue Swirl1-1/+2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21Compile disassemblers only onceBlue Swirl5-17/+74
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-20tcg/arm: don't save/restore r7 in prologue/epilogueAurelien Jarno1-6/+6
There is no need to save r7, it is used to store the address of the env structure and is not modified by GCC. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-20tcg/arm: fix load/store definitions for 32-bit targetsAurelien Jarno1-0/+14
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-20tcg: protect div2 in tcg/tcg-opc.hAurelien Jarno1-2/+4
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-20Fix a typo which broke Xen buildBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-20Fix mingw32 buildBlue Swirl1-3/+14
mkdir() only takes path argument on mingw32: CC i386-softmmu/vl.o /src/qemu/vl.c: In function 'qmp_add_default': /src/qemu/vl.c:3763: error: too many arguments to function 'mkdir' /src/qemu/vl.c:3769: error: too many arguments to function 'mkdir' Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-20Fix buildBlue Swirl1-6/+1
CC curses.o cc1: warnings being treated as errors /src/qemu/curses.c: In function 'curses_display_init': /src/qemu/curses.c:341: error: initialization from incompatible pointer type Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-19Introduce a default qmp sessionAnthony Liguori1-0/+52
Basically, -qmp unix:%{home}/.qemu/qmp/%{uuid}.sock,server,nowait %{uuid} will be -uuid if it's specified, otherwise, if libuuid is available, we generate a uuid. If it's not available, we don't create one. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19qmp: don't make -qmp disable the default monitorAnthony Liguori1-2/+11
Instead, we introduce a default_qmp flag. We don't use it yet, but will in the next patch. This has a user-visible impact as specifying just -qmp will now also show a monitor on the 'vc'. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19tap: invoke downscript when we exit abnormallyAnthony Liguori1-0/+16
Right now, downscript is not invoked reliably. If you execute 'quit' from the monitor, it won't be invoked. This fixes that by converting tap to use an exit_notifier to execute the downscript. In this case, allowing an exit notifier to include state is critically important for the conversion. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19Convert atexit users to exit_notifierAnthony Liguori8-12/+26
All of these users have global state so we really don't see a benefit from exit_notifier. However, using exit_notifier means that there's one less justification for having global state in the first place. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19Add exit notifiersAnthony Liguori2-0/+32
Like atexit() but with state Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19sdl: use mouse mode notifierAnthony Liguori1-11/+20
Today we poll the mouse mode whenever there is a mouse movement. There is a subtle usability problem with this though. If we're in relative mode and grab is enabled, when we change to absolute mode, we break grab. This gives a user a seamless transition when the new pointer is enabled. But because we poll for mouse change, this grab break won't occur until the user attempts to move the mouse. By using notifiers, the grab break happens as soon as possible. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19input: make vnc use mouse mode notifiersAnthony Liguori2-5/+10
When we switch to absolute mode, we send out a notification (if the client supports it). Today, we only send this notification when the client sends us a mouse event and we're in the wrong mode. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19Expose whether a mouse is an absolute device via QMP and the human monitor.Anthony Liguori1-6/+12
For QMP, we just add an attribute which is backwards compatible. For the human monitor, we add (absolute) to the end of the line. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19Add notifier for mouse mode changesAnthony Liguori2-1/+39
Right now, DisplayState clients rely on polling the mouse mode to determine when the device is changed to an absolute device. Use a notification list to add an explicit notification. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19Add kbd_mouse_has_absolute()Anthony Liguori2-0/+18
kbd_mouse_is_absolute tells us whether the current mouse handler is an absolute device. kbd_mouse_has_absolute tells us whether we have any device that is capable of absolute input. This lets us tell a user that they have configured an absolute device but that the guest is not currently using it. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19Rewrite mouse handlers to use QTAILQ and to have an activation functionAnthony Liguori3-71/+59
And convert usb-hid to use it (to avoid regression with bisection) Right now, when we do info mice and we've added a usb tablet, we don't see it until the guest starts using the tablet. We implement this behavior in order to provide a means to delay registration of a mouse handler since we treat the last registered handler as the current handler. This is a usability problem though as we would like to give the user feedback that they've either 1) not added an absolute device 2) there is an absolute device but the guest isn't using it 3) we have an absolute device and it's active. By using QTAILQ and having an explicit activation function that moves the handler to the front of the queue, we can implement the same semantics as before with respect to automatically switching to usb tablet while providing the user with a whole lot more information. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19Add support for generic notifier listsAnthony Liguori3-0/+83
Notifiers are data-less callbacks and a notifier list is a list of registered notifiers that all are interested in a particular event. We'll use this in a few patches to implement mouse change notification. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - Do not do memory allocations by placing list nodes in notifier
2010-03-19Revert "usb-linux: remove unreachable default in switch statement"Anthony Liguori1-0/+3
This reverts commit 3c9c706c3b66d838942aba53c0d3fdcdf06c7423. This breaks build (gcc 4.3.2): CC usb-linux.o cc1: warnings being treated as errors /src/qemu/usb-linux.c: In function 'usb_linux_update_endp_table': /src/qemu/usb-linux.c:759: error: 'type' may be used uninitialized in this function Reported-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19Handle deleted IOHandlers in a single bufferJuan Quintela1-10/+7
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19bt: remove bt_host_read_poll()Juan Quintela1-8/+1
It allways returned true, that is the equivalent of not having the callback. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19rename IOCanRWHandler to IOCanReadHandlerJuan Quintela5-10/+9
It was always only used for reads Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19remove useless castJuan Quintela2-4/+2
values are already pointers, no need to cast them to void * Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19Convert io handlers to QLISTJuan Quintela1-21/+14
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-19CODING_STYLE: Reserve qemu_ prefix for library wrappersAvi Kivity1-0/+3
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-18Fix OpenBSD linker warningBlue Swirl1-1/+2
qemu-option.o(.text+0x20f8): In function `qemu_opts_from_qdict_1': /src/qemu/qemu-option.c:813: warning: strcpy() is almost always misused, please use strlcpy() Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-18Replace assert(0) with abort() or cpu_abort()Blue Swirl13-56/+56
When building with -DNDEBUG, assert(0) will not stop execution so it must not be used for abnormal termination. Use cpu_abort() when in CPU context, abort() otherwise. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-18Fix manpage errorsBlue Swirl2-7/+7
Split long unbreakable lines to smaller sections. Spotted by Debian Lintian tool: http://lintian.debian.org/full/pkg-qemu-devel@lists.alioth.debian.org.html#qemu Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-17hw/usb-msd: fix some usb requestsArnaud Patard (Rtp)1-3/+5
The usb-msd device emulation needs some small tweaks in the requests emulations. For instance, the reset/maxlun requests are class/interface specific so requests for them with the type class and recipient interface bits sets have to be handled. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-17scsi-disk: fix buffer overflowGerd Hoffmann1-1/+3
In case s->version is shorter than 4 bytes we overflow the memcpy src buffer. Fix it by clearing the target buffer, then copy only the amount of bytes we actually have. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-17vnc: add no-lock-key-sync optionGerd Hoffmann2-4/+13
Add an option to disable the heuristics which try to keep capslock and numlock state for guest and host in sync. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-17migration: unix migration should obey autostart are the other onesJuan Quintela1-0/+2
This was the only incoming migration without autostart check Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-17migration: Clear fd also in error casesJuan Quintela4-10/+8
Not clearing the fd and closing the file makes qemu spin using 100%CPU after incoming migration error. See for instance bug: https://bugzilla.redhat.com/show_bug.cgi?id=518032 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-17read-only: Another minor cleanupNaphtali Sprei1-2/+1
Don't rely on CDROM hint for read_only attribute Signed-off-by: Naphtali Sprei <nsprei@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-17read-only: minor cleanupNaphtali Sprei1-0/+1
Really use read-only flags for opening the file when asked for read-only Signed-off-by: Naphtali Sprei <nsprei@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-17split out qemu-timer.cPaolo Bonzini7-1167/+1237
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>