Re: [Qemu-devel] [PATCH v4 08/21] block: expect errors from bdrv_co_is_allocated

2013-08-30 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 29/08/2013 23:35, Eric Blake ha scritto: > block-migration.c uses !bdrv_is_allocated as a condition for a > while loop; should that check for errors? Not needed, in case of an error it will exit the loop and read the sector. This will probably cau

[Qemu-devel] Strange clock issues with Windows Server 2008 R2

2013-08-30 Thread David Weber
Hi, we're experiencing some very strange clock issues with a Windows Server 2008R8 which runs on a Gentoo Host with qemu 1.5.2 and Linux 3.11-rc7 The Windows Server is intended to be a terminalserver which serves desktops through RDP. When I start a session, everything works fine for some time

Re: [Qemu-devel] [RFC 1/5] target-arm: add ARM946E-S CPU

2013-08-30 Thread Peter Maydell
On 30 August 2013 06:09, Peter Crosthwaite wrote: > On Fri, Aug 30, 2013 at 4:17 AM, Antony Pavlov > wrote: >> If Magic Lantern or CHDK need some specific initial CPU CP15 register state >> then we can fix it in the platform code without defining new CPU type. >> >> Any comments? > > Object prop

Re: [Qemu-devel] [PATCH 02/18] qapi-types.py: Implement 'base' for unions

2013-08-30 Thread Wenchao Xia
于 2013-8-30 2:36, Luiz Capitulino 写道: On Thu, 29 Aug 2013 11:02:26 -0600 Eric Blake wrote: On 08/29/2013 10:33 AM, Luiz Capitulino wrote: Strange, it appears on your pull request... But anyway, your series made it into 1.6.0, so I think we'll need the missing patch in 1.6.1 too? There's n

Re: [Qemu-devel] [PATCH 18/18] blockdev: 'blockdev-add' QMP command

2013-08-30 Thread Wenchao Xia
于 2013-7-23 21:03, Kevin Wolf 写道: > Signed-off-by: Kevin Wolf > --- > blockdev.c | 45 + > qapi-schema.json | 293 > +++ > qmp-commands.hx | 26 + > 3 files changed, 364 insertions(+) > > diff --git a/blockdev.c b/bloc

Re: [Qemu-devel] [PATCH 7/8] spapr vfio: add spapr-pci-vfio-host-bridge to support vfio

2013-08-30 Thread Alexey Kardashevskiy
On 08/27/2013 09:08 PM, Alexander Graf wrote: >> type_init(register_types); >> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c >> index 869ca43..3f37cac 100644 >> --- a/hw/ppc/spapr_pci.c >> +++ b/hw/ppc/spapr_pci.c > > I think we should move the vfio phb into a separate file and make it be a

[Qemu-devel] [PATCH v3 1/8] qcow2: Add corrupt bit

2013-08-30 Thread Max Reitz
This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful). Signed-off-by: Max Reitz --- block/qcow2.c | 47 +++

[Qemu-devel] [PATCH v3 0/8] Add metadata overlap checks

