- Jan 26, 2012
-
-
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>
-
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>
-
Gregory Farnum authored
Signed-off-by:
Greg Farnum <gregory.farnum@dreamhost.com> Reviewed-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Jan 25, 2012
-
-
Blue Swirl authored
Remove target dependencies and compile Cirrus VGA in hwlib. Address masking can be removed since memory API handles that now. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Blue Swirl authored
Instead of each target knowing or guessing the guest page size, just pass the desired size of dirtied memory area. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Blue Swirl authored
Fix handling of cases like start = 0xfff, length = 2. Change length to ram_addr_t to handle larger lengths. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Blue Swirl authored
Flag -nodefaults should also imply no VGA. This was broken in a369da5f. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Jan 23, 2012
-
-
Blue Swirl authored
Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Anthony Liguori authored
* qemu-kvm/uq/master: kvm: Activate in-kernel irqchip support kvm: x86: Add user space part for in-kernel IOAPIC kvm: x86: Add user space part for in-kernel i8259 kvm: x86: Add user space part for in-kernel APIC kvm: x86: Establish IRQ0 override control kvm: Introduce core services for in-kernel irqchip support memory: Introduce memory_region_init_reservation ioapic: Factor out base class for KVM reuse ioapic: Drop post-load irr initialization i8259: Factor out base class for KVM reuse i8259: Completely privatize PicState apic: Open-code timer save/restore apic: Factor out base class for KVM reuse apic: Introduce apic_report_irq_delivered apic: Inject external NMI events via LINT1 apic: Stop timer on reset kvm: Move kvmclock into hw/kvm folder msi: Generalize msix_supported to msi_supported hyper-v: initialize Hyper-V CPUID leaves. hyper-v: introduce Hyper-V support infrastructure. Conflicts: Makefile.target Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Anthony Liguori authored
* afaerber/prep-up: prep: Use i82378 PCI->ISA bridge for 'prep' machine prep: Add i82378 PCI-to-ISA bridge emulation prep: Add i82374 DMA emulation MAINTAINERS: Add PCI host bridge files to PReP machine prep: qdev'ify Raven host bridge (SysBus) prep_pci: Update I/O to MemoryRegion ops prep_pci: Simplify I/O endianness prep: qdev'ify Raven host bridge (PCIDevice) prep: Use ISA m48t59 prep: Fix offset of BIOS MemoryRegion
-
Anthony Liguori authored
Otherwise we can write beyond the buffer and corrupt memory. This is tracked as CVE-2012-0029. Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Jan 22, 2012
-
-
Andreas Färber authored
Commit 793a137a (target-sparc: Implement BMASK/BSHUFFLE.) introduced a stray usage of softfloat uint64 type. Use uint64_t instead. Signed-off-by:
Andreas Färber <afaerber@suse.de> Cc: Richard Henderson <rth@twiddle.net> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Blue Swirl authored
Fix the name of the init function. Reviewed-by:
Andreas Färber <afaerber@suse.de> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Blue Swirl authored
Reviewed-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Blue Swirl authored
Improve VGA selection logic, push check for device availabilty to vl.c. Create the devices at board level unconditionally. Remove now unused pci_try_create*() functions. Make PCI VGA devices optional. Reviewed-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Jan 21, 2012
-
-
Andreas Färber authored
Rename SysBus device from 'grackle' to 'grackle-pcihost' to resolve a name conflict. Also mark both devices as no_user. Signed-off-by:
Andreas Färber <afaerber@suse.de> Cc: Alexander Graf <agraf@suse.de> Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Andreas Färber authored
Signed-off-by:
Andreas Färber <afaerber@suse.de> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
We call pci_host_config_{read,write}_common() which perform PCI config accesses. However they don't do all limit checking the way we expect it to. So let's introduce a small wrapper around them, making them behave the way we would without touching generic code. This patch is based on a patch by David Gibson which put this logic into the generic code. Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Andreas Färber authored
Just like prep_pci.c, these were not associated with any MAINTAINERS section, including PCI. Signed-off-by:
Andreas Färber <andreas.faerber@web.de> Cc: Alexander Graf <agraf@suse.de> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Andreas Färber authored
Signed-off-by:
Andreas Färber <andreas.faerber@web.de> Cc: Alexander Graf <agraf@suse.de> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Benjamin Herrenschmidt authored
Currently on the pseries machine the SLOF firmware is used normally, but we bypass it when -kernel is specified. Having these two different boot paths can cause some confusion. In particular at present we need to "probe" the (emulated) PCI bus and produce device tree nodes for the PCI devices in qemu, for the -kernel case. In the SLOF case, it takes the device tree from qemu adds some stuff to it then passes it on to the kernel. It's been decided that a better approach is to always boot through SLOF, even when using -kernel. WIth this approach we can leave PCI probing and device node creation to SLOF in all cases which removes a bunch of code in qemu, and avoids iterating the PCI devices from the machine specific init code which we're not supposed to do. This patch changes qemu to always boot through SLOF, and not to create PCI nodes. Simultaneously it updates the included version of SLOF (submodule and binary image) to one which supports (and requires) the new approach. The new SLOF version also includes a number of unrelated enhancements: support for booting from virtio-pci devices and e1000, greatly improved FCode support and many bugfixes. It also makes SLOF ready to be used even when specifying a kernel on the qemu command line. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
David Gibson authored
The pseries machine expects a para-virtualized guest and so supplies RTAS functions (via a hypercall) for performing PCI config space access. Currently the implementation of these calls into pci_default_{read,write}_config(). However this would be incorrect for any PCI device which overrides the default config read/write functions. AFAICT there's only one such device today, but we should still get it right. In addition the pci_host_config_{read,write}_common() functions which do correctly do this dispatch, perform bounds checking on the config space address, lack of which currently leads to an exploitable bug. This patch corrects the problem. Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Benjamin Herrenschmidt authored
On the pseries machine (which expexts a paravirtualized guest), guest access to PCI config space is via host-provided RTAS functions. This patch extends these RTAS functions to permit access to PCI extended config space, as specified in PAPR. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
David Gibson authored
Back when I made patches introducing dma_addr_t and various PCI DMA wrapper functions, I made a mistake. The bmdma_addr_{read,write} functions need to take target_phys_addr_t not dma_addr_t, since they are assigned to MemoryRegionOps callbacks. This patch corrects my error. Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
David Gibson authored
This patch adds several auto-generated files to .gitignore which were previously missing. Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Benjamin Herrenschmidt authored
The kvm_get_dirty_pages_log_range() function uses two address variables to step through the monitored memory region to update the dirty log. However, these variables have type unsigned long, which can overflow if running a 64-bit guest with a 32-bit qemu binary. This patch changes these to target_phys_addr_t which will have the correct size. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Benjamin Herrenschmidt authored
load_image_targphys() gets passed a max size for the file, but doesn't enforce it at all. Add a check and return -1 (error) if the file is too big, without loading it. Fix the bracing style in the function while we're at it. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
When accessing the device specific virtio config space, we memcpy the data into a variable in QEMU. At that point we're basically pulling host endianness into the game which is a really bad idea. So instead, let's use the target specific load/store helpers for memory pointers which fetch things in target endianness. The whole array is already populated in target endianness anyways (see virtio-blk). Signed-off-by:
Alexander Graf <agraf@suse.de> Reviewed-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Benjamin Herrenschmidt authored
The virtio config area in PIO space is a bit special. The initial header is little endian but the rest (device specific) is guest native endian. The PIO accessors for PCI on machines that don't have native IO ports assume that all PIO is little endian, which works fine for everything except the above. A complicated way to fix it would be to split the BAR into two memory regions with different endianess settings, but this isn't practical to do, besides, the PIO code doesn't honor region endianness anyway (I have a patch for that too but it isn't necessary at this stage). So I decided to go for the quick fix instead which consists of reverting the swap in virtio-pci in selected places, hoping that when we eventually do a "v2" of the virtio protocols, we sort that out once and for all using a fixed endian setting for everything. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
Alexander Graf <agraf@suse.de> [agraf: keep virtio in libhw and determine endianness through a helper function in exec.c] Reviewed-by:
Anthony Liguori <aliguori@us.ibm.com>
-
Alexander Graf authored
Now that we have the SoC init function in the same file, let's integrate it with the board initialization. While at it, also make use of the newly qdev'ified PCI host controller. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
The separation of ppc440 and ppc440_bamboo makes some sense, since ppc440 is the SoC while ppc440_bamboo is the actual board. But the separation makes things harder for us for no good reason, so let's just fold them in together with each other. Signed-off-by:
Alexander Graf <agraf@suse.de>
-