[Qemu-devel] [PATCH v7 09/12] iov: add qemu_iovec_concat_iov()

2012-12-14 Thread Stefan Hajnoczi
The qemu_iovec_concat() function copies a subset of a QEMUIOVector. The new qemu_iovec_concat_iov() function does the same for a iov/cnt pair. It is easy to define qemu_iovec_concat() in terms of qemu_iovec_concat_iov(). The existing code is mostly unchanged, except for the assertion src->size >

[Qemu-devel] [PATCH v7 03/12] dataplane: add host memory mapping code

2012-12-14 Thread Stefan Hajnoczi
The data plane thread needs to map guest physical addresses to host pointers. Normally this is done with cpu_physical_memory_map() but the function assumes the global mutex is held. The data plane thread does not touch the global mutex and therefore needs a thread-safe memory mapping mechanism.

[Qemu-devel] [PATCH v7 07/12] iov: add iov_discard_front/back() to remove data

2012-12-14 Thread Stefan Hajnoczi
The iov_discard_front/back() functions remove data from the front or back of the vector. This is useful when peeling off header/footer structs. Signed-off-by: Stefan Hajnoczi --- iov.c | 51 +++ iov.h | 13 + 2 files changed, 64 insert

[Qemu-devel] [PATCH v7 01/12] raw-posix: add raw_get_aio_fd() for virtio-blk-data-plane

2012-12-14 Thread Stefan Hajnoczi
The raw_get_aio_fd() function allows virtio-blk-data-plane to get the file descriptor of a raw image file with Linux AIO enabled. This interface is really a layering violation that can be resolved once the block layer is able to run outside the global mutex - at that point virtio-blk-data-plane wi

Re: [Qemu-devel] [RFC PATCH] Allow building without graphics support

2012-12-14 Thread Scott Wood
On 12/14/2012 02:13:53 AM, Gerd Hoffmann wrote: Hi, > Yes, I could manually install it, though then I get to deal with telling > the pixman build exactly where to install itself, and repeating the > process for each toolchain and multilib-variant thereof. That part is easy too. You just n

[Qemu-devel] [PATCH v7 06/12] dataplane: add Linux AIO request queue

2012-12-14 Thread Stefan Hajnoczi
The IOQueue has a pool of iocb structs and a function to add new read/write requests. Multiple requests can be added before calling the submit function to actually tell the host kernel to begin I/O. This allows callers to batch requests and submit them in one go. The actual I/O is performed usin

[Qemu-devel] [PATCH v7 12/12] virtio-blk: add x-data-plane=on|off performance feature

2012-12-14 Thread Stefan Hajnoczi
The virtio-blk-data-plane feature is easy to integrate into hw/virtio-blk.c. The data plane can be started and stopped similar to vhost-net. Users can take advantage of the virtio-blk-data-plane feature using the new -device virtio-blk-pci,x-data-plane=on property. The x-data-plane name was chos

[Qemu-devel] [PATCH v2] build: Use separate makefile for "trace/"

2012-12-14 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova -- Changes in v2: * Do not depend on "qemu-timer-common.o". * Use "$(obj)" in rules to refer to the build sub-directory. * Remove dependencies against "$(GENERATED_HEADERS)". Cc: Paolo Bonzini --- .gitignore |8 ++-- Makefile

Re: [Qemu-devel] [PATCH 04/20] block: make round_to_clusters public

2012-12-14 Thread Eric Blake
On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > This is needed in the following patch. > > Reviewed-by: Laszlo Ersek > Signed-off-by: Paolo Bonzini > --- > block.c | 16 > block.h | 4 > 2 files changed, 12 insertions(+), 8 deletions(-) Reviewed-by: Eric Blake -- Eric

Re: [Qemu-devel] [PATCH 05/20] mirror: perform COW if the cluster size is bigger than the granularity