2013-08-30 Thread Max Reitz
If a qcow2 image file becomes corrupted, any write may inadvertently overwrite important metadata structures such as the L1 table. This series adds functionality for detecting, preventing and (to some extent) repairing such collisions. v3: - split PATCH 4/5 into four distinct patches (4/8, 5/8, 6

[Qemu-devel] [PATCH v3 2/8] qcow2: Metadata overlap checks

2013-08-30 Thread Max Reitz
Two new functions are added; the first one checks a given range in the image file for overlaps with metadata (main header, L1 tables, L2 tables, refcount table and blocks). The second one should be used immediately before writing to the image file as it calls the first function and, upon collision

[Qemu-devel] [PATCH v3 8/8] qemu-iotests: Overlapping cluster allocations

2013-08-30 Thread Max Reitz
A new test on corrupted images with overlapping cluster allocations. Signed-off-by: Max Reitz --- tests/qemu-iotests/060 | 111 + tests/qemu-iotests/060.out | 44 ++ tests/qemu-iotests/group | 1 + 3 files changed, 156 insertio

[Qemu-devel] [PATCH v3 3/8] qcow2: Employ metadata overlap checks

2013-08-30 Thread Max Reitz
The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz --- block/qcow2-cache.c| 17 + block/qcow2-cluster.c | 21 + block/qcow2-snapshot.c | 22 +++

[Qemu-devel] [PATCH v3 4/8] qcow2-refcount: Move OFLAG_COPIED checks

2013-08-30 Thread Max Reitz
Move the OFLAG_COPIED checks out of check_refcounts_l1 and check_refcounts_l2 and after the actual refcount checks/fixes (since the refcounts might actually change there). Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 99 +- 1 file changed,

[Qemu-devel] [PATCH v3 6/8] qcow2-refcount: Repair shared refcount blocks

2013-08-30 Thread Max Reitz
If the refcount of a refcount block is greater than one, we can at least try to repair that problem by duplicating the affected block. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 148 - include/block/block.h | 1 + 2 files changed, 147

[Qemu-devel] [PATCH v3 5/8] qcow2-refcount: Repair OFLAG_COPIED errors

2013-08-30 Thread Max Reitz
Since the OFLAG_COPIED checks are now executed after the refcounts have been repaired (if repairing), it is safe to assume that they are correct but the OFLAG_COPIED flag may be not. Therefore, if its value differs from what it should be (considering the according refcount), that discrepancy can be

[Qemu-devel] [PATCH v3 7/8] qcow2_check: Mark image consistent

2013-08-30 Thread Max Reitz
If no corruptions remain after an image repair (and no errors have been encountered), clear the corrupt flag in qcow2_check. Signed-off-by: Max Reitz --- block/qcow2.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c index 3a95ff1..aeb2ebb 10

[Qemu-devel] [PATCH v3 0/3] bugs fix for hpet

2013-08-30 Thread Liu Ping Fan
v3: change hpet interrupt capablity on board's demand Liu Ping Fan (3): hpet: inverse polarity when pin above ISA_NUM_IRQS qdev: interface for SysBusDevice to change property on requirement hpet: entitle more irq pins for hpet hw/core/sysbus.c| 5 - hw/i386/pc.c| 8

[Qemu-devel] [PATCH v3 2/3] qdev: interface for SysBusDevice to change property on requirement

2013-08-30 Thread Liu Ping Fan
qdev's property can not be set after realized, but there is a requirement of adjusting device's behavior on different mother boards. So introducing a callback in sysbus_try_create_simple() to adjust device's property on board's demand. (This patch is needed by the later one which changes hpet's i

[Qemu-devel] [PATCH v3 3/3] hpet: entitle more irq pins for hpet

2013-08-30 Thread Liu Ping Fan
On q35 machine, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 of ioapic can be dynamically assigned to hpet as guest chooses. Signed-off-by: Liu Ping Fan --- hw/i386/pc.c| 8 +++- hw/timer/hpet.c | 12 ++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH v3 1/3] hpet: inverse polarity when pin above ISA_NUM_IRQS

2013-08-30 Thread Liu Ping Fan
According to hpet spec, hpet irq is high active. But according to ICH spec, there is inversion before the input of ioapic. So the OS will expect low active on this IRQ line.(And this is observed on bare metal). We fold the emulation of this inversion inside the hpet logic. Signed-off-by: Liu Ping

[Qemu-devel] [PATCH] s390-ccw.img: Fix waiting for virtio processing.

2013-08-30 Thread Cornelia Huck
The guest side must not manipulate the index for the used buffers. Instead, remember the state of the used buffer locally and wait until it has moved. Signed-off-by: Cornelia Huck --- pc-bios/s390-ccw/virtio.c | 10 +++--- pc-bios/s390-ccw/virtio.h | 1 + 2 files changed, 8 insertions(+), 3

[Qemu-devel] [PATCH] s390-ccw: Fix ipl failure.

2013-08-30 Thread Cornelia Huck
Hi Alex, here's a simple patch that makes starting from a dataplane-backed device on a fast LPAR work for me. I make some assumptions on the host behaviour, but I think it's fine for that very simple implementation (and it certainly works better than before :) Could you either take or ack this pa

Re: [Qemu-devel] [RFC 1/5] target-arm: add ARM946E-S CPU

2013-08-30 Thread Antony Pavlov
On Fri, 30 Aug 2013 08:29:09 +0100 Peter Maydell wrote: > On 30 August 2013 06:09, Peter Crosthwaite > wrote: > > On Fri, Aug 30, 2013 at 4:17 AM, Antony Pavlov > > wrote: > >> If Magic Lantern or CHDK need some specific initial CPU CP15 register state > >> then we can fix it in the platform

[Qemu-devel] [PATCH] memory: fix 128 arithmetic in info mtree

2013-08-30 Thread Alexey Kardashevskiy
mtree_print_mr() calls int128_get64() in 3 places but only 2 places handle 2^64 correctly. This fixes the third call of int128_get64(). Signed-off-by: Alexey Kardashevskiy --- memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/memory.c b/memory.c index ffedde7..93f2

Re: [Qemu-devel] [RFC 2/5] hw/arm: add very initial support for Canon DIGIC SoC

2013-08-30 Thread Antony Pavlov
On Fri, 30 Aug 2013 15:07:49 +1000 Peter Crosthwaite wrote: > Hi, > > > On Fri, Aug 30, 2013 at 6:16 AM, Peter Maydell > wrote: > > > > On 29 August 2013 20:36, Antony Pavlov wrote: > > > On Thu, 29 Aug 2013 14:15:40 +0200 > > > Andreas Färber wrote: > > >> DigicState should be a QOM type d

Re: [Qemu-devel] [PATCH v3 2/3] qdev: interface for SysBusDevice to change property on requirement

2013-08-30 Thread Paolo Bonzini
Il 30/08/2013 09:53, Liu Ping Fan ha scritto: > qdev's property can not be set after realized, but there is a > requirement of adjusting device's behavior on different mother > boards. So introducing a callback in sysbus_try_create_simple() > to adjust device's property on board's demand. > > (Th

Re: [Qemu-devel] [RFC PATCH] convert ram_list to RCU DQ

2013-08-30 Thread Paolo Bonzini
Il 29/08/2013 21:18, Mike Day ha scritto: > >> Similarly, here the critical section includes the caller, and block is >> living across calls to host. Again, for now just put all of ram_load >> under a huge RCU critical section. Later we can use ram_list.version to >> refresh the list and make th

Re: [Qemu-devel] [PATCH v3 2/3] qdev: interface for SysBusDevice to change property on requirement

2013-08-30 Thread Peter Maydell
On 30 August 2013 08:53, Liu Ping Fan wrote: > qdev's property can not be set after realized, but there is a > requirement of adjusting device's behavior on different mother > boards. So introducing a callback in sysbus_try_create_simple() > to adjust device's property on board's demand. The sys

Re: [Qemu-devel] [RFC 4/5] hw/arm/digic: add UART support

2013-08-30 Thread Antony Pavlov
On Fri, 30 Aug 2013 15:16:42 +1000 Peter Crosthwaite wrote: > Hi Antony, > > On Thu, Aug 29, 2013 at 7:33 PM, Antony Pavlov > wrote: > > Signed-off-by: Antony Pavlov > > --- > > hw/arm/digic.c| 3 + > > hw/char/Makefile.objs | 1 + > > hw/char/digic-uart.c | 207 > > +++

[Qemu-devel] [PATCH] virtio-rng: add check of period

2013-08-30 Thread Amos Kong
If period is assigned to 0, limit timer will expire immediately. This limit is meaningless. This patch forbids to assign 0 to period. Signed-off-by: Amos Kong --- hw/virtio/virtio-rng.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c inde

Re: [Qemu-devel] [PATCH] chardev: fix pty_chr_timer

2013-08-30 Thread Gerd Hoffmann
On Do, 2013-08-22 at 11:57 +0200, Gerd Hoffmann wrote: > pty_chr_timer first calls pty_chr_update_read_handler(), then clears > timer_tag (because it is a one-shot timer). This is the wrong order > though. pty_chr_update_read_handler might re-arm time timer, and the > new timer_tag gets overwitt

[Qemu-devel] [PATCH v2 1/2] qcow2-refcount: Snapshot update for zero clusters

2013-08-30 Thread Max Reitz
Account for all cluster types in qcow2_update_snapshot_refcounts; this prevents this function from updating the refcount of unallocated zero clusters which effectively led to wrong adjustments of the refcount of cluster 0 (the main qcow2 header). This in turn resulted in images with (unallocated) z

[Qemu-devel] [PATCH v2 0/2] qcow2: Snapshot update for zero clusters

2013-08-30 Thread Max Reitz
When creating a snapshots, the refcount adjustment function basically adjusted the refcounts of any cluster with a non-zero L2 entry. However, the L2 entry of unallocated zero clusters is exactly one (therefore non-zero) which led to wrong refcount updates on cluster 0 (the main qcow2 header), sinc

Re: [Qemu-devel] [PATCH] s390-ccw.img: Fix waiting for virtio processing.

2013-08-30 Thread Paolo Bonzini
Il 30/08/2013 09:59, Cornelia Huck ha scritto: > +vr->used_idx = vr->used->idx; > +/* > + * Wait until the used index has moved. > + * Note: This is only race-free if the host doesn't start draining > + * the queue out of its own accord. > + */ > +while (vr->used->idx ==

[Qemu-devel] [PATCH v2 2/2] qemu-iotests: Snapshotting zero clusters

2013-08-30 Thread Max Reitz
This test creates an image with unallocated zero clusters, then creates a snapshot. Afterwards, there should be neither any errors nor leaks. Signed-off-by: Max Reitz --- tests/qemu-iotests/062 | 64 tests/qemu-iotests/group | 1 + 2 files chan

[Qemu-devel] [PATCH v3 1/2] qcow2-refcount: Snapshot update for zero clusters

2013-08-30 Thread Max Reitz
Account for all cluster types in qcow2_update_snapshot_refcounts; this prevents this function from updating the refcount of unallocated zero clusters which effectively led to wrong adjustments of the refcount of cluster 0 (the main qcow2 header). This in turn resulted in images with (unallocated) z

[Qemu-devel] [PATCH v3 2/2] qemu-iotests: Snapshotting zero clusters

2013-08-30 Thread Max Reitz
This test creates an image with unallocated zero clusters, then creates a snapshot. Afterwards, there should be neither any errors nor leaks. Signed-off-by: Max Reitz --- tests/qemu-iotests/062 | 64 ++ tests/qemu-iotests/062.out | 9 +++ test

[Qemu-devel] [PATCH v3 0/2] qcow2: Snapshot update for zero clusters

2013-08-30 Thread Max Reitz
When creating a snapshots, the refcount adjustment function basically adjusted the refcounts of any cluster with a non-zero L2 entry. However, the L2 entry of unallocated zero clusters is exactly one (therefore non-zero) which led to wrong refcount updates on cluster 0 (the main qcow2 header), sinc

Re: [Qemu-devel] [PATCH v3 4/8] qcow2-refcount: Move OFLAG_COPIED checks

2013-08-30 Thread Kevin Wolf
Am 30.08.2013 um 09:46 hat Max Reitz geschrieben: > Move the OFLAG_COPIED checks out of check_refcounts_l1 and > check_refcounts_l2 and after the actual refcount checks/fixes (since the > refcounts might actually change there). > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 99 >

[Qemu-devel] [PATCH v2] s390-ccw: Fix waiting for virtio processing.

2013-08-30 Thread Cornelia Huck
The guest side must not manipulate the index for the used buffers. Instead, remember the state of the used buffer locally and wait until it has moved. Signed-off-by: Cornelia Huck -- v1 -> v2: Move setting the used index as by Paolo's suggestion --- pc-bios/s390-ccw/virtio.c | 7 --- pc-bi

[Qemu-devel] [PATCH v2] s390-ccw: Fix ipl failure.

2013-08-30 Thread Cornelia Huck
Hi, here's v2 of the s390-ccw bios fix, improved as by Paolo's suggestion. Still works fine for me with a dataplane device :) Cornelia Huck (1): s390-ccw: Fix waiting for virtio processing. pc-bios/s390-ccw/virtio.c | 7 --- pc-bios/s390-ccw/virtio.h | 1 + 2 files changed, 5 insertions(

Re: [Qemu-devel] [PATCH v3 0/8] Add metadata overlap checks

2013-08-30 Thread Kevin Wolf
Am 30.08.2013 um 09:46 hat Max Reitz geschrieben: > If a qcow2 image file becomes corrupted, any write may inadvertently > overwrite important metadata structures such as the L1 table. This > series adds functionality for detecting, preventing and (to some extent) > repairing such collisions. > >

Re: [Qemu-devel] [PATCH] sdl: Reverse support for video mode setting

2013-08-30 Thread Lei Li
Any comments? On 08/27/2013 06:55 PM, Lei Li wrote: Currently, If the setting of video mode failed, qemu will exit. It should go back to the previous setting if the new screen resolution failed. This patch fixes LP#1216368, add support to revert to existing surface for the failure of video mode

Re: [Qemu-devel] [PATCH] virtio-rng: add check of period

2013-08-30 Thread Amit Shah
On (Fri) 30 Aug 2013 [16:35:51], Amos Kong wrote: > If period is assigned to 0, limit timer will expire immediately. > This limit is meaningless. This patch forbids to assign 0 to > period. > > Signed-off-by: Amos Kong Reviewed-by: Amit Shah Amit

Re: [Qemu-devel] [edk2] OVMF hung on qemu 1.6.0 with KVM

2013-08-30 Thread Laszlo Ersek
On 08/30/13 05:28, Gary Ching-Pang Lin wrote: > On Fri, Aug 30, 2013 at 02:04:40AM +1000, Bruce Rogers wrote: >> >>> On 8/29/2013 at 02:23 AM, Gary Ching-Pang Lin wrote: >>> On Wed, Aug 28, 2013 at 02:55:26PM +0200, Andreas Färber wrote: Am 28.08.2013 14:10, schrieb Laszlo Ersek: > On 0

Re: [Qemu-devel] [PATCH v3 4/8] qcow2-refcount: Move OFLAG_COPIED checks

2013-08-30 Thread Max Reitz
Am 30.08.2013 10:48, schrieb Kevin Wolf: Am 30.08.2013 um 09:46 hat Max Reitz geschrieben: Move the OFLAG_COPIED checks out of check_refcounts_l1 and check_refcounts_l2 and after the actual refcount checks/fixes (since the refcounts might actually change there). Signed-off-by: Max Reitz ---

Re: [Qemu-devel] [PATCH v3 0/2] qcow2: Snapshot update for zero clusters

2013-08-30 Thread Kevin Wolf
Am 30.08.2013 um 10:40 hat Max Reitz geschrieben: > When creating a snapshots, the refcount adjustment function basically > adjusted the refcounts of any cluster with a non-zero L2 entry. However, > the L2 entry of unallocated zero clusters is exactly one (therefore > non-zero) which led to wrong r

Re: [Qemu-devel] [RFC] aio: add aio_context_acquire() and aio_context_release()

2013-08-30 Thread Stefan Hajnoczi
On Thu, Aug 29, 2013 at 10:26:31AM +0200, Paolo Bonzini wrote: > Il 27/08/2013 16:39, Stefan Hajnoczi ha scritto: > > +void aio_context_acquire(AioContext *ctx) > > +{ > > +qemu_mutex_lock(&ctx->acquire_lock); > > +while (ctx->owner) { > > +assert(!qemu_thread_is_self(ctx->owner));

Re: [Qemu-devel] [PATCH V7 0/5] Continuous Leaky Bucket Throttling

2013-08-30 Thread Stefan Hajnoczi
On Thu, Aug 29, 2013 at 11:37:20AM +0200, Benoît Canet wrote: > > 1. We keep modifying the timer in bdrv_io_limits_intercept() on each > >request even when it has already been set. I think we'll set it to > >the same absolute timestamp, modulo numerical issues. Should we > >avoid doin

[Qemu-devel] [PATCH] target-i386: fix disassembly with PAE=1, PG=0

2013-08-30 Thread Paolo Bonzini
CR4.PAE=1 will not enable paging if CR0.PG=0, but the "if" chain in x86_cpu_get_phys_page_debug says otherwise. Check CR0.PG before everything else. Fixes "-d in_asm" for a code section at the beginning of OVMF. Cc: Richard Henderson Signed-off-by: Paolo Bonzini --- target-i386/helper.c | 34

Re: [Qemu-devel] [PATCH] target-i386: fix disassembly with PAE=1, PG=0

2013-08-30 Thread Paolo Bonzini
Il 30/08/2013 11:58, Paolo Bonzini ha scritto: > CR4.PAE=1 will not enable paging if CR0.PG=0, but the "if" chain > in x86_cpu_get_phys_page_debug says otherwise. Check CR0.PG > before everything else. > > Fixes "-d in_asm" for a code section at the beginning of OVMF. > > Cc: Richard Henderson

Re: [Qemu-devel] [PATCH V7 0/5] Continuous Leaky Bucket Throttling

2013-08-30 Thread Paolo Bonzini
Il 30/08/2013 11:53, Stefan Hajnoczi ha scritto: > > Resources are refilled as time passes, not by completing requests, so > there should be no need to act when a request completes. Resources are refilled also by completing requests. iops=0, iops_max=10 is a valid setting that will allow at most

[Qemu-devel] [PATCH v4 09/12] spapr_iommu: add SPAPR VFIO IOMMU

2013-08-30 Thread Alexey Kardashevskiy
This adds SPAPR VFIO IOMMU device in order to support DMA operations for VFIO devices. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_iommu.c | 88 ++ include/hw/ppc/spapr.h | 6 2 files changed, 94 insertions(+) diff --git a/hw/ppc/

[Qemu-devel] [PATCH v4 02/12] vfio: Create VFIOAddressSpace objects as needed

2013-08-30 Thread Alexey Kardashevskiy
From: David Gibson So far, VFIO has a notion of different logical DMA address spaces, but only ever uses one (system memory). This patch extends this, creating new VFIOAddressSpace objects as necessary, according to the AddressSpace reported by the PCI subsystem for this device's DMAs. This isn

[Qemu-devel] [PATCH v4 05/12] spapr_pci: convert init to realize

2013-08-30 Thread Alexey Kardashevskiy
This converts init() callback to realize(). The conversion includes: 1. change of prototype; 2. conversion of fprintf to error_setg; 3. introducing a finish_realize() callback which at the moment does IOMMU setup. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_pci.c | 82 +

[Qemu-devel] [PATCH v4 08/12] spapr_iommu: introduce SPAPR_TCE_TABLE class

2013-08-30 Thread Alexey Kardashevskiy
This introduces a SPAPR TCE TABLE device class with a put_tce() callback. This reworks the H_PUT_TCE, H_PUT_TCE_INDIRECT, H_STUFF_TCE hypercall handlers to make use of the new put_tce() callback. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_iommu.c | 76

[Qemu-devel] [PATCH v4 00/12] vfio on spapr-ppc64

2013-08-30 Thread Alexey Kardashevskiy
Yet another try with VFIO on SPAPR (server PPC64). Changes: v3 -> v4: * addressed all comments from Alex Williamson * moved spapr-pci-phb-vfio-phb to new file * split spapr-pci-phb-vfio to many smaller patches The "spapr vfio: add vfio_container_spapr_get_info()" needs kernel headers update (v3.1

[Qemu-devel] [PATCH v4 11/12] spapr vfio: enable for spapr

2013-08-30 Thread Alexey Kardashevskiy
This turns the sPAPR support on and enables VFIO container use in the kernel. Signed-off-by: Alexey Kardashevskiy --- Changes: v4: * fixed format string to use %m which is a glibc extension: "Print output of strerror(errno). No argument is required." --- hw/misc/vfio.c | 30 +

[Qemu-devel] [PATCH v4 10/12] spapr vfio: add spapr-pci-vfio-host-bridge to support vfio

2013-08-30 Thread Alexey Kardashevskiy
The patch adds a spapr-pci-vfio-host-bridge device type which is a PCI Host Bridge with VFIO support. The new device inherits from the spapr-pci-host-bridge device and adds the following properties: iommu - IOMMU group ID which represents a Partitionable Endpoint, QEMU/ppc64

[Qemu-devel] [PATCH v4 04/12] spapr vfio: add vfio_container_spapr_get_info()

2013-08-30 Thread Alexey Kardashevskiy
As sPAPR platform supports DMA windows on a PCI bus, the information about their location and size should be passed into the guest via the device tree. The patch adds a helper to read this info from the container fd. Signed-off-by: Alexey Kardashevskiy --- Changes: v4: * fixed possible leaks on

[Qemu-devel] [PATCH v4 12/12] spapr kvm vfio: enable in-kernel acceleration

2013-08-30 Thread Alexey Kardashevskiy
This enables in-kernel support for DMA operations on VFIO PHBs. This creates a "SPAPR TCE IOMMU" KVM device and initializes it with LIOBN and IOMMU fd. Once enabled, it keeps H_PUT_TCE, H_PUT_TCE_INDIRECT, H_STUFF_TCE hypercalls in the kernel so their QEMU handlers won't be called. Signed-off-by:

[Qemu-devel] [PATCH v4 03/12] vfio: Add guest side IOMMU support

2013-08-30 Thread Alexey Kardashevskiy
From: David Gibson This patch uses the new IOMMU notifiers to allow VFIO pass through devices to work with guest side IOMMUs, as long as the host-side VFIO iommu has sufficient capability and granularity to match the guest side. This works by tracking all map and unmap operations on the guest IOM

[Qemu-devel] [PATCH v4 06/12] spapr_pci: add spapr_pci trace

2013-08-30 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy --- trace-events | 1 + 1 file changed, 1 insertion(+) diff --git a/trace-events b/trace-events index 8ccffdc..c67fcf1 100644 --- a/trace-events +++ b/trace-events @@ -1113,6 +1113,7 @@ qxl_render_guest_primary_resized(int32_t width, int32_t height, int32_t s

[Qemu-devel] [PATCH v4 01/12] vfio: Introduce VFIO address spaces

2013-08-30 Thread Alexey Kardashevskiy
From: David Gibson The only model so far supported for VFIO passthrough devices is the model usually used on x86, where all of the guest's RAM is mapped into the (host) IOMMU and there is no IOMMU visible in the guest. This patch begins to relax this model, introducing the notion of a VFIOAddres

[Qemu-devel] [PATCH v3 0/3] block/qcow2: Image file option amendment

2013-08-30 Thread Max Reitz
This series adds support to qemu-img, block and qcow2 for amending image options on existing image files. Depends on: - option: Add assigned flag to QEMUOptionParameter - qcow2: Snapshot update for zero clusters (series, v2) v3: - deallocate non-preallocated zero clusters on non-backed images

[Qemu-devel] [PATCH v3 3/3] qemu-iotest: qcow2 image option amendment

2013-08-30 Thread Max Reitz
Add tests for qemu-img amend on qcow2 image files. Signed-off-by: Max Reitz --- tests/qemu-iotests/061 | 152 ++ tests/qemu-iotests/061.out | 318 + tests/qemu-iotests/group | 1 + 3 files changed, 471 insertions(+) create

[Qemu-devel] [PATCH v3 2/3] qcow2: Implement bdrv_amend_options

2013-08-30 Thread Max Reitz
Implement bdrv_amend_options for compat, size, backing_file, backing_fmt and lazy_refcounts. Downgrading images from compat=1.1 to compat=0.10 is achieved through handling all incompatible flags accordingly, clearing all compatible and autoclear flags and expanding all zero clusters. Signed-off-b

[Qemu-devel] [PATCH v3 1/3] block: Image file option amendment

2013-08-30 Thread Max Reitz
This patch adds the "amend" option to qemu-img which allows changing image options on existing image files. It also adds the generic bdrv implementation which is basically just a wrapper for the image format specific function. Signed-off-by: Max Reitz --- block.c | 8 + in

[Qemu-devel] [PATCH v4 07/12] spapr_pci: converts fprintf to error_report

2013-08-30 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 11bb737..5129257 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -293,7 +293,7 @@ static void rtas_ibm_c

Re: [Qemu-devel] [PATCH v2] Make -kernel flag optional on ARM.

2013-08-30 Thread Grant Likely
Hi Peter, What's the status on this patch? Is it able to be merged? g. On Wed, Jul 10, 2013 at 9:16 AM, Grant Likely wrote: > Sometimes we want to boot the system via firmware instead of loading a > kernel into ram with the -kernel parameter. This patch makes the -kernel > parameter optional so

Re: [Qemu-devel] Qemu Booting a PC without an MBR?

2013-08-30 Thread Fam Zheng
On Fri, 08/30 08:43, Peter Lieven wrote: > On 30.08.2013 08:37, Paolo Bonzini wrote: > >Il 30/08/2013 08:28, Peter Lieven ha scritto: > >>Hi all, > >> > >>today I had the second incidence of a migrated system (copied with DD) > >>to qemu which won't boot. (stuck after booting from harddisk message)

Re: [Qemu-devel] [PATCH v3] slirp: Port redirection option behave differently on Linux and Windows

2013-08-30 Thread Jan Kiszka
On 2013-08-15 21:25, Taimoor wrote: > From: Taimoor Mirza > > port redirection code uses SO_REUSEADDR socket option before binding to > host port. Behavior of SO_REUSEADDR is different on Windows and Linux. > Relaunching QEMU with same host and guest port redirection values on Linux > throws erro

Re: [Qemu-devel] [PATCH V10 00/15] monitor: support sub command group in auto completion and help

2013-08-30 Thread Luiz Capitulino
On Fri, 30 Aug 2013 10:22:43 +0800 Wenchao Xia wrote: > 于 2013-8-29 22:16, Luiz Capitulino 写道: > > On Tue, 27 Aug 2013 20:38:12 +0800 > > Wenchao Xia wrote: > > > >> This series make auto completion and help functions works normal for sub > >> command, by using reentrant functions. In order to d

Re: [Qemu-devel] [PATCH V2 1/3] qemu-iotests: add unix socket help program

2013-08-30 Thread Luiz Capitulino
On Fri, 30 Aug 2013 10:42:27 +0800 Wenchao Xia wrote: > 于 2013-8-29 22:50, Luiz Capitulino 写道: > > On Tue, 27 Aug 2013 10:52:09 +0800 > > Wenchao Xia wrote: > > > >> This program can do a sendmsg call to transfer fd with unix > >> socket, which is not supported in python2. > >> > >> The built bi

Re: [Qemu-devel] [edk2] OVMF hung on qemu 1.6.0 with KVM

2013-08-30 Thread Paolo Bonzini
Il 30/08/2013 11:37, Laszlo Ersek ha scritto: > Disclaimer: I don't know what I'm talking about. No problem. :) > So, Jordan's patch for OVMF (SVN r14494) builds the page tables (and > finally writes the root to CR3) in a phase when paging is not enabled > yet in the VM. > > Again, I have no clu

Re: [Qemu-devel] [edk2] OVMF hung on qemu 1.6.0 with KVM

2013-08-30 Thread Gleb Natapov
On Fri, Aug 30, 2013 at 01:58:59PM +0200, Paolo Bonzini wrote: > Il 30/08/2013 11:37, Laszlo Ersek ha scritto: > > Disclaimer: I don't know what I'm talking about. > > No problem. :) > > > So, Jordan's patch for OVMF (SVN r14494) builds the page tables (and > > finally writes the root to CR3) in

[Qemu-devel] [PULL 04/16] monitor: avoid use of global *cur_mon in block_completion_it()

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- monitor.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index 3a0b40c..d01aa62 100644 --- a/monitor.c +++ b/monitor.c @@ -409

[Qemu-devel] [PULL 01/16] monitor: Add missing attributes to local function

2013-08-30 Thread Luiz Capitulino
From: Stefan Weil Function expr_error gets a format string and variable arguments like printf. It also never returns. Add the necessary attributes. Signed-off-by: Stefan Weil Signed-off-by: Luiz Capitulino --- monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mon

[Qemu-devel] [PULL 00/16] QMP queue

2013-08-30 Thread Luiz Capitulino
The following changes since commit b5d54bd42158b90b239bb6ce9c13072eb3a53fd2: Merge remote-tracking branch 'qemu-kvm/uq/master' into stable-1.5 (2013-08-29 17:21:51 -0500) are available in the git repository at: git://repo.or.cz/qemu/qmp-unstable.git queue/qmp for you to fetch changes up t

[Qemu-devel] [PULL 03/16] monitor: avoid use of global *cur_mon in file_completion()

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- monitor.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index 770ab6e..3a0b40c 100644 --- a/monitor.c +++ b/monitor.c @@ -4035,7 +4035,7

[Qemu-devel] [PULL 05/16] monitor: avoid use of global *cur_mon in monitor_find_completion()

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia Parameter *mon is added, and local variable *mon added in previous patch is removed. The caller readline_completion(), pass rs->mon as value, which should be initialized in readline_init() called by monitor_init(). Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake Signed-off

[Qemu-devel] [PULL 02/16] monitor: avoid use of global *cur_mon in cmd_completion()

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia A new local variable *mon is added in monitor_find_completion() to make compile pass, which will be removed later in conversion patch for monitor_find_completion(). Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- monitor.c | 13 +++-

[Qemu-devel] [PULL 13/16] monitor: refine monitor_find_completion()

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia In order to support sub command in auto completion, a reentrant function is needed, so monitor_find_completion() is split into two parts. The first part does parsing of user input which need to be done only once, the second part does the auto completion job according to the pars

[Qemu-devel] [PULL 07/16] monitor: call sortcmdlist() only one time

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia It doesn't need to be done for every monitor, so change it. Signed-off-by: Wenchao Xia Signed-off-by: Luiz Capitulino --- monitor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index b8f79a5..457948d 100644 --- a/monitor.c +++ b

[Qemu-devel] [PULL 06/16] monitor: avoid use of global *cur_mon in readline_completion()

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia Now all completion functions do not use *cur_mon any more, instead they use rs->mon. In short, structure ReadLineState decide where the complete action would be taken now. Tested with the case that qemu have two telnet monitors, auto completion function works normal. Signed-of

[Qemu-devel] [PULL 08/16] monitor: split off monitor_data_init()

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia In qmp_human_monitor_command(), the monitor need to initialized for basic functionalities, and later more init code will be added, so split off this function. Note that it is different with QMP mode monitor which accept json string from monitor's input, qmp_human_monitor_command

[Qemu-devel] [PULL 09/16] monitor: avoid direct use of global variable *mon_cmds

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia New member *cmd_table is added in structure Monitor to avoid direct usage of *mon_cmds. Now monitor have an associated command table, when global variable *info_cmds is also discarded, structure Monitor would gain full control about how to deal with user input. Signed-off-by: W

[Qemu-devel] [PULL 12/16] monitor: support sub command in help

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia The old code in help_cmd() uses global 'info_cmds' and treats it as a special case. Actually 'info_cmds' is a sub command group of 'mon_cmds', in order to avoid direct use of it, help_cmd() needs to change its work mechanism to support sub command and not treat it as a special c

[Qemu-devel] [PULL 15/16] monitor: allow "help" show message for single command in sub group

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia A new parameter type 'S' is introduced to allow user input any string. "help info block" works normal now. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- hmp-commands.hx | 2 +- monitor.c | 27 +++ 2 file

[Qemu-devel] [PULL 10/16] monitor: code move for parse_cmdline()

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia help_cmd() need this function later, so move it. get_str() is called by parse_cmdline() so it is moved also. Some code style error reported by check script, is also fixed. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- monitor.c | 191

[Qemu-devel] [PULL 16/16] monitor: improve auto complete of "help" for single command in sub group

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia Now special case "help *" in auto completion can work with sub commands, such as "help info u*". Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- monitor.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/monitor

[Qemu-devel] [PULL 11/16] monitor: refine parse_cmdline()

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia Since this function will be used by help_cmd() later, so improve it to make it more generic and easier to use. free_cmdline_args() is added too as paired function to free the result. One change of this function is that, when the valid args in input exceed the limit of MAX_ARGS,

[Qemu-devel] [PULL 14/16] monitor: support sub command in auto completion

2013-08-30 Thread Luiz Capitulino
From: Wenchao Xia This patch allows auto completion work normal for sub command case, "info block [DEVICE]" can auto complete now, by re-enter the completion function. In original code "info" is treated as a special case, now it is treated as a sub command group, global variable info_cmds is not

Re: [Qemu-devel] [PATCH v3 3/3] hpet: entitle more irq pins for hpet

2013-08-30 Thread Andreas Färber
Am 30.08.2013 09:53, schrieb Liu Ping Fan: > On q35 machine, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 > of ioapic can be dynamically assigned to hpet as guest chooses. > > Signed-off-by: Liu Ping Fan > --- > hw/i386/pc.c| 8 +++- > hw/timer/hpet.c | 12 ++-- > 2

Re: [Qemu-devel] [PATCH v3 2/3] qdev: interface for SysBusDevice to change property on requirement

2013-08-30 Thread Andreas Färber
Am 30.08.2013 10:17, schrieb Paolo Bonzini: > Il 30/08/2013 09:53, Liu Ping Fan ha scritto: >> qdev's property can not be set after realized, but there is a >> requirement of adjusting device's behavior on different mother >> boards. So introducing a callback in sysbus_try_create_simple() >> to ad

[Qemu-devel] [PATCH v4 0/8] Add metadata overlap checks

2013-08-30 Thread Max Reitz
If a qcow2 image file becomes corrupted, any write may inadvertently overwrite important metadata structures such as the L1 table. This series adds functionality for detecting, preventing and (to some extent) repairing such collisions. v4: - fixed handling of preallocated zero clusters in patch 4

[Qemu-devel] [PATCH v4 2/8] qcow2: Metadata overlap checks

2013-08-30 Thread Max Reitz
Two new functions are added; the first one checks a given range in the image file for overlaps with metadata (main header, L1 tables, L2 tables, refcount table and blocks). The second one should be used immediately before writing to the image file as it calls the first function and, upon collision

[Qemu-devel] [PATCH v4 3/8] qcow2: Employ metadata overlap checks

2013-08-30 Thread Max Reitz
The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz --- block/qcow2-cache.c| 17 + block/qcow2-cluster.c | 21 + block/qcow2-snapshot.c | 22 +++

[Qemu-devel] [PATCH v4 1/8] qcow2: Add corrupt bit

2013-08-30 Thread Max Reitz
This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful). Signed-off-by: Max Reitz --- block/qcow2.c | 47 +++

[Qemu-devel] [PATCH v4 6/8] qcow2-refcount: Repair shared refcount blocks

2013-08-30 Thread Max Reitz
If the refcount of a refcount block is greater than one, we can at least try to repair that problem by duplicating the affected block. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 148 - include/block/block.h | 1 + 2 files changed, 147

[Qemu-devel] [PATCH v4 4/8] qcow2-refcount: Move OFLAG_COPIED checks

2013-08-30 Thread Max Reitz
Move the OFLAG_COPIED checks out of check_refcounts_l1 and check_refcounts_l2 and after the actual refcount checks/fixes (since the refcounts might actually change there). Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 115 +++-- 1 file changed,

  1   2   3   >