aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-02-20tcg: Optional target implementation of ORC.Richard Henderson
Previously ORC was always implemented by tcg-op.h with an explicit NOT opcode. Allow a target implementation. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-20tcg: Optional target implementation of ANDC.Richard Henderson
Previously ANDC was always implemented by tcg-op.h with an explicit NOT opcode. Allow a target implementation. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-20tcg-sparc: Implement not.Richard Henderson
The fallback implementation of "ret = arg1 ^ -1" isn't ideal because of the extra tcg op to load the minus one. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-20tcg-sparc: Implement neg.Richard Henderson
The fallback implementation of "ret = 0 - arg1" isn't ideal, first because of the extra tcg op to load the zero, and second because we fail to handle zero as %g0 for arg1 of the sub. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-20Fix warning on mingw32Blue Swirl
/src/qemu/hw/ide/core.c: In function 'ide_drive_pre_save': /src/qemu/hw/ide/core.c:2740: warning: comparison is always false due to limited range of data type Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-20Fix warning on OpenBSDBlue Swirl
/src/qemu/net.c: In function `net_check_clients': /src/qemu/net.c:1287: warning: `has_nic' might be used uninitialized in this function /src/qemu/net.c:1287: warning: `has_host_dev' might be used uninitialized in this function Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-20tcg/ppc: Consistently use calling convention selection macrosmalc
Signed-off-by: malc <av1474@comtv.ru>
2010-02-20Use ppc host calling convention definitions to set ↵Juergen Lock
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 Lock
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 Lock
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 Wolf
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 Wolf
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 Wolf
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 Wolf
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 Sorensen
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 Tosatti
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 Shah
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. Tsirkin
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 Shah
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 Shah
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'Connor
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 Sprei
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 Weil
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 Litke
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Capitulino
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 Bonzini
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 Bonzini
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 Bonzini
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 Liguori
2010-02-19net: Monitor command set_link finds only VLAN clients, fixMarkus Armbruster
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>