2012-12-14 Thread Eric Blake
On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > When mirroring runs, the backing files for the target may not yet be > ready. However, this means that a copy-on-write operation on the target > would fill the missing sectors with zeros. Copy-on-write only happens > if the granularity of the dirty b

Re: [Qemu-devel] [PULL] pci,net,misc infrastructure

2012-12-14 Thread Blue Swirl
On Thu, Dec 13, 2012 at 7:26 AM, Michael S. Tsirkin wrote: > The following changes since commit 1c97e303d4ea80a2691334b0febe87a50660f99d: > > Merge remote-tracking branch 'afaerber/qom-cpu' into staging (2012-12-10 > 08:35:15 -0600) > > are available in the git repository at: > > > git://git.

Re: [Qemu-devel] [PATCH 1/3] qtest: Enable creation of multiple qemu instances

2012-12-14 Thread Blue Swirl
On Thu, Dec 13, 2012 at 10:02 PM, Jason Baron wrote: > From: Jason Baron > > Currently, the qtest harness can only spawn 1 qemu instance at a time because > the parent pid is used to create the socket files. Use the child pid instead, > so we can remove that limitation. > > Signed-off-by: Jason B

Re: [Qemu-devel] [PATCH 25/40] openpic: convert to qdev

2012-12-14 Thread Blue Swirl
On Fri, Dec 14, 2012 at 12:13 PM, Alexander Graf wrote: > This patch converts the OpenPIC device to qdev. Along the way it > renames the "openpic" target to "raven" and the "mpic" target to > "fsl_mpic_20", to better reflect the actual models they implement. > > This way we have a generic OpenPIC

Re: [Qemu-devel] [PATCH v7 03/12] dataplane: add host memory mapping code

2012-12-14 Thread Blue Swirl
On Fri, Dec 14, 2012 at 6:00 PM, Stefan Hajnoczi wrote: > The data plane thread needs to map guest physical addresses to host > pointers. Normally this is done with cpu_physical_memory_map() but the > function assumes the global mutex is held. The data plane thread does > not touch the global mu

[Qemu-devel] [PATCH v2] build: Use separate makefile for "trace/"

2012-12-14 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova -- Changes in v2: * Do not depend on "qemu-timer-common.o". * Use "$(obj)" in rules to refer to the build sub-directory. * Remove dependencies against "$(GENERATED_HEADERS)". Cc: Paolo Bonzini --- .gitignore |8 ++-- Makefile

Re: [Qemu-devel] [PATCH 25/40] openpic: convert to qdev

2012-12-14 Thread Alexander Graf
On 14.12.2012, at 21:32, Blue Swirl wrote: > On Fri, Dec 14, 2012 at 12:13 PM, Alexander Graf wrote: >> This patch converts the OpenPIC device to qdev. Along the way it >> renames the "openpic" target to "raven" and the "mpic" target to >> "fsl_mpic_20", to better reflect the actual models they

Re: [Qemu-devel] [PATCH 06/20] block: return count of dirty sectors, not chunks

2012-12-14 Thread Eric Blake
On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > Reviewed-by: Laszlo Ersek > Signed-off-by: Paolo Bonzini > --- > block-migration.c | 2 +- > block.c | 5 ++--- > block/mirror.c| 2 +- > 3 files changed, 4 insertions(+), 5 deletions(-) Reviewed-by: Eric Blake although the commit m

Re: [Qemu-devel] [PATCH 25/40] openpic: convert to qdev

2012-12-14 Thread Blue Swirl
On Fri, Dec 14, 2012 at 8:42 PM, Alexander Graf wrote: > > On 14.12.2012, at 21:32, Blue Swirl wrote: > >> On Fri, Dec 14, 2012 at 12:13 PM, Alexander Graf wrote: >>> This patch converts the OpenPIC device to qdev. Along the way it >>> renames the "openpic" target to "raven" and the "mpic" target

Re: [Qemu-devel] [PATCH v2] build: Use separate makefile for "trace/"

