- Aug 29, 2014
-
-
Paolo Bonzini authored
Use EventNotifier instead of a pipe, which makes it trivial to test timers on Windows. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
So far, aio_poll's scheme was dispatch/poll/dispatch, where the first dispatch phase was used only in the GSource case in order to avoid a blocking poll. Earlier patches changed it to dispatch/prepare/poll/dispatch, where prepare is aio_compute_timeout. By making aio_dispatch public, we can remove the first dispatch phase altogether, so that both aio_poll and the GSource use the same prepare/poll/dispatch scheme. This patch breaks the invariant that aio_poll(..., true) will not block the first time it returns false. This used to be fundamental for qemu_aio_flush's implementation as "while (qemu_aio_wait()) {}" but no code in QEMU relies on this invariant anymore. The return value of aio_poll() is now comparable with that of g_main_context_iteration. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Make the dispatching phase the same before blocking and afterwards. The next patch will make aio_dispatch public and use it directly for the GSource case, instead of aio_poll. aio_poll can then be simplified heavily. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Later, the call to aio_dispatch will move int the GSource wrapper, while the standalone case will still be call the component functions aio_bh_poll, aio_dispatch_handlers and timerlistgroup_run_timers. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
This is similar to what aio_poll does in the stand-alone case. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Paolo Bonzini authored
Right now, QEMU invokes aio_bh_poll before the "poll" phase of aio_poll. It is simpler to do it afterwards and skip the "poll" phase altogether when the OS-dependent parts of AioContext are invoked from GSource. This way, AioContext behaves more similarly when used as a GSource vs. when used as stand-alone. As a start, take bottom halves into account when computing the poll timeout. If a bottom half is ready, do a non-blocking poll. As a side effect, this makes idle bottom halves work with aio_poll; an improvement, but not really an important one since they are deprecated. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Stefan Hajnoczi authored
Name the 'granularity' parameter and give its expected value range. Previously the device name was mistakenly reported as the parameter name. Note that the error class is unchanged from ERROR_CLASS_GENERIC_ERROR. Reported-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Benoît Canet <benoit.canet@nodalink.com>
-
Fam Zheng authored
block_job_sleep_ns is the only user. Since we are moving towards AioContext aware code, it's better to use the explicit version and drop the old one. Signed-off-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Benoît Canet <benoit.canet@nodalink.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Liu Yuan authored
This patch adds single read pattern to quorum driver and quorum vote is default pattern. For now we do a quorum vote on all the reads, it is designed for unreliable underlying storage such as non-redundant NFS to make sure data integrity at the cost of the read performance. For some use cases as following: VM -------------- | | v v A B Both A and B has hardware raid storage to justify the data integrity on its own. So it would help performance if we do a single read instead of on all the nodes. Further, if we run VM on either of the storage node, we can make a local read request for better performance. This patch generalize the above 2 nodes case in the N nodes. That is, vm -> write to all the N nodes, read just one of them. If single read fails, we try to read next node in FIFO order specified by the startup command. The 2 nodes case is very similar to DRBD[1] though lack of auto-sync functionality in the single device/node failure for now. But compared with DRBD we still have some advantages over it: - Suppose we have 20 VMs running on one(assume A) of 2 nodes' DRBD backed storage. And if A crashes, we need to restart all the VMs on node B. But for practice case, we can't because B might not have enough resources to setup 20 VMs at once. So if we run our 20 VMs with quorum driver, and scatter the replicated images over the data center, we can very likely restart 20 VMs without any resource problem. After all, I think we can build a more powerful replicated image functionality on quorum and block jobs(block mirror) to meet various High Availibility needs. E.g, Enable single read pattern on 2 children, -drive driver=quorum,children.0.file.filename=0.qcow2,\ children.1.file.filename=1.qcow2,read-pattern=fifo,vote-threshold=1 [1] http://en.wikipedia.org/wiki/Distributed_Replicated_Block_Device [Dropped \n from an error_setg() error message --Stefan] Cc: Benoit Canet <benoit@irqsave.net> Cc: Eric Blake <eblake@redhat.com> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Liu Yuan <namei.unix@gmail.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Liu Yuan authored
Cc: Eric Blake <eblake@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Benoît Canet <benoit.canet@nodalink.com> Signed-off-by:
Liu Yuan <namei.unix@gmail.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Hitoshi Mitake authored
Recently, sheepdog revived its VDI locking functionality. This patch updates sheepdog driver of QEMU for this feature. It changes an error code for a case of failed locking. -EBUSY is a suitable one. Reported-by:
Valerio Pachera <sirio81@gmail.com> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Liu Yuan <namei.unix@gmail.com> Cc: MORITA Kazutaka <morita.kazutaka@gmail.com> Signed-off-by:
Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Hitoshi Mitake authored
The update is required for supporting iSCSI multipath. It doesn't affect behavior of QEMU driver but adding a new field to vdi request struct is required. Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Liu Yuan <namei.unix@gmail.com> Cc: MORITA Kazutaka <morita.kazutaka@gmail.com> Signed-off-by:
Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Stefan Hajnoczi authored
The out label has the qemu_progress_end() and other cleanup calls. Always goto out in error paths so the cleanup happens. These error paths now return 1 instead of -1. Note that bdrv_unref(NULL) is safe. We just need to initialize bs to NULL at the top of the function. We can now remove the obsolete bs_old_backing = NULL and bs_new_backing = NULL for safe mode. Originally it was necessary in commit 3e85c6fd ("qemu-img rebase") but became useless in commit c2abccec ("qemu-img: avoid calling exit(1) to release resources properly") because the variables are already initialized during declaration. Reported-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com>
-
Stefan Hajnoczi authored
If img_compare() fails to parse the cache flags the goto out3 code path will call qemu_progress_end(). Make sure we actually call qemu_progress_init() first. Reported-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com>
-
Stefan Hajnoczi authored
The img_commit() return value is a process exit code. Use 1 for failure instead of -1. The other failure paths in this function already use 1. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com>
-
Daniel Henrique Barboza authored
The curl hardcoded timeout (5 seconds) sometimes is not long enough depending on the remote server configuration and network traffic. The user should be able to set how much long he is willing to wait for the connection. Adding a new option to set this timeout gives the user this flexibility. The previous default timeout of 5 seconds will be used if this option is not present. Reviewed-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> Reviewed-by:
Benoit Canet <benoit.canet@nodalink.com> Tested-by:
Richard W.M. Jones <rjones@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Markus Armbruster authored
We identify devices by their Open Firmware device paths. The encoding of bus numbers is incorrect: idebus_get_fw_dev_path() formats them in decimal, while SeaBIOS uses hexadecimal. With bus number > 9, SeaBIOS will miss the bootindex (lucky case), or apply it to another device (unlucky case). Bug can't bite right now: ich9-ahci has six ports, and the sysbus-ahci created by Calxeda Highbank has just one. Fix it anyway, by changing %d to %x. I couldn't find an Open Firmware spec covering this. For what it's worth, OVMF agrees with SeaBIOS. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Aug 28, 2014
-
-
Peter Maydell authored
SCSI patches include bug fixes from Fam and Peter, improved error reporting from Fam and a fix for DPRINTF bitrot. Memory patches try again to initialize name from the QOM name. # gpg: Signature made Thu 28 Aug 2014 15:10:31 BST using RSA key ID 9B4D86F2 # gpg: Good signature from "Paolo Bonzini <pbonzini@redhat.com>" # gpg: aka "Paolo Bonzini <bonzini@gnu.org>" * remotes/bonzini/tags/for-upstream: memory: Lazy init name from QOM name as needed xen: hvm: Abstract away memory region name ref xen-hvm: Constify string virtio-scsi: Report error if num_queues is 0 or too large scsi-generic: remove superfluous DPRINTF avoid to break compiling block/iscsi: fix memory corruption on iscsi resize scsi-bus: Convert DeviceClass init to realize block: Pass errp in blkconf_geometry Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Peter Maydell authored
Mostly bugfixes + Alexey's interface-based implementation of the NMI monitor command. # gpg: Signature made Thu 28 Aug 2014 15:07:22 BST using RSA key ID 9B4D86F2 # gpg: Good signature from "Paolo Bonzini <pbonzini@redhat.com>" # gpg: aka "Paolo Bonzini <bonzini@gnu.org>" * remotes/kvm/tags/for-upstream: mc146818rtc: reinitialize irq_reinject_on_ack_count on reset target-i386: Add "tsc_adjust" CPU feature name target-i386: Add "mpx" CPU feature name vl: process -object after other backend options checkpatch.pl: adjust typedef definition to QEMU coding style x86: Clear MTRRs on vCPU reset x86: kvm: Add MTRR support for kvm_get|put_msrs() x86: Use common variable range MTRR counts target-i386: Don't forbid NX bit on PAE PDEs and PTEs spapr: Add support for new NMI interface s390x: Migrate to new NMI interface s390x: Convert QEMUMachine to MachineClass cpus: Define callback for QEMU "nmi" command kvm: run cpu state synchronization on target vcpu thread Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Peter Crosthwaite authored
To support name retrieval of MemoryRegions that were created dynamically (that is, not via memory_region_init and friends). We cache the name in MemoryRegion's state as object_get_canonical_path_component mallocs the returned value so it's not suitable for direct return to callers. Memory already frees the name field, so this will be garbage collected along with the MR object. Signed-off-by:
Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Crosthwaite authored
The mr->name field is removed. This slipped through compile testing. Fix. Reviewed-by:
Stefan Weil <sw@weilnetz.de> Signed-off-by:
Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Crosthwaite authored
It's constant, and sourced from existing const strings. Avoid dodgy casts by converting to const. Signed-off-by:
Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by:
Stefan Weil <sw@weilnetz.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Maydell authored
Merge remote-tracking branch 'remotes/stefanha/tags/fix-buildbot-12082014-pull-request' into staging Pull request # gpg: Signature made Thu 28 Aug 2014 13:43:00 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/fix-buildbot-12082014-pull-request: Revert "qemu-img: sort block formats in help message" block: sort formats alphabetically in bdrv_iterate_format() mirror: fix uninitialized variable delay_ns warnings trace: avoid Python 2.5 all() in tracetool libqtest: launch QEMU with QEMU_AUDIO_DRV=none qapi.py: avoid Python 2.5+ any() function Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Stefan Hajnoczi authored
This reverts commit 1a443c1b and the later commit 395071a7. GSequence was introduced in glib 2.14. RHEL 5 fails to compile since it uses glib 2.12.3. Now that bdrv_iterate_format() invokes the iteration callback in sorted order these commits are unnecessary. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Benoît Canet <benoit.canet@nodalink.com>
-
Stefan Hajnoczi authored
Format names are best consumed in alphabetical order. This makes human-readable output easy to produce. bdrv_iterate_format() already has an array of format strings. Sort them before invoking the iteration callback. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Benoît Canet <benoit.canet@nodalink.com>
-
Stefan Hajnoczi authored
The gcc 4.1.2 compiler warns that delay_ns may be uninitialized in mirror_iteration(). There are two break statements in the do ... while loop that skip over the delay_ns assignment. These are probably the cause of the warning. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Benoît Canet <benoit.canet@nodalink.com>
-
Stefan Hajnoczi authored
Red Hat Enterprise Linux 5 ships Python 2.4.3. The all() function was added in Python 2.5 so we cannot use it. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Benoît Canet <benoit.canet@nodalink.com>
-
Stefan Hajnoczi authored
No test case actually uses the audio backend. Disable audio to prevent warnings on hosts with no sound hardware present: GTESTER check-qtest-aarch64 sdl: SDL_OpenAudio failed sdl: Reason: No available audio device sdl: SDL_OpenAudio failed sdl: Reason: No available audio device audio: Failed to create voice `lm4549.out' Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Stefan Hajnoczi authored
There is one instance of any() in qapi.py that breaks builds on older distros that ship Python 2.4 (like RHEL5): GEN qmp-commands.h Traceback (most recent call last): File "build/scripts/qapi-commands.py", line 445, in ? exprs = parse_schema(input_file) File "build/scripts/qapi.py", line 329, in parse_schema schema = QAPISchema(open(input_file, "r")) File "build/scripts/qapi.py", line 110, in __init__ if any(include_path == elem[1] NameError: global name 'any' is not defined Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Benoît Canet <benoit.canet@nodalink.com>
-
- Aug 27, 2014
-
-
Paolo Bonzini authored
This field was forgotten, and it makes the state after reset non-deterministic. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Aug 26, 2014
-
-
Peter Maydell authored
* remotes/mcayland/qemu-openbios: Update OpenBIOS images Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Eduardo Habkost authored
tsc_adjust migration support is already implemented (commit f28558d3), so we can add it to the list of known feature names. Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Eduardo Habkost authored
Migration support for MPX is already implemented (commit 79e9ebeb), so we can add it to the list of known feature names. Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Mark Cave-Ayland authored
Update OpenBIOS images to SVN r1316 built from submodule. Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
Paolo Bonzini authored
QOM backends can refer to chardevs, but not vice versa. So process -chardev and -fsdev options before -object This fixes the rng-egd backend to virtio-rng. Reported-by:
Amos Kong <akong@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Most QEMU typedefs are camelcase, starting with one uppercase letter and containing at least one lowercase letter. There are a few all-uppercase types, add the most common too. This fixes recognition of types in lines such as static __attribute__((unused)) inline void tcg_out8(TCGContext *s, uint8_t v) (Example provided by Peter Maydell). Reported-by:
Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Stefan Weil <sw@weilnetz.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Fam Zheng authored
No cmd vq surprises guest (Linux panics in virtscsi_probe), too many queues abort qemu (in the following virtio_add_queue). Signed-off-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Gonglei (Arei) authored
variables lun and tag had been eliminated, break compiling when enable debug switch. Meanwhile traces provide the same information with this DPRINTF, so remove it. Signed-off-by:
Gonglei <arei.gonglei@huawei.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Lieven authored
bs->total_sectors is not yet updated at this point. resulting in memory corruption if the volume has grown and data is written to the newly availble areas. CC: qemu-stable@nongnu.org Signed-off-by:
Peter Lieven <pl@kamp.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Fam Zheng authored
Replace "init/destroy" with "realize/unrealize" in SCSIDeviceClass, which has errp as a parameter. So all the implementations now use error_setg instead of error_report for reporting error. Also in scsi_bus_legacy_handle_cmdline, report the error when initializing the if=scsi devices, before returning it, because in the callee, error_report is changed to error_setg. And the callers don't have the right locations (e.g. "-drive if=scsi"). Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-