- Jan 27, 2012
-
-
Anthony Liguori authored
Right now, DeviceInfo acts as the class for qdev. In order to switch to a proper ObjectClass derivative, we need to ween all of the callers off of interacting directly with the info pointer. Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Anthony Liguori authored
This is a very shallow integration. We register a TYPE_DEVICE but only use QOM as basically a memory allocator. This will make all devices show up as QOM objects but they will all carry the TYPE_DEVICE. Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - update for new location of object.h
-
Anthony Liguori authored
This class provides the main building block for QEMU Object Model and is extensively documented in the header file. It is largely inspired by GObject. Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - remove printf() in type registration - fix typo in comment (Paolo) - make Interface private - move object into a new directory and move header into include/qemu/ - don't make object.h depend on qemu-common.h - remove Type and replace it with TypeImpl * (Paolo) - use hash table to store types (Paolo) - aggressively cache parent type (Paolo) - make a type_register and use it with interfaces (Paolo) - fix interface cast comment (Paolo) - add a few more functions required in later series
-
Anthony Liguori authored
Because now all PCI devices are converted to qdev. Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Anthony Liguori authored
bus is always NULL so the code in this if clause is dead (and therefore untested). Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Anthony Liguori authored
This is a "shallow", half hearted, and untested conversion. Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Anthony Liguori authored
* pmaydell/arm-devs.for-upstream: arm: SoC model for Calxeda Highbank arm_boot: support board IDs more than 16 bits wide arm: add secondary cpu boot callbacks to arm_boot.c ahci: add support for non-PCI based controllers Add xgmac ethernet model
-
Anthony Liguori authored
* kwolf/for-anthony: (22 commits) scsi: Guard against buflen exceeding req->cmd.xfer in scsi_disk_emulate_command qcow: Use bdrv functions to replace file operation qcow: Return real error code in qcow_open block/vdi: Zero unused parts when allocating a new block (fix #919242) virtio-blk: add virtio_blk_handle_read trace event docs: describe live block operations block: add support for partial streaming add QERR_BASE_NOT_FOUND block: add bdrv_find_backing_image blockdev: make image streaming safe across hotplug qmp: add query-block-jobs qmp: add block_job_cancel command qmp: add block_job_set_speed command qmp: add block_stream command block: rate-limit streaming operations block: add image streaming block job block: add BlockJob interface for long-running operations block: make copy-on-read a per-request flag block: check bdrv_in_use() before blockdev operations coroutine: add co_sleep_ns() coroutine sleep function ...
-
Laszlo Ersek authored
Signed-off-by:
Laszlo Ersek <lersek@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
Sergei Trofimovich authored
Signed-off-by:
Sergei Trofimovich <slyfox@gentoo.org> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
Jan Kiszka authored
A device reset does not affect the link state, only set_link does. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
Jan Kiszka authored
A device reset does not affect the link state, only set_link does. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
Jan Kiszka authored
By using strncasecmp, we allow for arbitrary characters after the "on"/"off" string. Fix this by switching to strcasecmp. Reviewed-by:
Andreas Färber <afaerber@suse.de> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- Jan 26, 2012
-
-
Thomas Higdon authored
Limit the return value (corresponding to the length of the buffer to be DMAed back to the intiator) to the value in req->cmd.xfer, which is the amount of data that the initiator expects. Eliminate now-duplicate code that does this guarding in the functions for individual commands. Without this, the SCRIPTS code in the emulated LSI device eventually raises a DMA interrupt for a data overrun when an INQUIRY command whose buflen exceeds req->cmd.xfer is processed. It's the responsibility of the client to provide a request buffer and allocation length that are large enough for the result of the command. Signed-off-by:
Thomas Higdon <thigdon@akamai.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Li Zhi Hui authored
Since common file operation functions lack of error detection and use much more I/O syscalls, so change them to bdrv series functions and reduce I/O request. Signed-off-by:
Li Zhi Hui <zhihuili@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Li Zhi Hui authored
Signed-off-by:
Li Zhi Hui <zhihuili@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Weil authored
The new block was filled with zero when it was allocated by g_malloc0, but when it was reused later and only partially used, data from the previously allocated block were still present and written to the new block. This caused the problems reported by bug #919242 (https://bugs.launchpad.net/qemu/+bug/919242 ). Now the unused parts of the new block which are before and after the data are always filled with zero, so it is no longer necessary to zero the whole block with g_malloc0. I also updated the copyright comment. Signed-off-by:
Stefan Weil <sw@weilnetz.de> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
There already exists a virtio_blk_handle_write trace event as well as completion events. Add the virtio_blk_handle_read event so it's easy to trace virtio-blk requests for both read and write operations. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Marcelo Tosatti authored
Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Marcelo Tosatti authored
Add support for streaming data from an intermediate section of the image chain (see patch and documentation for details). Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Marcelo Tosatti authored
This qerror will be raised when a given streaming base (backing file) cannot be found. Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by:
Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Marcelo Tosatti authored
Add bdrv_find_backing_image: given a BlockDriverState pointer, and an id, traverse the backing image chain to locate the id. Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Unplugging a storage interface like virtio-blk causes the host block device to be deleted too. Long-running operations like block migration must take a DriveInfo reference to prevent the BlockDriverState from being freed. For image streaming we can do the same thing. Note that it is not possible to acquire/release the drive reference in block.c where the block job functions live because drive_get_ref()/drive_put_ref() are blockdev.c functions. Calling them from block.c would be a layering violation - tools like qemu-img don't even link against blockdev.c. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Add query-block-jobs, which shows the progress of ongoing block device operations. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by:
Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Add block_job_cancel, which stops an active block streaming operation. When the operation has been cancelled the new BLOCK_JOB_CANCELLED event is emitted. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by:
Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Add block_job_set_speed, which sets the maximum speed for a background block operation. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by:
Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Add the block_stream command, which starts copy backing file contents into the image file. Also add the BLOCK_JOB_COMPLETED QMP event which is emitted when image streaming completes. Later patches add control over the background copy speed, cancelation, and querying running streaming operations. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by:
Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Rob Herring authored
Adds support for Calxeda's Highbank SoC. Signed-off-by:
Rob Herring <rob.herring@calxeda.com> Signed-off-by:
Mark Langsdorf <mark.langsdorf@calxeda.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Peter Maydell authored
Support passing a board ID value to the kernel in r1 that is more than 16 bits wide. This is needed to pass the '-1 == invalid' value for boards which only support device tree booting. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Tested-by:
Mark Langsdorf <mark.langsdorf@calxeda.com>
-
Mark Langsdorf authored
Create two functions, write_secondary_boot() and secondary_cpu_reset_hook(), to allow platforms more control of how secondary CPUs are brought up. The new functions default to NULL and aren't called unless they are populated so there are no changes to existing platform models. Signed-off-by:
Mark Langsdorf <mark.langsdorf@calxeda.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Rob Herring authored
Add support for ahci on sysbus. Signed-off-by:
Rob Herring <rob.herring@calxeda.com> Signed-off-by:
Mark Langsdorf <mark.langsdorf@calxeda.com> Reviewed-by:
Andreas Färber <afaerber@suse.de> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Rob Herring authored
This adds very basic support for the xgmac ethernet core. Missing things include: - statistics counters - WoL support - rx checksum offload - chained descriptors (only linear descriptor ring) - broadcast and multicast handling Signed-off-by:
Rob Herring <rob.herring@calxeda.com> Signed-off-by:
Mark Langsdorf <mark.langsdorf@calxeda.com> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Stefan Hajnoczi authored
This patch implements rate-limiting for image streaming. If we've exceeded the bandwidth quota for a 100 ms time slice we sleep the coroutine until the next slice begins. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Previously copy-on-read could only be enabled for all requests to a block device. This means requests coming from the guest as well as QEMU's internal requests would perform copy-on-read when enabled. For image streaming we want to support finer-grained behavior than just populating the image file from its backing image. Image streaming supports partial streaming where a common backing image is preserved. In this case guest requests should not perform copy-on-read because they would indiscriminately copy data which should be left in a backing image from the backing chain. Introduce a per-request flag for copy-on-read so that a block device can process both regular and copy-on-read requests. Overlapping reads and writes still need to be serialized for correctness when copy-on-read is happening, so add an in-flight reference count to track this. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Long-running block operations like block migration and image streaming must have continual access to their block device. It is not safe to perform operations like hotplug, eject, change, resize, commit, or external snapshot while a long-running operation is in progress. This patch adds the missing bdrv_in_use() checks so that block migration and image streaming never have the rug pulled out from underneath them. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Most of the codebase as been converted to use glib memory allocation functions. There are still a few instances of malloc/calloc in the block layer and qemu-io. Replace them, especially since they do not check the strdup/malloc/calloc return value. Reported-by:
Dr David Alan Gilbert <davidagilbert@uk.ibm.com> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-