summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add qdict_clone_shallow()Kevin Wolf2013-03-152-0/+24
| | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* block: Add options QDict to bdrv_open() prototypeKevin Wolf2013-03-1512-28/+54
| | | | | | | | | | It doesn't do anything yet except storing the options QDict in the BlockDriverState. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* block: Add options QDict to .bdrv_open()Kevin Wolf2013-03-1514-17/+17
| | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qga/main.c: Don't use g_key_file_get/set_int64Peter Crosthwaite2013-03-151-2/+2
| | | | | | | | | | | | | | | These functions don't exist until glib version 2.26. QEMU is currently only mandating glib 2.12. This patch replaces the functions with g_key_file_get/set_integer. Unbreaks the build on Ubuntu 10.04 and RHEL 5.6. Regression was introduced by 39097daf15c42243742667607d2cad2c9dc4f764 Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1363323879-682-1-git-send-email-peter.crosthwaite@xilinx.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'kraxel/chardev.5' into stagingAnthony Liguori2013-03-1413-230/+522
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kraxel/chardev.5: spice-qemu-char: Remove dead debugging code spice-qemu-char: Fix name parameter issues after qapi-ifying qemu-char.c: fix waiting for telnet connection message Revert "hmp: Disable chardev-add and chardev-remove" chardev: add udp support to qapi chardev: add memory (ringbuf) support to qapi chardev: add vc support to qapi chardev: add spice support to qapi chardev: add pipe support to qapi chardev: add console support to qapi chardev: switch pty init to qapi chardev: switch parallel init to qapi chardev: switch serial/tty init to qapi chardev: add stdio support to qapi chardev: switch file init to qapi chardev: add braille support to qapi chardev: add msmouse support to qapi chardev: switch null init to qapi chardev: add mux chardev support to qapi chardev: add support for qapi-based chardev initialization Conflicts: ui/console.c Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * spice-qemu-char: Remove dead debugging codeHans de Goede2013-03-141-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit d62e5f7036a018b2ad09f17ebd481bd28953d783 "chardev: add spice support to qapi" It is impossible to set the debug parameter, so all the dprintf calls are essentially nops. Since we've not needed the debug parameter in ages this is not a problem, if it later turns out we do need some more debugging options we can add more trace-points. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * spice-qemu-char: Fix name parameter issues after qapi-ifyingHans de Goede2013-03-141-2/+7
| | | | | | | | | | | | | | | | | | The strings passed in through the qapi calls are dynamic memory, since we want to have them stick around longer then just the call to qemu_chr_open_spice_* we need to strdup them. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * qemu-char.c: fix waiting for telnet connection messageIgor Mitsyanko2013-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Current colon position in "waiting for telnet connection" message template produces messages like: QEMU waiting for connection on: telnet::127.0.0.16666,server After moving a colon to the right, we will get a correct messages like: QEMU waiting for connection on: telnet:127.0.0.1:6666,server Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * Revert "hmp: Disable chardev-add and chardev-remove"Gerd Hoffmann2013-03-131-32/+31
| | | | | | | | This reverts commit 8a14952c9d2f5fa2b3caa6dc286b62ed5d26bca7.
| * chardev: add udp support to qapiGerd Hoffmann2013-03-134-19/+67
| | | | | | | | | | | | This patch adds 'udp' support to qapi. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: add memory (ringbuf) support to qapiGerd Hoffmann2013-03-132-8/+36
| | | | | | | | | | | | | | This patch adds 'memory' support to qapi and also switches over the memory chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: add vc support to qapiGerd Hoffmann2013-03-135-16/+74
| | | | | | | | | | | | | | This patch adds 'vc' support to qapi and also switches over the vc chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: add spice support to qapiGerd Hoffmann2013-03-134-24/+79
| | | | | | | | | | | | This patch adds 'spicevmc' and 'spiceport' support to qapi and also switches over the spice chardev initialization to the new qapi code path.
| * chardev: add pipe support to qapiGerd Hoffmann2013-03-132-10/+24
| | | | | | | | | | | | | | This patch adds 'pipe' support to qapi and also switches over the pipe chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: add console support to qapiGerd Hoffmann2013-03-132-3/+9
| | | | | | | | | | | | | | This patch adds 'console' support to qapi and also switches over the console chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: switch pty init to qapiGerd Hoffmann2013-03-131-25/+10
| | | | | | | | | | | | | | | | | | | | This patch switches over the pty chardev initialization to the new qapi code path. Bonus: Taking QemuOpts out of the loop allows some nice cleanups along the way. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: switch parallel init to qapiGerd Hoffmann2013-03-131-20/+17
| | | | | | | | | | | | | | This patch switches over the parallel chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: switch serial/tty init to qapiGerd Hoffmann2013-03-131-20/+17
| | | | | | | | | | | | | | This patch switches over the serial chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: add stdio support to qapiGerd Hoffmann2013-03-132-7/+35
| | | | | | | | | | | | | | This patch adds 'stdio' support to qapi and also switches over the stdio chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: switch file init to qapiGerd Hoffmann2013-03-131-28/+15
| | | | | | | | | | | | | | This patch switches over the 'file' chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: add braille support to qapiGerd Hoffmann2013-03-134-3/+12
| | | | | | | | | | | | | | This patch adds 'braille' support to qapi and also switches over the braille chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: add msmouse support to qapiGerd Hoffmann2013-03-134-3/+10
| | | | | | | | | | | | | | This patch adds 'msmouse' support to qapi and also switches over the msmouse chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: switch null init to qapiGerd Hoffmann2013-03-131-3/+3
| | | | | | | | | | | | | | This patch switches over the 'null' chardev initialization to the new qapi code path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * chardev: add mux chardev support to qapiGerd Hoffmann2013-03-132-4/+45
| | | | | | | | | | This adds mux chardev support to the qapi and also makes the qapi-based chardev creation path handle the "mux=on" option correctly.
| * chardev: add support for qapi-based chardev initializationGerd Hoffmann2013-03-132-0/+45
| | | | | | | | | | | | | | | | | | | | This patch add support for a new way to initialize chardev devices. Instead of calling a initialization function with a QemuOpts we will now create a (qapi) ChardevBackend, optionally call a function to fill ChardevBackend from QemuOpts, then go create the chardev using the new qapi code path which is also used by chardev-add. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Merge remote-tracking branch 'afaerber/qom-cpu' into stagingAnthony Liguori2013-03-14133-878/+1268
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Andreas Färber (16) and Igor Mammedov (1) # Via Andreas Färber * afaerber/qom-cpu: target-lm32: Update VMStateDescription to LM32CPU target-arm: Override do_interrupt for ARMv7-M profile cpu: Replace do_interrupt() by CPUClass::do_interrupt method cpu: Pass CPUState to cpu_interrupt() exec: Pass CPUState to cpu_reset_interrupt() cpu: Move halted and interrupt_request fields to CPUState target-cris/helper.c: Update Coding Style target-i386: Update VMStateDescription to X86CPU cpu: Introduce cpu_class_set_vmsd() cpu: Register VMStateDescription through CPUState stubs: Add a vmstate_dummy struct for CONFIG_USER_ONLY vmstate: Make vmstate_register() static inline target-sh4: Move PVR/PRR/CVR into SuperHCPUClass target-sh4: Introduce SuperHCPU subclasses cpus: Replace open-coded CPU loop in qmp_memsave() with qemu_get_cpu() monitor: Use qemu_get_cpu() in monitor_set_cpu() cpu: Fix qemu_get_cpu() to return NULL if CPU not found
| * | target-lm32: Update VMStateDescription to LM32CPUAndreas Färber2013-03-124-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | Add a vmstate_lm32_cpu referencing the previous VMStateDescription as a sub-struct and hook it up to CPUClass::vmsd. Drop cpu_{save,load}(). Acked-by: Michael Walle <michael@walle.cc> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | target-arm: Override do_interrupt for ARMv7-M profileAndreas Färber2013-03-123-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable ARMCPUInfo to specify a custom class_init functions. Introduce arm_v7m_class_init() and use it for "cortex-m3" model. Instead of forwarding from arm_cpu_do_interrupt() to do_interrupt_v7m(), override CPUClass::do_interrupt with arm_v7m_cpu_do_interrupt() in arm_v7m_class_init(). Acked-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | cpu: Replace do_interrupt() by CPUClass::do_interrupt methodAndreas Färber2013-03-1263-67/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes a global per-target function and thus takes us one step closer to compiling multiple targets into one executable. It will also allow to override the interrupt handling for certain CPU families. Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | cpu: Pass CPUState to cpu_interrupt()Andreas Färber2013-03-1237-99/+106
| | | | | | | | | | | | | | | | | | | | | | | | Move it to qom/cpu.h to avoid issues with include order. Change pc_acpi_smi_interrupt() opaque to X86CPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | exec: Pass CPUState to cpu_reset_interrupt()Andreas Färber2013-03-1224-66/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move it to qom/cpu.c to avoid build failures depending on include order of cpu-qom.h and exec/cpu-all.h. Change opaques of various ..._irq_handler() functions to the appropriate CPU type to facilitate using cpu_reset_interrupt(). Fix Coding Style issues while at it (missing braces, indentation). Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | cpu: Move halted and interrupt_request fields to CPUStateAndreas Färber2013-03-1270-224/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both fields are used in VMState, thus need to be moved together. Explicitly zero them on reset since they were located before breakpoints. Pass PowerPCCPU to kvmppc_handle_halt(). Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | target-cris/helper.c: Update Coding StyleAndreas Färber2013-03-121-197/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reindent, add missing braces and drop/adjust whitespace. Prepares for CPUArchState-to-CPUState field movements in cpu_cris_handle_mmu_fault(), do_interruptv10() and do_interrupt(). The remaining functions were so minor that they can be fixed in one go. Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | target-i386: Update VMStateDescription to X86CPUAndreas Färber2013-03-124-110/+113
| | | | | | | | | | | | | | | | | | | | | | | | Expose vmstate_cpu as vmstate_x86_cpu and hook it up to CPUClass::vmsd. Adapt opaques and VMState fields to X86CPU. Drop cpu_{save,load}(). Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | cpu: Introduce cpu_class_set_vmsd()Andreas Färber2013-03-121-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This setter avoids redefining each VMStateDescription value to vmstate_dummy by not referencing the value for CONFIG_USER_ONLY. Suggested-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | cpu: Register VMStateDescription through CPUStateAndreas Färber2013-03-122-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In comparison to DeviceClass::vmsd, CPU VMState is split in two, "cpu_common" and "cpu", and uses cpu_index as instance_id instead of -1. Therefore add a CPU-specific CPUClass::vmsd field. Unlike the legacy CPUArchState registration, rather register CPUState. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
| * | stubs: Add a vmstate_dummy struct for CONFIG_USER_ONLYAndreas Färber2013-03-122-0/+6
| | | | | | | | | | | | | | | | | | Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | vmstate: Make vmstate_register() static inlineAndreas Färber2013-03-122-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids adding a duplicate stub for CONFIG_USER_ONLY. Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | target-sh4: Move PVR/PRR/CVR into SuperHCPUClassAndreas Färber2013-03-124-15/+22
| | | | | | | | | | | | | | | | | | | | | They are never changed once initialized, and moving them to the class will allow to inspect them before instantiating. Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | target-sh4: Introduce SuperHCPU subclassesAndreas Färber2013-03-123-85/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | Store legacy name in SuperHCPUClass for -cpu ? and for case-insensitive class lookup. List CPUs by iterating over TYPE_SUPERH_CPU subclasses. Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | cpus: Replace open-coded CPU loop in qmp_memsave() with qemu_get_cpu()Andreas Färber2013-03-121-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional change, just less usages of first_cpu and next_cpu fields. env is passed to cpu_memory_rw_debug(), which in turn passes it to target-specific cpu_get_phys_page_debug(). Changing both would be a larger refactoring, so defer that by using env_ptr for now. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | monitor: Use qemu_get_cpu() in monitor_set_cpu()Andreas Färber2013-03-121-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional change, just a reduction of CPU loops. The mon_cpu field is left untouched for now since changing that requires a number of larger prerequisites, including cpu_synchronize_state() and mon_get_cpu(). Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | cpu: Fix qemu_get_cpu() to return NULL if CPU not foundIgor Mammedov2013-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 55e5c2850 breaks CPU not found return value, and returns CPU corresponding to the last non NULL env. Fix it by returning CPU only if env is not NULL, otherwise CPU is not found and function should return NULL. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* | | Merge remote-tracking branch 'mdroth/qga-pull-3-11-2013' into stagingAnthony Liguori2013-03-147-8/+584
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Laszlo Ersek (3) and others # Via Michael Roth * mdroth/qga-pull-3-11-2013: qga: implement qmp_guest_set_vcpus() for Linux with sysfs qga: implement qmp_guest_get_vcpus() for Linux with sysfs qga: introduce guest-get-vcpus / guest-set-vcpus with stubs qga: add guest-set-time command qga: add guest-get-time command qemu-ga: use key-value store to avoid recycling fd handles after restart qemu-ga: make guest-sync-delimited available during fsfreeze qemu-ga: fix confusing GAChannelMethod comparison qga: cast to int for DWORD type
| * | | qga: implement qmp_guest_set_vcpus() for Linux with sysfsLaszlo Ersek2013-03-111-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | | qga: implement qmp_guest_get_vcpus() for Linux with sysfsLaszlo Ersek2013-03-111-6/+140
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | | qga: introduce guest-get-vcpus / guest-set-vcpus with stubsLaszlo Ersek2013-03-113-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | | qga: add guest-set-time commandLei Li2013-03-113-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> *added stub for w32 Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | | qga: add guest-get-time commandLei Li2013-03-113-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> *added stub for w32 Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | | qemu-ga: use key-value store to avoid recycling fd handles after restartMichael Roth2013-03-113-6/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hosts hold on to handles provided by guest-file-open for periods that can span beyond the life of the qemu-ga process that issued them. Since these are issued starting from 0 on every restart, we run the risk of issuing duplicate handles after restarts/reboots. As a result, users with a stale copy of these handles may end up reading/writing corrupted data due to their existing handles effectively being re-assigned to an unexpected file or offset. We unfortunately do not issue handles as strings, but as integers, so a solution such as using UUIDs can't be implemented without introducing a new interface. As a workaround, we fix this by implementing a persistent key-value store that will be used to track the value of the last handle that was issued across restarts/reboots to avoid issuing duplicates. The store is automatically written to the same directory we currently set via --statedir to track fsfreeze state, and so should be applicable for stable releases where this flag is supported. A follow-up can use this same store for handling fsfreeze state, but that change is cosmetic and left out for now. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Cc: qemu-stable@nongnu.org * fixed guest_file_handle_add() return value from uint64_t to int64_t
OpenPOWER on IntegriCloud