2012-12-14 Thread Lluís Vilanova
I'm really sorry for sending this multiple times. Lluís Vilanova writes: > Signed-off-by: Lluís Vilanova > -- > Changes in v2: > * Do not depend on "qemu-timer-common.o". > * Use "$(obj)" in rules to refer to the build sub-directory. > * Remove dependencies against "$(GENERATED_HEADERS)". > Cc

[Qemu-devel] [Bug 1090558] [NEW] hw/mc146818: error reading RTC_HOURS_ALARM

2012-12-14 Thread Antoine Mathys
Public bug reported: get_next_alarm() doesn't read the RTC_HOURS_ALARM field correctly. - Bit 7 must be masked before conversion from BCD. - Care must be taken to check the don't care condition before masking. - The PM bit must be read from RTC_HOURS_ALARM, not from RTC_HOURS (as is done in conv

Re: [Qemu-devel] [PATCH 07/20] block: allow customizing the granularity of the dirty bitmap

2012-12-14 Thread Eric Blake
On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block-migration.c | 5 +++-- > block.c | 17 ++--- > block.h | 5 + > block/mirror.c| 14 -- > qapi-schema.json | 4 +++- > 5 files changed, 21 insertions(+)

Re: [Qemu-devel] [PULL] pci,net,misc infrastructure

2012-12-14 Thread Blue Swirl
On Thu, Dec 13, 2012 at 7:26 AM, Michael S. Tsirkin wrote: > The following changes since commit 1c97e303d4ea80a2691334b0febe87a50660f99d: > > Merge remote-tracking branch 'afaerber/qom-cpu' into staging (2012-12-10 > 08:35:15 -0600) > > are available in the git repository at: > > > git://git.

Re: [Qemu-devel] [PATCH 4/6] openpic: don't crash on a register access without a CPU context

2012-12-14 Thread Scott Wood
On 12/14/2012 06:35:12 AM, Alexander Graf wrote: On 14.12.2012, at 03:12, Scott Wood wrote: > If we access a register via the QEMU memory inspection commands (e.g. > "xp") rather than from guest code, we won't have a CPU context. > Gracefully fail to access the register in that case, rather

Re: [Qemu-devel] [PATCH 4/6] openpic: don't crash on a register access without a CPU context

2012-12-14 Thread Alexander Graf
On 14.12.2012, at 22:42, Scott Wood wrote: > On 12/14/2012 06:35:12 AM, Alexander Graf wrote: >> On 14.12.2012, at 03:12, Scott Wood wrote: >> > If we access a register via the QEMU memory inspection commands (e.g. >> > "xp") rather than from guest code, we won't have a CPU context. >> > Graceful

Re: [Qemu-devel] [PATCH 08/20] mirror: allow customizing the granularity

2012-12-14 Thread Eric Blake
On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > The desired granularity may be very different depending on the kind of > operation (e.g. continuous replication vs. collapse-to-raw) and whether > the VM is expected to perform lots of I/O while mirroring is in progress. > > Allow the user to customiz

Re: [Qemu-devel] [PATCH 09/20] mirror: switch mirror_iteration to AIO

2012-12-14 Thread Eric Blake
On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > There is really no change in the behavior of the job here, since > there is still a maximum of one in-flight I/O operation between > the source and the target. However, this patch already introduces > the AIO callbacks (which are unmodified in the nex

Re: [Qemu-devel] [PATCH 10/20] mirror: add buf-size argument to drive-mirror

2012-12-14 Thread Eric Blake
On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > This makes sense when the next commit starts using the extra buffer space > to perform many I/O operations asynchronously. > > Signed-off-by: Paolo Bonzini > --- > block/mirror.c | 6 +++--- > block_int.h| 5 +++-- > blockdev.c

Re: [Qemu-devel] [PATCH 11/20] mirror: support more than one in-flight AIO operation

2012-12-14 Thread Eric Blake
On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > With AIO support in place, we can start copying more than one chunk > in parallel. This patch introduces the required infrastructure for > this: the buffer is split into multiple granularity-sized chunks, > and there is a free list to access them. >

Re: [Qemu-devel] [PATCH 12/20] mirror: support arbitrarily-sized iterations

2012-12-14 Thread Eric Blake
On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > Yet another optimization is to extend the mirroring iteration to include more > adjacent dirty blocks. This limits the number of I/O operations and makes > mirroring efficient even with a small granularity. Most of the infrastructure > is already in

[Qemu-devel] [PATCH] Fix conversion between 12 hours and 24 hours modes.

2012-12-14 Thread Antoine Mathys
The proper mapping between 24 hours and 12 hours modes is: 0 12 AM 1-111-11 AM 12 12 PM 13-23 1-11 PM Fix code accordingly. Signed-off-by: Antoine Mathys --- hw/ds1338.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/ds1338.c b/hw/ds1338.c inde

Re: [Qemu-devel] [PATCH 13/20] oslib: add a wrapper for mmap/munmap

2012-12-14 Thread Eric Blake
On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > osdep.h | 10 ++ > oslib-posix.c | 47 +++ > oslib-win32.c | 59 > +++ > 3 files changed, 116 inse

[Qemu-devel] [PATCH] fix dma.c MemoryRegion convertion

2012-12-14 Thread Marcelo Tosatti
The high byte of the ioport address is necessary to compute the register address, see "82371AB PCI ISA IDE Xcelerator (PIIX4)" document, eg: 4.2.1.1. DCOM—DMA Command Register (IO) I/O Address: Channels 0–3—08h; Channels 4–7—0D0h Also the size of the region is wrong. Fixes WinXP-32 installation

[Qemu-devel] [Bug 1090600] [NEW] Improve error reporting when -drive format= is incorrect

2012-12-14 Thread Cole Robinson
Public bug reported: With qemu.git as of e376a788ae130454ad5e797f60cb70d0308babb6 $ qemu-img create -f raw test.raw 1M Formatting 'test.raw', fmt=raw size=1048576 $ ./x86_64-softmmu/qemu-system-x86_64 -drive file=./test.raw,format=qcow2 qemu-system-x86_64: -drive file=./test.raw,format=qcow2: c

[Qemu-devel] [Bug 1090602] [NEW] RFE: Allow specifying usb-host device by serial number

2012-12-14 Thread Cole Robinson
Public bug reported: Currently you can pass through a host USB device to the guest like -device usb-host,vendorid=0x1234,productid=0x5678 Which is all well and good, but has problems if you are trying to assign to identical USB devices to the same guest. It would be useful if there was an add

[Qemu-devel] [Bug 1090604] [NEW] RFE: Implement support for SMBIOS Type 41 structures

2012-12-14 Thread Cole Robinson
Public bug reported: This was originally filed in Fedora bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=669955 """ Please extend the existing support for SMBIOS in qemu to add a capability to provide "Onboard Devices Extended Information" (Type 41). Not only is this replacing one of the

[Qemu-devel] [Bug 1090615] [NEW] RFE: More info in qemu-img info/check

2012-12-14 Thread Cole Robinson
Public bug reported: Originally filed in Fedora bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=861375 """ qemu-img info currently give me info like this: image: /home/alex/.local/share/gnome-boxes/images/Fedora 16 file format: qcow2 virtual size: 11G (11794287616 bytes) disk size: 4.5G cl

Re: [Qemu-devel] [PATCH v2 0/3] re-enable balloon stats

2012-12-14 Thread Dietmar Maurer
> - drop qmp & hmp interface of old stats code I think the old interface is not that bad (the new one is clumsy, because we need 6 qmp call instead of one to get all stats). Can't we try to make it functional and keep it? Seriously, I think 'interval' should be a property we can pass at qemu sta

<    1   2   3