aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-08-05sdl: Drop bogus gui_fullscreen_initial_grabJan Kiszka1-3/+1
There must be no difference between initial -full-screen and switching to this mode via the hot key. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-05sdl: Restore scaling mode on return from full screenJan Kiszka1-15/+33
Save the scaling mode and its geometry when going full screen, restore it when returning to windowed mode. CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-05sdl: Fix full screen toggling from scaled modeJan Kiszka1-1/+2
When switching to full screen mode from a scaled window, we need to resize to DisplayState's dimension, not the scaled "real" screen size. Moreover, scaling mode may have manipulated the bpp. So we need to restore it from the DisplayState as well. CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-05sdl: Properly mark modifier+u as hotkeyJan Kiszka1-0/+1
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-05sdl: Avoid redundant scaling deactivationJan Kiszka1-4/+6
Prevents screen flickering. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-05sdl: Do not make full screen mode resizableJan Kiszka1-2/+5
This prevents continuous resizing events and improper screen setups when going full screen. CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-05sdl: Fix termination in -no-shutdown modeJan Kiszka1-1/+3
Just like the monitor does, we need to clear no_shutdown before calling qemu_system_shutdown_request on quit requests. Otherwise, QEMU just stops the VM. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-05Check fread() results to avoid gcc 4.6 warningsDavid Gibson1-0/+13
When compiling with gcc 4.6, some code in fw_cfg.c complains that fop_ret is assigned but not used (which is true). However, it looks like the meaningless assignments to fop_ret were done to suppress other gcc warnings due to the fact that fread() is labelled as warn_unused_result in glibc. This patch avoids both errors, by actually checking the fread() result code and dropping out with an error message if it fails. Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-05MAINTAINERS: add entry for XenStefano Stabellini1-0/+10
Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-05qcow2: Fix L1 table size after bdrv_snapshot_gotoKevin Wolf1-5/+11
When loading an internal snapshot whose L1 table is smaller than the current L1 table, the size of the current L1 would be shrunk to the snapshot's L1 size in memory, but not on disk. This lead to incorrect refcount updates and eventuelly to image corruption. Instead of writing the new L1 size to disk, this simply retains the bigger L1 size that is currently in use and makes sure that the unused part is zeroed. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Tested-by: Philipp Hahn <hahn@univention.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-05slirp: Only start packet expiration for delayed onesJan Kiszka2-3/+3
The expiration timeout must only affect packets that are queued due to pending ARP resolutions. The old version broke ping e.g. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2011-08-05slirp: Read current time only once per if_start callJan Kiszka1-4/+1
No need to update the current time for each packet we send from the queue. Processing time is comparably short. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2011-08-05slirp: Fix types of IP address parametersJan Kiszka2-10/+10
Should be uint32_t for IPv4, not int. Also avoid in_addr_t without proper includes. Fixes build regression on mingw32. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2011-08-05Merge branch 'master' of git://git.qemu.org/qemumalc326-4173/+10298
2011-08-04Merge remote-tracking branch 'mst/for_anthony' into stagingAnthony Liguori10-31/+79
2011-08-04Merge remote-tracking branch 'alon/pull-libcacard.data' into stagingAnthony Liguori1-3/+2
2011-08-04Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori3-4/+3
2011-08-04Merge remote-tracking branch 'spice/spice.v40' into stagingAnthony Liguori5-69/+528
2011-08-04Merge remote-tracking branch 'kiszka/queues/slirp' into stagingAnthony Liguori10-98/+241
2011-08-04Merge remote-tracking branch 'kraxel/usb.22' into stagingAnthony Liguori27-859/+1088
2011-08-04Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori35-667/+1721
2011-08-04guest agent: add --enable-guest-agent config optionMichael Roth1-13/+27
QAPI will require glib/python, but for now the guest agent is the only user. For now, make these dependencies an explicit guest agent one, and give users the option to disable it if need be. Once QAPI is adopted in core QEMU code, we would basically revert this patch. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-04Add support for finding libpng via pkg-config.Brad1-0/+6
Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-04alpha-softmmu: Disable for the 0.15 release branch.Richard Henderson1-1/+0
The system emulation code was not merged before the branch. Let's leave that work for the next release. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-04configure: Fix bad shell expression for non-Linux hostsStefan Weil1-4/+4
With vhost_net="" (most non-Linux hosts), configure prints an error message: test: 2551: =: unexpected operator Fix this and similar code by adding the missing "". Cc: Wolfgang Mauerer <wolfgang.mauerer@siemens.com> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-04virtio-balloon: Unregister savevm section on device unplugAmit Shah1-0/+4
Migrating after unplugging a virtio-balloon device resulted in an error message on the destination: Unknown savevm section or instance '0000:00:04.0/virtio-balloon' 0 load of migration failed Fix this by unregistering the section on device unplug. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2011-08-04virtio-balloon: Add exit handler, fix memleaksAmit Shah3-1/+16
Add an exit handler that will free up RAM after a virtio-balloon device is unplugged. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2011-08-04balloon: Reject negative balloon valuesAmit Shah1-1/+7
Negative balloon values don't make sense, reject them and throw a qerror with QERR_INVALID_PARAMETER_VALUE. Reported-by: Mike Cao <bcao@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2011-08-04virtio-balloon: Check if balloon registration failedAmit Shah2-1/+11
Multiple balloon registrations are not allowed; check if the registration with the qemu balloon api succeeded. If not, fail the device init. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2011-08-04balloon: Don't allow multiple balloon handler registrationsAmit Shah2-4/+12
Multiple balloon devices don't make sense; disallow more than one registration attempt to register handlers. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2011-08-04virtio-balloon: Fix header comment; add CopyrightAmit Shah1-1/+3
Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-08-04balloon: Fix header comment; add CopyrightAmit Shah1-2/+3
Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-08-04balloon: Separate out stat and balloon handlingAmit Shah3-15/+17
Passing on '0' as ballooning target to indicate retrieval of stats is bad API. It also makes 'balloon 0' in the monitor cause a segfault. Have two different functions handle the different functionality instead. Detailed explanation from Markus's review: 1. do_info_balloon() is an info_async() method. It receives a callback with argument, to be called exactly once (callback frees the argument). It passes the callback via qemu_balloon_status() and indirectly through qemu_balloon_event to virtio_balloon_to_target(). virtio_balloon_to_target() executes its balloon stats half. It stores the callback in the device state. If it can't send a stats request, it resets stats and calls the callback right away. Else, it sends a stats request. The device model runs the callback when it receives the answer. Works. 2. do_balloon() is a cmd_async() method. It receives a callback with argument, to be called when the command completes. do_balloon() calls it right before it succeeds. Odd, but should work. Nevertheless, it passes the callback on via qemu_ballon() and indirectly through qemu_balloon_event to virtio_balloon_to_target(). a. If the argument is non-zero, virtio_balloon_to_target() executes its balloon half, which doesn't use the callback in any way. Odd, but works. b. If the argument is zero, virtio_balloon_to_target() executes its balloon stats half, just like in 1. It either calls the callback right away, or arranges for it to be called later. Thus, the callback runs twice: use after free and double free. Test case: start with -S -device virtio-balloon, execute "balloon 0" in human monitor. Runs the callback first from virtio_balloon_to_target(), then again from do_balloon(). Reported-by: Mike Cao <bcao@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2011-08-04virtio-balloon: Separate status handling into separate functionAmit Shah1-20/+31
Separate out the code to retrieve balloon info from the code that sets balloon values. This will be used to separate the two callbacks from balloon.c and help cope with 'balloon 0' on the monitor. Currently, 'balloon 0' causes a segfault in monitor_resume(). Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2011-08-04balloon: Simplify code flowAmit Shah1-9/+7
Replace: if (foo) { ... } else { return 0; } by if (!foo) { return 0; } ... Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2011-08-04balloon: Add braces around if statementsAmit Shah1-3/+4
Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2011-08-04balloon: Make functions, local vars staticAmit Shah2-15/+11
balloon.h had function declarations for a couple of functions that are local to balloon.c. Make them static. Drop the 'qemu_' prefix for balloon.c-local variables, and make them static. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2011-08-04bluetooth: kill dummy usb device, use hid code directly.Gerd Hoffmann1-40/+22
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-04hid: move idle+protocol from usb-hid to hid too.Gerd Hoffmann3-23/+25
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-04usb-hid: split hid code to hw/hid.[ch]Gerd Hoffmann4-395/+452
Almost pure code motion. Unstatic hid interface functions and add them to the header file. Some renames. Some code style cleanups. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-04usb-hid: add hid_has_events()Gerd Hoffmann1-9/+7
Add hid_has_events function, use it to figure whenever there are pending events instead of checking and updating USBHIDState->changed. Setting ->changed to 1 on init is removed, that should have absolutely no effect as the initial state of ->idle is 0 so we report hid state anyway until the guest configures some idle time. Also should clear ->idle on reset. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-04usb-hid: add event callbackGerd Hoffmann1-43/+63
Add callback for event notification, which allows to un-usbify more functions. Also split separate hid_* functions for reset and release. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-04usb-hid: create & use HIDStateGerd Hoffmann1-148/+168
First step in separating out the HID emulation code from usb-hid, so it can be reused without creating a dummy usb device like bluetooth does. This creates a HIDState struct, moves the non-usbish fields from USBHIDStruct there. Renames non-usbish structs, defines and functions from usb* to hid*. Adapts the code to that. Also cleans up a bunch of code style issues along the way. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-04ehci: iovec support, remove bufferGerd Hoffmann1-86/+63
Map guest memory and pass on a direct pointer instead of copying the bits to a indirect buffer. EHCI transfer descriptors can reference multiple (physical guest) pages so we'll actually start seeing usb packets wich carry iovec with more than one element. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-04uhci: remove bufferGerd Hoffmann1-8/+7
Map guest memory and pass on a direct pointer instead of copying the bits to a indirect buffer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-04usb-storage: iovec supportGerd Hoffmann1-58/+49
Add full iovec support to usb-storage. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-04usb-host: iovec supportGerd Hoffmann1-9/+18
Add full support for iovecs to usb-host. The code can split large transfers into smaller ones already, we are using this to also split requests at iovec borders. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-04usb-serial: iovec supportGerd Hoffmann1-11/+16
Add full support for iovecs to usb-serial. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-04usb: use iovecs in USBPacketGerd Hoffmann21-222/+338
Zap data pointer from USBPacket, add a QEMUIOVector instead. Add a bunch of helper functions to manage USBPacket data. Switch over users to the new interface. Note that USBPacket->len was used for two purposes: First to pass in the buffer size and second to return the number of transfered bytes or the status code on async transfers. There is a new result variable for the latter. A new status code was added to catch uninitialized result. Nobody creates iovecs with more than one element (yet). Some users are (temporarely) limited to iovecs with a single element to keep the patch size as small as possible. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-04move QEMUSGList typedefGerd Hoffmann2-2/+3
Move the QEMUSGList typedef to qemu-common so it can easily be used. The actual struct definition stays in dma.h. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>