aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-02-20Use ppc host calling convention definitions to set ↵Juergen Lock1-3/+3
TCG_TARGET_CALL_{ALIGN_ARGS,STACK_OFFSET}. New version after malc's comments. (This avoids having to do #if defined __linux__ || defined __FreeBSD__ || defined __FreeBSD_kernel__ for the third case.) Submitted by: Andreas Tobler <andreast@fgznet.ch> (original version) Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> Signed-off-by: malc <av1474@comtv.ru>
2010-02-20Add FreeBSD/ppc host ucontext definitions.Juergen Lock1-0/+18
Submitted by: Andreas Tobler <andreast@fgznet.ch> Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> Signed-off-by: malc <av1474@comtv.ru>
2010-02-20Add FreeBSD/ppc host ppc_init_cacheline_sizes() implementation.Juergen Lock1-0/+21
New version after malc's comments. (Added error handling.) Submitted by: Andreas Tobler <andreast@fgznet.ch> Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> Signed-off-by: malc <av1474@comtv.ru>
2010-02-19qemu-img: Fix error messageKevin Wolf1-1/+1
When qemu-img can't open the new backing file for a rebase, it prints an error message which contains the file name of the old backing file. This is wrong, obviously. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19qemu-img: Fix segfault during rebaseKevin Wolf1-1/+1
This fixes a possible read beyond the end of the temporary buffers used for comparing data in the old and the new backing file. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19qcow2: Fix access after end of arrayKevin Wolf1-2/+6
If a write requests crosses a L2 table boundary and all clusters until the end of the L2 table are usable for the request, we must not look at the next L2 entry because we already have arrived at the end of the array. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19qdev: Free opts on failed do_device_addKevin Wolf1-2/+5
If the device can't be created, don't leak the QemuOpts and release the id of the device that should have been added by the failed device_add. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19QEMU e820 reservation patchJes Sorensen3-0/+53
Hi, Kevin and I have agreed on the approach for this one now. So here is the latest version of the patch for QEMU, submitting e820 reservation entries via fw_cfg. Cheers, Jes Use qemu-cfg to provide the BIOS with an optional table of e820 entries. Notify the BIOS of the location of the TSS+EPT range to by reserving it via the e820 table. This matches a corresponding patch for Seabios, however older versions of Seabios will default to the hardcoded address range and stay compatible with current QEMU. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19ide save/restore pio/atapi cmd transfer fields and io bufferMarcelo Tosatti2-2/+62
Save/restore information necessary to continue in progress PIO/ATAPI CMD transfers. This includes the IO buffer. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19virtio-serial: pci: Allow MSI to be disabledAmit Shah1-3/+3
Michael noted we don't allow disabling of MSI for the virtio-serial-pci device. Fix that. Signed-off-by: Amit Shah <amit.shah@redhat.com> CC: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19virtio-serial: don't set MULTIPORT for 1 port devMichael S. Tsirkin1-2/+4
Since commit 98b19252cf1bd97c54bc4613f3537c5ec0aae263, all serial devices declare MULTIPORT feature. To allow 0.12 compatibility, we should clear this when max_nr_ports is 1. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19pc: Add backward compatibility options for virtio-serialAmit Shah1-0/+28
virtio-serial-pci can support multiple ports in the current development version that will become 0.13. Add compatibility options for the 0.12 and 0.11 pc machine types. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19pc: Bump up pc version to 0.13 and add a 0.12 compat versionAmit Shah1-1/+9
The version 0.13 will be the new default and compatibility options will be added to the 0.12 version. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19USB HID does not support Set_IdleKevin O'Connor1-2/+10
I found that the QEMU USB keyboard support does not work properly with the Set_Idle command. Once a non-zero value is given to Set_Idle, then the keyboard reports an event on every poll - not based on the time issued in the Set_Idle command. I changed the code (see patch below) and it works for me. I'm not that familiar with the qemu internals, so I'm not sure if this is the best way to implement this feature. -Kevin Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19block: more read-only changes, related to backing filesNaphtali Sprei2-12/+73
Open backing file read-only where possible Upgrade backing file to read-write during commit, back to read-only after commit If upgrade fail, back to read-only. If also fail, "disconnect" the drive. Signed-off-by: Naphtali Sprei <nsprei@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19mingw32: Enable C99/POSIX format stringsStefan Weil1-0/+2
Starting with mingw32-runtime 3.15, C99/POSIX format strings (%zu, %lld, ...) are supported by defining __USE_MINGW_ANSI_STDIO=1. As QEMU uses such format strings, unconditionally define this macro. It won't hurt on older revisions of mingw32-runtime. Tested with manually installed mingw32-runtime 3.15 on debian (cross compiled + wine). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Fix hanging user monitor when using balloon commandAdam Litke1-0/+1
Arghh... Adding missing S-O-B Hi Anthony. I wonder if there was a problem when importing my async command handler patchset. Since the 'balloon' command completes immediately, it must call the completion callback before returning. That call was missing but is added by the patch below. Signed-off-by: Adam Litke <agl@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Report more than one error in handlersLuiz Capitulino1-1/+2
Handlers can generate only one error in a call, we let the programmer know if they brake this rule and clients will only get the first generated error. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Debug stray prints the right wayLuiz Capitulino1-1/+41
QObject Monitor handlers should not call any Monitor print function: they should only build objects, printing is done by common code. Current QMP code will ignore such calls, as we can't send garbage to clients, additionally it will also emit an undefined error on the assumption that print calls usually report errors. However, the right way to deal with this is to rely on a return code. This has been fixed by other commit already. Now, this commit drops the error from monitor_vprintf() and adds a better debugging mechanism for those 'stray' prints: we count them if debug is enabled and let the developer know if a QObject handler is trying to print anything. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Audit handler returnLuiz Capitulino1-1/+31
This commit verifies the following two rules specified by Markus Armbruster: 1. If the handler returns failure, it must have passed an error. If it didn't, it's broken. Report an internal error to the client, and report the bug to the programmer. 2. If the handler returns success, it must not have passed an error. If it did, it's broken. Report the error to the client, and report the bug to the programmer. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Drop the print disabling mechanismLuiz Capitulino1-9/+9
We can ignore calls to monitor_vprintf() in QMP mode and use monitor_puts() directly in monitor_json_emitter(). This allows us to drop this ugly hack. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Debugging supportLuiz Capitulino2-0/+18
Add configure options (--enable-debug-mon and --disable-debug-mon) plus the MON_DEBUG() macro. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Rename cmd_new_ret()Luiz Capitulino2-28/+23
Now that all handlers are converted to cmd_new_ret(), we can rename it back to cmd_new(). But now it returns a value. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert do_change() to cmd_new_ret()Luiz Capitulino3-26/+42
Not that trivial as the call chain also has to be modified. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert do_info() to cmd_new_ret()Luiz Capitulino2-4/+6
Note that this function only fails in QMP, in the user Monitor it prints the help text instead. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert do_physical_memory_save() to cmd_new_ret()Luiz Capitulino2-3/+8
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert do_memory_save() to cmd_new_ret()Luiz Capitulino2-3/+8
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert do_migrate() to cmd_new_ret()Luiz Capitulino3-14/+19
While there I'm also dropping a unneeded else clause (the last one in the function). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert pci_device_hot_remove() to cmd_new_ret()Luiz Capitulino3-11/+11
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert pci_device_hot_add() to cmd_new_ret()Luiz Capitulino3-7/+13
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert do_closefd() to cmd_new_ret()Luiz Capitulino2-3/+4
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert do_getfd() to cmd_new_ret()Luiz Capitulino2-6/+7
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert do_block_set_passwd() to cmd_new_ret()Luiz Capitulino2-3/+6
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert do_cpu_set() to cmd_new_ret()Luiz Capitulino2-3/+6
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert do_eject() to cmd_new_ret()Luiz Capitulino2-4/+4
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert do_cont() to cmd_new_ret()Luiz Capitulino2-3/+7
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Convert simple handlers to cmd_new_ret()Luiz Capitulino4-24/+36
The following handlers always succeed and hence can be converted to cmd_new_ret() in the same commit. - do_stop() - do_quit() - do_system_reset() - do_system_powerdown() - do_migrate_cancel() - do_qmp_capabilities() - do_migrate_set_speed() - do_migrate_set_downtime() Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Monitor: Introduce cmd_new_ret()Luiz Capitulino1-1/+6
In order to implement the new error handling and debugging mechanism for command handlers, we need to change the cmd_new() callback to return a value. This commit introduces cmd_new_ret(), which returns a value and will be used only temporarily to handle the transition from cmd_new(). That is, as soon as all command handlers are ported to cmd_new_ret(), it will be renamed back to cmd_new() and the new error handling and debugging mechanism will be added on top of it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19move default allocator to console.cPaolo Bonzini3-118/+112
Moving stuff in console.c to avoid the need for prototypes makes this patch a bit bigger, but there's no change in the code. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19remove knowledge of defaultallocator_free_displaysurface from sdl.cPaolo Bonzini2-5/+7
Let register_displayallocator hand over the old width/height to the new allocator. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19use lazy initialization for display_statePaolo Bonzini1-14/+15
Ensure initialization of a dumb display, if needed, by making all accesses go through get_displaystate. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori20-239/+511
2010-02-19net: Monitor command set_link finds only VLAN clients, fixMarkus Armbruster1-0/+1
Clients not associated with a VLAN exist since commit d80b9fc6. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19net: info network shows only VLAN clients, fixMarkus Armbruster1-2/+9
Clients not associated with a VLAN exist since commit d80b9fc6. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19net: net_check_clients() checks only VLAN clients, fixMarkus Armbruster1-0/+7
Clients not associated with a VLAN exist since commit d80b9fc6. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19net: Fix bogus "Warning: vlan 0 with no nics" with -deviceMarkus Armbruster7-28/+18
net_check_clients() prints this when an VLAN has host devices, but no guest devices. It uses VLANState members nb_guest_devs and nb_host_devs to keep track of these devices. However, -device does not update nb_guest_devs, only net_init_nic() does that, for -net nic. Check the VLAN clients directly, and remove the counters. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19net: net_check_clients() runs too early to see -device, fixMarkus Armbruster3-3/+4
Call it right after -device devices get created. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19net: Remove unused net_client_uninit()Markus Armbruster2-15/+0
Unused since commit 9ad4531e. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-19Fix strace or FUTEX_PRIVATE_FLAGPaul Brook1-1/+3
FUTEX_PRIVATE_FLAG is a bit orred with an existing futex op, not a distinct value. Signed-off-by: Paul Brook <paul@codesourcery.com>
2010-02-19target-arm: support thumb exception handlersRabin Vincent1-3/+2
When handling an exception, switch to the correct mode based on the Thumb Exception (TE) bit in the SCTLR. Signed-off-by: Rabin Vincent <rabin@rab.in>