summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-06-28gtk: add support for surface conversionGerd Hoffmann1-23/+40
Also use CAIRO_FORMAT_RGB24 unconditionally. DisplaySurfaces will never ever see 8bpp surfaces. And using CAIRO_FORMAT_RGB16_565 for the 16bpp case doesn't seem to be a good idea too. <quote src="/usr/include/cairo/cairo.h"> * @CAIRO_FORMAT_RGB16_565: This format value is deprecated. It has * never been properly implemented in cairo and should not be used * by applications. (since 1.2) </quote> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1372150134-8590-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-28vl: convert -smp to qemu_opts_parse()Michael Tokarev2-55/+71
This also introduces a new suboption, "cpus=", which is the default. So after this patch, -smp n,sockets=y is the same as -smp cpus=n,sockets=y (with "cpu" being some generic thing, referring to either cores, or threads, or sockets, as before). We still don't validate relations between different numbers, for example it is still possible to say -smp 1,sockets=10 and it will be accepted to mean sockets=1. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Message-id: 1372072012-30305-1-git-send-email-mjt@msgid.tls.msk.ru Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-28multiboot: Updated ROM binaryKevin Wolf1-0/+0
Signed-off-by: Kevin Wolf <mail@kevin-wolf.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1372018066-21822-4-git-send-email-mail@kevin-wolf.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-28multiboot: Calculate upper_mem in the ROMKevin Wolf2-2/+40
The upper_mem field of the Multiboot information struct doesn't really contain the RAM size - 1 MB like we used to calculate it, but only the memory from 1 MB up to the first (upper) memory hole. In order to correctly retrieve this information, the multiboot ROM now looks at the mmap it creates anyway and tries to find the size of contiguous usable memory from 1 MB. Drop the multiboot.c definition of lower_mem and upper_mem because both are queried at runtime now. Signed-off-by: Kevin Wolf <mail@kevin-wolf.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1372018066-21822-3-git-send-email-mail@kevin-wolf.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-28multiboot: Don't forget last mmap entryKevin Wolf1-18/+17
When the BIOS returns ebx = 0, the current entry is still valid and needs to be included in the Multiboot memory map. Fixing this meant that using bx as the entry index doesn't work any more because it's 0 on the last entry (and it was SeaBIOS-specific anyway), so the whole loop had to change a bit and should be more generic as a result (ebx can be an arbitrary continuation number now, and the entry size returned by the BIOS is used instead of hard-coding 20 bytes). Signed-off-by: Kevin Wolf <mail@kevin-wolf.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1372018066-21822-2-git-send-email-mail@kevin-wolf.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-28arch_init: Fix format string by using RAM_ADDR_FMTStefan Weil1-2/+3
length is a ram_addr_t, so RAM_ADDR_FMT must be used instead of %ld. This fixes a recently introduced regression for w64 builds. Using RAM_ADDR_FMT also changes decimal output to sedecimal. This is good here because length and block->length should both use the same base in the error message. Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-id: 1372359606-2759-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-28doc: we use seabios, not bochs biosMichael Tokarev1-1/+1
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-socket: don't leak opts on errorGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-char: report udp backend errorsGerd Hoffmann1-0/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-char: add -chardev mux supportGerd Hoffmann1-0/+18
Allow to explicitly create mux chardevs on the command line, like you can using QMP. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-char: minor mux chardev fixesGerd Hoffmann1-4/+3
mux failure path has a memory leak. creating a mux chardev can't fail though, so just assert() that instead of fixing an error path which never ever runs anyway ... Also fix bid being leaked while being at it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-char: use ChardevBackendKind in CharDriverGerd Hoffmann2-3/+3
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-char: don't leak opts on errorGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-char: fix documentation for telnet+wait socket flagsGerd Hoffmann1-3/+4
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-char: print notification to stderrGerd Hoffmann1-2/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-char: use more specific error_setg_* variantsGerd Hoffmann1-2/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-char: check optional fields using has_*Gerd Hoffmann1-2/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-socket: catch monitor_get_fd failuresGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-socket: drop pointless allocationGerd Hoffmann1-1/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28qemu-socket: zero-initialize SocketAddressGerd Hoffmann1-2/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-28Merge remote-tracking branch 'afaerber/qom-cpu' into stagingAnthony Liguori99-319/+572
# By Andreas Färber # Via Andreas Färber * afaerber/qom-cpu: (24 commits) cpu: Turn cpu_unassigned_access() into a CPUState hook hwaddr: Make hwaddr type usable beyond softmmu cpu: Change qemu_init_vcpu() argument to CPUState cpus: Change qemu_dummy_start_vcpu() argument to CPUState cpus: Change qemu_kvm_start_vcpu() argument to CPUState cpus: Change cpu_handle_guest_debug() argument to CPUState gdbstub: Set gdb_set_stop_cpu() argument to CPUState kvm: Change kvm_cpu_exec() argument to CPUState kvm: Change kvm_handle_internal_error() argument to CPUState cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks cpus: Change qemu_kvm_init_cpu_signals() argument to CPUState kvm: Change kvm_set_signal_mask() argument to CPUState cpus: Change qemu_kvm_wait_io_event() argument to CPUState cpus: Change cpu_thread_is_idle() argument to CPUState cpu: Change cpu_exit() argument to CPUState kvm: Change cpu_synchronize_state() argument to CPUState kvm: Change kvm_cpu_synchronize_state() argument to CPUState gdbstub: Simplify find_cpu() cpu: Guard cpu_{save,load}() definitions target-openrisc: Register VMStateDescription for OpenRISCCPU ...
2013-06-28Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori33-163/+1198
# By Stefan Hajnoczi (11) and others # Via Kevin Wolf * kwolf/for-anthony: cmd646: fix build when DEBUG_IDE is enabled. block: change default of .has_zero_init to 0 vpc: Implement .bdrv_has_zero_init vmdk: remove wrong calculation of relative path gluster: Return bdrv_has_zero_init = 0 block/ssh: Set bdrv_has_zero_init according to the file type. block: Make BlockJobTypes const qemu-iotests: add 055 drive-backup test case qemu-iotests: extract wait_until_completed() into iotests.py blockdev: add Abort transaction blockdev: add DriveBackup transaction blockdev: allow BdrvActionOps->commit() to be NULL blockdev: rename BlkTransactionStates to singular block: add drive-backup QMP command blockdev: use bdrv_getlength() in qmp_drive_mirror() blockdev: drop redundant proto_drv check block: add basic backup support to block driver block: add bdrv_add_before_write_notifier() notify: add NotiferWithReturn so notifier list can abort raw-posix: Fix /dev/cdrom magic on OS X Message-id: 1372429509-29642-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-28cmd646: fix build when DEBUG_IDE is enabled.Mark Cave-Ayland1-2/+2
Make sure we use the correct TARGET/PRI macros in the debug statements. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-06-28block: change default of .has_zero_init to 0Peter Lieven11-16/+17
.has_zero_init defaults to 1 for all formats and protocols. this is a dangerous default since this means that all new added drivers need to manually overwrite it to 0 if they do not ensure that a device is zero initialized after bdrv_create(). if a driver needs to explicitly set this value to 1 its easier to verify the correctness in the review process. during review of the existing drivers it turned out that ssh and gluster had a wrong default of 1. both protocols support host_devices as backend which are not by default zero initialized. this wrong assumption will lead to possible corruption if qemu-img convert is used to write to such a backend. vpc and vmdk also defaulted to 1 altough they support fixed respectively flat extends. this has to be addresses in separate patches. both formats as well as the mentioned ssh and gluster are turned to the default of 0 with this patch for safety. a similar problem with the wrong default existed for iscsi most likely because the driver developer did oversee the default value of 1. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-06-28cpu: Turn cpu_unassigned_access() into a CPUState hookAndreas Färber16-45/+124
Use it for all targets, but be careful not to pass invalid CPUState. cpu_single_env can be NULL, e.g. on Xen. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28hwaddr: Make hwaddr type usable beyond softmmuAndreas Färber4-4/+6
While not normally needed for *-user, it can safely be used there since always based on uint64_t, to avoid ifdeffery. To avoid accidental uses, move the guards from exec/hwaddr.h to its inclusion sites. No need for them in include/hw/. Prepares for hwaddr use in qom/cpu.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpu: Change qemu_init_vcpu() argument to CPUStateAndreas Färber21-40/+17
This allows to move the call into CPUState's realizefn. Therefore move the stub into libqemustub.a. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpus: Change qemu_dummy_start_vcpu() argument to CPUStateAndreas Färber1-9/+6
Pass it to qemu_dummy_cpu_thread_fn(). Use CPUState::env_ptr for cpu_single_env. Prepares for changing qemu_init_vcpu() argument to CPUState. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpus: Change qemu_kvm_start_vcpu() argument to CPUStateAndreas Färber1-8/+5
Pass it on to qemu_kvm_cpu_thread_fn(). Prepares for changing qemu_init_vcpu() argument to CPUState. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpus: Change cpu_handle_guest_debug() argument to CPUStateAndreas Färber1-5/+3
CPUArchState is no longer needed. Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28gdbstub: Set gdb_set_stop_cpu() argument to CPUStateAndreas Färber3-3/+5
Use CPUState::env_ptr for now. Prepares for changing cpu_handle_guest_debug() argument to CPUState. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28kvm: Change kvm_cpu_exec() argument to CPUStateAndreas Färber4-6/+5
It no longer uses CPUArchState. Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState. Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28kvm: Change kvm_handle_internal_error() argument to CPUStateAndreas Färber1-4/+2
It no longer uses CPUArchState. Prepares for changing kvm_cpu_exec() argument to CPUState. Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpu: Turn cpu_dump_{state,statistics}() into CPUState hooksAndreas Färber63-86/+242
Make cpustats monitor command available unconditionally. Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec() arguments to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpus: Change qemu_kvm_init_cpu_signals() argument to CPUStateAndreas Färber1-4/+3
CPUArchState is no longer needed. Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28kvm: Change kvm_set_signal_mask() argument to CPUStateAndreas Färber4-5/+5
CPUArchState is no longer needed. Prepares for changing qemu_kvm_init_cpu_signals() argument to CPUState. Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpus: Change qemu_kvm_wait_io_event() argument to CPUStateAndreas Färber1-4/+2
It no longer uses CPUArchState. Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpus: Change cpu_thread_is_idle() argument to CPUStateAndreas Färber1-5/+3
It no longer needs CPUArchState. Prepares for changing all_cpu_threads_idle() CPU loop to CPUState and needed for changing qemu_kvm_wait_io_event() argument to CPUState. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpu: Change cpu_exit() argument to CPUStateAndreas Färber13-20/+24
It no longer depends on CPUArchState, so move it to qom/cpu.c. Prepares for changing GDBState::c_cpu to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28kvm: Change cpu_synchronize_state() argument to CPUStateAndreas Färber13-27/+28
Change Monitor::mon_cpu to CPUState as well. Reviewed-by: liguang <lig.fnst@cn.fujitsu.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28kvm: Change kvm_cpu_synchronize_state() argument to CPUStateAndreas Färber5-12/+10
It no longer relies on CPUArchState since 20d695a. Reviewed-by: liguang <lig.fnst@cn.fujitsu.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28gdbstub: Simplify find_cpu()Andreas Färber1-8/+4
Use qemu_get_cpu() and CPUState::env_ptr. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpu: Guard cpu_{save,load}() definitionsAndreas Färber1-0/+2
A few targets already managed to implement cpu_save() and cpu_load() without defining CPU_SAVE_VERSION that causes them to be registered. Guard the prototypes with CPU_SAVE_VERSION to avoid this happening again until all targets are converted to VMState (or QIDL). Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28target-openrisc: Register VMStateDescription for OpenRISCCPUAndreas Färber3-11/+19
Since commit e67db06e9f6d7e514ee2a9b9b769ecd42977f6fb (target-or32: Add target stubs and QOM cpu) a VMStateDescription existed, but CPU_SAVE_VERSION was not set, so it was never registered. Drop cpu_{save,load}() and register VMStateDescription via DeviceState. Use a version_id of 1 and specify minimum versions as well. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28target-alpha: Register VMStateDescription for AlphaCPUAndreas Färber3-12/+22
Commit b758aca1f6cdb175634812b79f5560c36c902d00 (target-alpha: Enable the alpha-softmmu target.) introduced cpu_{save,load}() functions but didn't define CPU_SAVE_VERSION, so they were never registered. Drop cpu_{save,load}() and register the VMStateDescription via DeviceClass. This operates on the AlphaCPU object instead of CPUAlphaState. Reviewed-by: Juan Quintela <quintela@redhat.com> Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpu: Introduce VMSTATE_CPU() macro for CPUStateAndreas Färber2-3/+16
To be used to embed common CPU state into CPU subclasses. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpu: Introduce device_class_set_vmsd() helperAndreas Färber1-0/+21
It's the equivalent to cpu_class_set_vmsd(), to assign DeviceClass::vmsd. It wasn't needed before since only static, unmigratable VMStateDescriptions were assigned so far. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28cpu: Fix cpu_class_set_vmsd() documentationAndreas Färber1-1/+1
It's CPUClass::vmsd, not CPUState::vmsd. Reviewed-by: liguang <lig.fnst@cn.fujitsu.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-28vpc: Implement .bdrv_has_zero_initKevin Wolf1-6/+19
Depending on the subformat, has_zero_init on VHD must behave like raw and query the underlying storage (fixed) or like other sparse formats that can always return 1 (dynamic, differencing). Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-06-28vmdk: remove wrong calculation of relative pathFam Zheng1-43/+1
When creating image with backing file, the driver tries to calculate the relative path from created image file to backing file, but the path computation is incorrect. e.g.: $ qemu-img create -f vmdk -b vmdk-data-disk.vmdk vmdk-data-snapshot1 Formatting 'vmdk-data-snapshot1', fmt=vmdk size=10737418240 backing_file='vmdk-data-disk.vmdk' compat6=off zeroed_grain=off $ qemu-img info vmdk-data-snapshot1 image: vmdk-data-snapshot1 file format: vmdk virtual size: 10G (10737418240 bytes) disk size: 12K -> backing file: disk.vmdk The common part in file names, "vmdk-data-", is incorrectly forgotten by relative_path(). As the VMDK specification has no restriction on parentNameHint to be relative path, we simply remove this by using the backing_file option. Cc: qemu-stable@nongnu.org Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>