[Qemu-devel] [PATCH 2/6] xics: add find_server

2014-05-06 Thread Alexey Kardashevskiy
PAPR allows having multiple interrupr servers. This adds a server lookup function and makes use of it. Since at the moment QEMU only supports a single server, no change in behaviour is expected. Signed-off-by: Alexey Kardashevskiy --- hw/intc/xics.c | 28 +++- 1 file ch

[Qemu-devel] [PATCH] spapr: pci: clean msi info when releasing it

2014-05-06 Thread Liu Ping Fan
In current code, we use phb->msi_table[ndev].nvec to indicate whether this msi entries are used by a device or not. So when unplug a pci device, we should reset nvec to zero. Signed-off-by: Liu Ping Fan --- hw/ppc/spapr_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr_pci.c

[Qemu-devel] Configure virtio-scsi options via libvirt

2014-05-06 Thread Mike Perez
Hi everyone, I would like be able to configure virtio-scsi options num_queues, max_sectors, and cmd_per_lun via libvirt. Are there any plans to have this support? -- Mike Perez

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-06 Thread Paolo Bonzini
Il 06/05/2014 22:01, Chris Friesen ha scritto: It seems like the main problem is that we loop over all the queues, calling virtio_pci_set_host_notifier_internal() on each of them. That in turn calls memory_region_add_eventfd(), which calls memory_region_transaction_commit(), which scans over al

Re: [Qemu-devel] [PATCH v3] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Paolo Bonzini
Il 07/05/2014 00:18, Max Reitz ha scritto: The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even compiled in in this case. However, there may be implementations which support the latter but not the former (e.g., NFSv4

[Qemu-devel] [PATCH 4/6] spapr: move interrupt allocator to xics

2014-05-06 Thread Alexey Kardashevskiy
The current allocator returns IRQ numbers from a pool and does not support IRQs reuse in any form as it did not keep track of what it previously returned, it only keeps the last returned IRQ. Some use cases such as PCI hot(un)plug may require IRQ release and reallocation. This moves an allocator f

Re: [Qemu-devel] [PATCH] target-i386: fix handling of ZF in btx instructions

2014-05-06 Thread Paolo Bonzini
Il 06/05/2014 15:33, Dmitry Poletaev ha scritto: Eflags for bt/bts/btr/btc instructions compute as for shift(SAR) instructions. According to Intel A2 manual, for btx instructions zf is unaffected under any condition, but for SAR group, when evaluate eflags, we compute zf. This patch makes zf=

Re: [Qemu-devel] [PATCH v1 22/22] target-arm: A64: Register VBAR_EL3

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/helper.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/target-arm/helper.c b/target-arm/helper.c > index 6e3f5fa..b6dac25 100644 > --- a/t

Re: [Qemu-devel] [PATCH v1 21/22] target-arm: A64: Register VBAR_EL2

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/helper.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/target-arm/helper.c b/target-arm/helper.c > index 2406058..6e3f5fa 100644 > --- a/t

Re: [Qemu-devel] [PATCH v1 20/22] target-arm: Make vbar_write writeback to any CPREG

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target-arm/helper.c b/target-arm/helper.c > index 65daeaf..2406058 10064

Re: [Qemu-devel] [PATCH v1 18/22] target-arm: A64: Generalize update_spsel for the various ELs

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Peter Crosthwaite > --- > target-arm/internals.h | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/target-arm/internals.h

Re: [Qemu-devel] [PATCH v1 17/22] target-arm: A64: Generalize ERET to various ELs

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Adds support for ERET to Aarch64 EL2 and 3. > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/op_helper.c | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/target-

Re: [Qemu-devel] [PATCH v3 14/14] qmp: Don't use error_is_set() to suppress additional errors

2014-05-06 Thread Markus Armbruster
Eric Blake writes: > On 05/02/2014 05:26 AM, Markus Armbruster wrote: >> Using error_is_set(errp) that way can sweep programming errors under >> the carpet when we get called incorrectly with an error set. >> >> encrypted_bdrv_it() does it, because there's no way to make >> bdrv_iterate() break

Re: [Qemu-devel] [PATCH v1 14/22] target-arm: Register EL3 versions of ELR and SPSR

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias Same as last patch, Otherwise: Reviewed-by: Peter Crosthwaite > --- > target-arm/helper.c | 16 > 1 file changed, 16 insertions(+) > > diff --git a/tar

Re: [Qemu-devel] [PATCH v1 15/22] target-arm: A64: Forbid ERET to increase the EL

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Peter Crosthwaite > --- > target-arm/op_helper.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/target-arm/op_helper.c b/target-arm/op_helper.

Re: [Qemu-devel] [PATCH v1 16/22] target-arm: A64: Forbid ERET to unimplemented ELs

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Check for EL2 support before returning to it. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Peter Crosthwaite > --- > target-arm/op_helper.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletio

[Qemu-devel] [PATCH 0/6] move interrupts from spapr to xics

2014-05-06 Thread Alexey Kardashevskiy
The existing interrupt allocation scheme in SPAPR assumes that interrupts are allocated at the start time, continously and the config will not change. However, there are cases when this is not going to work such as: 1. migration - we will have to have an ability to choose interrupt numbers for dev

[Qemu-devel] [PATCH 1/6] xics: add flags for interrupts

2014-05-06 Thread Alexey Kardashevskiy
The existing interrupt allocation scheme in SPAPR assumes that interrupts are allocated at the start time, continously and the config will not change. However, there are cases when this is not going to work such as: 1. migration - we will have to have an ability to choose interrupt numbers for dev

[Qemu-devel] [PATCH 6/6] xics: implement xics_ics_free()

2014-05-06 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy --- hw/intc/xics.c| 24 include/hw/ppc/xics.h | 1 + trace-events | 2 ++ 3 files changed, 27 insertions(+) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index faf304c..2316519 100644 --- a/hw/intc/xics.c +++ b/hw/int

[Qemu-devel] [PATCH 3/6] xics: disable flags reset on xics reset

2014-05-06 Thread Alexey Kardashevskiy
Since islsi[] array has been merged into the ICSState struct, we must not reset flags as they tell if the interrupt is in use. Signed-off-by: Alexey Kardashevskiy --- hw/intc/xics.c | 4 +++- hw/intc/xics_kvm.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/intc/

[Qemu-devel] [PATCH 5/6] spapr: remove @next_irq

2014-05-06 Thread Alexey Kardashevskiy
This removes @next_irq from sPAPREnvironment which was used in old IRQ allocator as XICS is now responsible for IRQs and keeps track of allocated IRQs. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 3 +-- include/hw/ppc/spapr.h | 1 - 2 files changed, 1 insertion(+), 3 deletio

Re: [Qemu-devel] [PATCH v1 13/22] target-arm: Register EL2 versions of ELR and SPSR

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/helper.c | 17 + > 1 file changed, 17 insertions(+) > > diff --git a/target-arm/helper.c b/target-arm/helper.c > index ba1830d..8efc340 10

Re: [Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-06 Thread Markus Armbruster
Copying Amit. Chris Friesen writes: > Hi, > > I recently made the unfortunate discovery that virtio-serial-pci is > quite expensive to stop/start during live migration. > > By default we support 32 ports, each of which uses 2 queues. In my > case it takes 2-3ms per queue to disconnect on the so

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Markus Armbruster
Eric Blake writes: > On 05/06/2014 03:18 PM, Eric Blake wrote: > >> ...if you are on a file system where SEEK_HOLE triggers the kernel >> fallback of "entire file is allocated", but where FIEMAP is wired up for >> that file system, would it make sense to have try_seek_hole return -1 in >> situati

Re: [Qemu-devel] [PATCH v1 12/22] target-arm: Add a feature flag for EL3

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Peter Crosthwaite > --- > target-arm/cpu.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/target-arm/cpu.h b/target-arm/cpu.h > index d2e52d4..34e8

Re: [Qemu-devel] [PATCH v1 11/22] target-arm: Add a feature flag for EL2

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Peter Crosthwaite > --- > target-arm/cpu.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/target-arm/cpu.h b/target-arm/cpu.h > index 6e6625b..d2e5

Re: [Qemu-devel] [PATCH v1 10/22] target-arm: A64: Introduce arm64_banked_spsr_index()

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add arm64_banked_spsr_index(), used to map an Exception Level > to an index in the baked_spsr array. > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/helper-a64.c | 5 +++-- > target-arm/internals.h

Re: [Qemu-devel] [RFC PATCH v2 00/16] visitor+BER migration format

2014-05-06 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Tue, May 06, 2014 at 07:58:07PM +0100, Dr. David Alan Gilbert wrote: >> * Markus Armbruster (arm...@redhat.com) wrote: >> > "Michael S. Tsirkin" writes: >> >> >> >> > > OK but for a new machine type, let's default to BER, right? >> > > I see no reason to keep

Re: [Qemu-devel] [PATCH v1 05/22] target-arm: Add arm_el_to_mmu_idx()

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Maps a given EL to the corresponding MMU index. > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/cpu.h | 21 - > target-arm/translate-a64.c | 8 ++-- > 2 files chan

Re: [Qemu-devel] [PATCH v1 01/22] target-arm: A64: Add friendly logging of PSTATE A and I flags

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/translate-a64.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c > inde

Re: [Qemu-devel] [PATCH v1 09/22] target-arm: Add SPSR entries for EL2/HYP and EL3/MON

2014-05-06 Thread Edgar E. Iglesias
On Tue, May 06, 2014 at 04:08:13PM +1000, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" Noticed I missed updating cpu_mode_names[] Queued an update to translate.c for v2. Cheers, Edgar > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/cpu.h | 4 +++- > target-arm/helper.c |

Re: [Qemu-devel] [PATCH v1 02/22] target-arm: Make elr_el1 an array

2014-05-06 Thread Peter Crosthwaite
On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > No functional change. > Prepares for future additions of the EL2 and 3 versions of this reg. > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/cpu.h| 3 ++- > target-arm/helper-a64.c | 4 ++--

Re: [Qemu-devel] [PATCH v1 00/22] target-arm: Preparations for A64 EL2 and 3

2014-05-06 Thread Edgar E. Iglesias
On Tue, May 06, 2014 at 08:58:43AM +0100, Peter Maydell wrote: > On 6 May 2014 07:08, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Hi, > > > > I've been doing some work on modeling parts of EL2 and 3 + some of > > the system-wide virtualization features for ARMv8. A lot is missi

Re: [Qemu-devel] [PATCH] qapi: fix null pointer dereference on invalid parameter

2014-05-06 Thread Eric Blake
On 05/06/2014 06:24 PM, Peter Lieven wrote: > qemu segfaults if it receives an invalid parameter via a > qmp command instead of throwing an error. > > For example: > { "execute": "blockdev-add", > "arguments": { "options" : { "driver": "invalid-driver" } } } > > CC: qemu-sta...@nongnu.org > S

Re: [Qemu-devel] [PATCHv3] block: optimize zero writes with bdrv_write_zeroes

2014-05-06 Thread Eric Blake
On 05/06/2014 06:23 PM, Peter Lieven wrote: > this patch tries to optimize zero write requests > by automatically using bdrv_write_zeroes if it is > supported by the format. > > This significantly speeds up file system initialization and > should speed zero write test used to test backend storage

Re: [Qemu-devel] [PATCH v7 for 2.0 4/4] qcow2: Add full image preallocation option

2014-05-06 Thread Hu Tao
Hi, On Thu, Mar 20, 2014 at 02:38:32PM +0100, Kevin Wolf wrote: > Am 17.03.2014 um 07:53 hat Hu Tao geschrieben: > > This adds a preallocation=full mode to qcow2 image creation, which > > creates a non-sparse image file. > > > > Signed-off-by: Hu Tao > > I see that you changed the implementatio

[Qemu-devel] [PATCH v3] qapi: Document optional arguments' backwards compatibility

2014-05-06 Thread Fam Zheng
From: Eric Blake Signed-off-by: Eric Blake Signed-off-by: Fam Zheng --- v3: More text from Eric. Signed-off-by: Fam Zheng --- docs/qapi-code-gen.txt | 32 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-

Re: [Qemu-devel] [PATCH v2] qapi: Document optional arguments' backwards compatibility

2014-05-06 Thread Fam Zheng
On Tue, 05/06 19:30, Eric Blake wrote: > On 05/05/2014 08:05 PM, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > > > --- > > v2: Employ the text suggested by Eric. (Thanks!) > > Since much of it is my wording, it's probably better to credit me as an > author, by adding: > > Signed-off-by: Eri

Re: [Qemu-devel] [PATCH v2] vmdk: Optimize cluster allocation

2014-05-06 Thread Fam Zheng
On Tue, 05/06 10:32, Fam Zheng wrote: > On mounted NFS filesystem, ftruncate is much much slower than doing a > zero write. Changing this significantly speeds up cluster allocation. > > Comparing by converting a cirros image (296M) to VMDK on an NFS mount > point, over 1Gbe LAN: > > $ time qe

Re: [Qemu-devel] [PATCH v2] qapi: Document optional arguments' backwards compatibility

2014-05-06 Thread Eric Blake
On 05/05/2014 08:05 PM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > > --- > v2: Employ the text suggested by Eric. (Thanks!) Since much of it is my wording, it's probably better to credit me as an author, by adding: Signed-off-by: Eric Blake > > Signed-off-by: Fam Zheng > --- > docs/qapi

[Qemu-devel] [PATCH] qapi: fix null pointer dereference on invalid parameter

2014-05-06 Thread Peter Lieven
qemu segfaults if it receives an invalid parameter via a qmp command instead of throwing an error. For example: { "execute": "blockdev-add", "arguments": { "options" : { "driver": "invalid-driver" } } } CC: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven --- qapi/qapi-dealloc-visitor.c |

[Qemu-devel] [PATCHv3] block: optimize zero writes with bdrv_write_zeroes

2014-05-06 Thread Peter Lieven
this patch tries to optimize zero write requests by automatically using bdrv_write_zeroes if it is supported by the format. This significantly speeds up file system initialization and should speed zero write test used to test backend storage performance. I ran the following 2 tests on my internal

Re: [Qemu-devel] [PATCHv3] block: optimize zero writes with bdrv_write_zeroes

2014-05-06 Thread Peter Lieven
please ignore this one, I accidently used an old commit message Am 07.05.2014 02:01, schrieb Peter Lieven: > this patch tries to optimize zero write requests > by automatically using bdrv_write_zeroes if it is > supported by the format. > > this should significantly speed up file system initializa

[Qemu-devel] [PATCHv3] block: optimize zero writes with bdrv_write_zeroes

2014-05-06 Thread Peter Lieven
this patch tries to optimize zero write requests by automatically using bdrv_write_zeroes if it is supported by the format. this should significantly speed up file system initialization and should speed zero write test used to test backend storage performance. the difference can simply be tested

Re: [Qemu-devel] Help needed testing on ppc

2014-05-06 Thread BALATON Zoltan
On Tue, 6 May 2014, Tom Musta wrote: On 5/6/2014 5:03 AM, BALATON Zoltan wrote: Hello, As I got no reply on the qemu-ppc list so far I try here maybe there are some people who read this list but don't follow the ppc one. I don't have the necessary hardware to do the testing needed for the p

[Qemu-devel] [PATCH v3] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Max Reitz
The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even compiled in in this case. However, there may be implementations which support the latter but not the former (e.g., NFSv4.2) as well as vice versa. To cover both cas

Re: [Qemu-devel] [libvirt] [RFC 0/5] Allow object-add on X86CPU subclasses, for CPU model probing

2014-05-06 Thread Eric Blake
On 05/06/2014 02:19 PM, Eduardo Habkost wrote: >> IMHO, libvirt side should take advantage of information QEMU already >> provides. >> > > Current API requires re-running QEMU to query the information. This > series allows it to be run with the "-machine none" QEMU instance that > is already run

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Max Reitz
On 06.05.2014 23:47, Eric Blake wrote: On 05/06/2014 03:18 PM, Eric Blake wrote: ...if you are on a file system where SEEK_HOLE triggers the kernel fallback of "entire file is allocated", but where FIEMAP is wired up for that file system, would it make sense to have try_seek_hole return -1 in s

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Eric Blake
On 05/06/2014 03:18 PM, Eric Blake wrote: > ...if you are on a file system where SEEK_HOLE triggers the kernel > fallback of "entire file is allocated", but where FIEMAP is wired up for > that file system, would it make sense to have try_seek_hole return -1 in > situations where lseek(s->fd, 0, SE

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Max Reitz
On 06.05.2014 23:18, Eric Blake wrote: On 05/06/2014 01:00 PM, Max Reitz wrote: The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even compiled in in this case. However, there may be implementations which support the

[Qemu-devel] [PATCH v2 2/4] check-qdict: Add test for qdict_join()

2014-05-06 Thread Max Reitz
Add some test cases for qdict_join(). Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Benoit Canet --- tests/check-qdict.c | 87 + 1 file changed, 87 insertions(+) diff --git a/tests/check-qdict.c b/tests/check-qdict.c index 2a

Re: [Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Eric Blake
On 05/06/2014 01:00 PM, Max Reitz wrote: > The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if > FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even > compiled in in this case. However, there may be implementations which > support the latter but not the former (e.g., N

Re: [Qemu-devel] [PATCH] block: Fix open flags with BDRV_O_SNAPSHOT

2014-05-06 Thread Max Reitz
On 06.05.2014 13:10, Jan Kiszka wrote: On 2014-05-06 12:19, Kevin Wolf wrote: The immediately visible effect of this patch is that it fixes committing a temporary snapshot to its backing file. Previously, it would fail with a "permission denied" error because bdrv_inherited_flags() forced the ba

Re: [Qemu-devel] [PATCH] block: Fix open flags with BDRV_O_SNAPSHOT

2014-05-06 Thread Max Reitz
On 06.05.2014 12:19, Kevin Wolf wrote: The immediately visible effect of this patch is that it fixes committing a temporary snapshot to its backing file. Previously, it would fail with a "permission denied" error because bdrv_inherited_flags() forced the backing file to be read-only, ignoring the

Re: [Qemu-devel] [RFC 0/5] Allow object-add on X86CPU subclasses, for CPU model probing

2014-05-06 Thread Andreas Färber
Am 06.05.2014 22:19, schrieb Eduardo Habkost: > On Tue, May 06, 2014 at 10:01:11PM +0200, Igor Mammedov wrote: >> On Tue, 6 May 2014 11:42:56 -0300 >> Eduardo Habkost wrote: >>> On Tue, May 06, 2014 at 09:22:38AM +0200, Igor Mammedov wrote: On Fri, 2 May 2014 11:43:05 -0300 Eduardo Habko

[Qemu-devel] [PATCH v2 4/4] iotests: Add test for the JSON protocol

2014-05-06 Thread Max Reitz
Add a test for the JSON protocol driver. Signed-off-by: Max Reitz --- tests/qemu-iotests/089 | 132 + tests/qemu-iotests/089.out | 49 + tests/qemu-iotests/group | 1 + 3 files changed, 182 insertions(+) create mode 100755 tes

Re: [Qemu-devel] [PATCH v2 0/4] block: Allow JSON filenames

2014-05-06 Thread Eric Blake
On 05/06/2014 02:29 PM, Max Reitz wrote: > This series acts as some kind of alternative or v5 to the "block/json: > Add JSON protocol driver" series. It makes bdrv_open() parse filenames > prefixed by "json:" as JSON objects (discarding the prefix beforehand) > and then use the resulting QDict as t

[Qemu-devel] [PATCH v2 3/4] block: Allow JSON filenames

2014-05-06 Thread Max Reitz
If the filename given to bdrv_open() is prefixed with "json:", parse the rest as a JSON object and merge the result into the options QDict. If there are conflicts, report one of them to the user and abort. Signed-off-by: Max Reitz --- block.c | 47 +++

Re: [Qemu-devel] [PATCH 3/4] block: Allow JSON filenames

2014-05-06 Thread Max Reitz
On 06.05.2014 22:28, Eric Blake wrote: On 05/06/2014 02:00 PM, Max Reitz wrote: -drive file='json:{"driver":"qcow2","file.filename":"foo","backing.file.driver":"raw"}',backing.file.driver=qcow2 looks like it specifies conflicting backing.file.driver options. Passing true means that qdict_join

[Qemu-devel] [PATCH v2 0/4] block: Allow JSON filenames

2014-05-06 Thread Max Reitz
This series acts as some kind of alternative or v5 to the "block/json: Add JSON protocol driver" series. It makes bdrv_open() parse filenames prefixed by "json:" as JSON objects (discarding the prefix beforehand) and then use the resulting QDict as the options for the block device to be opened with

[Qemu-devel] [PATCH v2 1/4] qdict: Add qdict_join()

2014-05-06 Thread Max Reitz
This function joins two QDicts by absorbing one into the other. Signed-off-by: Max Reitz Reviewed-by: Benoit Canet Reviewed-by: Eric Blake --- include/qapi/qmp/qdict.h | 3 +++ qobject/qdict.c | 32 2 files changed, 35 insertions(+) diff --git a/incl

Re: [Qemu-devel] [PATCH 3/4] block: Allow JSON filenames

2014-05-06 Thread Eric Blake
On 05/06/2014 02:00 PM, Max Reitz wrote: >> >> -drive >> file='json:{"driver":"qcow2","file.filename":"foo","backing.file.driver":"raw"}',backing.file.driver=qcow2 >> >> >> looks like it specifies conflicting backing.file.driver options. >> Passing true means that qdict_join silently overwrites th

Re: [Qemu-devel] [RFC PATCH v2 00/16] visitor+BER migration format

2014-05-06 Thread Michael S. Tsirkin
On Tue, May 06, 2014 at 07:58:07PM +0100, Dr. David Alan Gilbert wrote: > * Markus Armbruster (arm...@redhat.com) wrote: > > "Michael S. Tsirkin" writes: > > > > > > OK but for a new machine type, let's default to BER, right? > > > I see no reason to keep supporting when non-BER when -M specifi

Re: [Qemu-devel] [PATCH 3/4] block: Allow JSON filenames

2014-05-06 Thread Max Reitz
On 06.05.2014 21:57, Eric Blake wrote: On 05/06/2014 01:30 PM, Max Reitz wrote: If the filename given to bdrv_open() is prefixed with "json:", parse the rest as a JSON object and use the result as the options QDict. Signed-off-by: Max Reitz --- block.c | 41 ++

Re: [Qemu-devel] [RFC 0/5] Allow object-add on X86CPU subclasses, for CPU model probing

2014-05-06 Thread Eduardo Habkost
On Tue, May 06, 2014 at 10:01:11PM +0200, Igor Mammedov wrote: > On Tue, 6 May 2014 11:42:56 -0300 > Eduardo Habkost wrote: > > > On Tue, May 06, 2014 at 09:22:38AM +0200, Igor Mammedov wrote: > > > On Fri, 2 May 2014 11:43:05 -0300 > > > Eduardo Habkost wrote: > > > > > > > On Fri, May 02, 201

Re: [Qemu-devel] [PATCH 4/4] iotests: Add test for the JSON protocol

2014-05-06 Thread Max Reitz
On 06.05.2014 22:04, Eric Blake wrote: On 05/06/2014 01:30 PM, Max Reitz wrote: Add a test for the JSON protocol driver. Signed-off-by: Max Reitz Reviewed-by: Benoit Canet --- +echo +echo "=== Testing qemu-img info output ===" +echo + +# This should output information about the image itsel

Re: [Qemu-devel] [PATCH 4/4] iotests: Add test for the JSON protocol

2014-05-06 Thread Eric Blake
On 05/06/2014 01:30 PM, Max Reitz wrote: > Add a test for the JSON protocol driver. > > Signed-off-by: Max Reitz > Reviewed-by: Benoit Canet > --- > +echo > +echo "=== Testing qemu-img info output ===" > +echo > + > +# This should output information about the image itself, not about the JSON >

[Qemu-devel] virtio-serial-pci very expensive during live migration

2014-05-06 Thread Chris Friesen
Hi, I recently made the unfortunate discovery that virtio-serial-pci is quite expensive to stop/start during live migration. By default we support 32 ports, each of which uses 2 queues. In my case it takes 2-3ms per queue to disconnect on the source host, and another 2-3ms per queue to conn

Re: [Qemu-devel] [RFC 0/5] Allow object-add on X86CPU subclasses, for CPU model probing

2014-05-06 Thread Igor Mammedov
On Tue, 6 May 2014 11:42:56 -0300 Eduardo Habkost wrote: > On Tue, May 06, 2014 at 09:22:38AM +0200, Igor Mammedov wrote: > > On Fri, 2 May 2014 11:43:05 -0300 > > Eduardo Habkost wrote: > > > > > On Fri, May 02, 2014 at 03:45:03PM +0200, Igor Mammedov wrote: > > > > On Wed, 30 Apr 2014 17:29:2

Re: [Qemu-devel] [PATCH 3/4] block: Allow JSON filenames

2014-05-06 Thread Eric Blake
On 05/06/2014 01:30 PM, Max Reitz wrote: > If the filename given to bdrv_open() is prefixed with "json:", parse the > rest as a JSON object and use the result as the options QDict. > > Signed-off-by: Max Reitz > --- > block.c | 41 + > 1 file changed, 41 i

Re: [Qemu-devel] [PATCH] kvmclock: Ensure time in migration never goes backward

2014-05-06 Thread Marcin Gibuła
Yes, and it isn't. Any ideas why it's not? This patch really just uses the guest visible kvmclock time rather than the host view of it on migration. There is definitely something very broken on the host's side since it does return a smaller time than the guest exposed interface indicates. Don't

Re: [Qemu-devel] [PATCH] block: Fix bdrv_is_allocated() for short backing files

2014-05-06 Thread Max Reitz
On 06.05.2014 15:30, Kevin Wolf wrote: bdrv_is_allocated() shouldn't return true for sectors that are unallocated, but after the end of a short backing file, even though such sectors are (correctly) marked as containing zeros. Signed-off-by: Kevin Wolf --- block.c | 8 +---

Re: [Qemu-devel] qemu leaving unix sockets behind after VM is shut down

2014-05-06 Thread Chris Friesen
On 05/06/2014 07:39 AM, Stefan Hajnoczi wrote: On Tue, Apr 01, 2014 at 02:34:58PM -0600, Chris Friesen wrote: When running qemu with something like this -device virtio-serial \ -chardev socket,path=/tmp/foo,server,nowait,id=foo \ -device virtserialport,chardev=foo,name=host.port.0 the VM start

[Qemu-devel] [PATCH 0/4] block: Allow JSON filenames

2014-05-06 Thread Max Reitz
This series acts as some kind of alternative or v4 to the "block/json: Add JSON protocol driver" series. It makes bdrv_open() parse filenames prefixed by "json:" as JSON objects (discarding the prefix beforehand) and then use the resulting QDict as the options for the block device to be opened with

[Qemu-devel] [PATCH 2/4] check-qdict: Add test for qdict_join()

2014-05-06 Thread Max Reitz
Add some test cases for qdict_join(). Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Benoit Canet --- tests/check-qdict.c | 87 + 1 file changed, 87 insertions(+) diff --git a/tests/check-qdict.c b/tests/check-qdict.c index 2a

[Qemu-devel] [PATCH 4/4] iotests: Add test for the JSON protocol

2014-05-06 Thread Max Reitz
Add a test for the JSON protocol driver. Signed-off-by: Max Reitz Reviewed-by: Benoit Canet --- tests/qemu-iotests/089 | 123 + tests/qemu-iotests/089.out | 39 ++ tests/qemu-iotests/group | 1 + 3 files changed, 163 insertions(+)

[Qemu-devel] [PATCH 3/4] block: Allow JSON filenames

2014-05-06 Thread Max Reitz
If the filename given to bdrv_open() is prefixed with "json:", parse the rest as a JSON object and use the result as the options QDict. Signed-off-by: Max Reitz --- block.c | 41 + 1 file changed, 41 insertions(+) diff --git a/block.c b/block.c index b749

[Qemu-devel] [PATCH 1/4] qdict: Add qdict_join()

2014-05-06 Thread Max Reitz
This function joins two QDicts by absorbing one into the other. Signed-off-by: Max Reitz Reviewed-by: Benoit Canet Reviewed-by: Eric Blake --- include/qapi/qmp/qdict.h | 3 +++ qobject/qdict.c | 32 2 files changed, 35 insertions(+) diff --git a/incl

Re: [Qemu-devel] [PATCH] Update QEMU checkpatch.pl to current linux version

2014-05-06 Thread Peter Maydell
On 6 May 2014 19:59, Mike Day wrote: > On Tue, May 6, 2014 at 2:28 PM, Peter Maydell > wrote: >> A couple of ideas about how we could approach this: >> (1) make a commit which is simply copying the kernel's 0.32 >> into our repo; then follow that with a series of commits which >> re

[Qemu-devel] [PATCH v2] block/raw-posix: Try both FIEMAP and SEEK_HOLE

2014-05-06 Thread Max Reitz
The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even compiled in in this case. However, there may be implementations which support the latter but not the former (e.g., NFSv4.2) as well as vice versa. To cover both cas

Re: [Qemu-devel] [PATCH] Update QEMU checkpatch.pl to current linux version

2014-05-06 Thread Mike Day
On Tue, May 6, 2014 at 2:28 PM, Peter Maydell wrote: > I think this is going to be difficult to review, to say the least. > > Where does your patch come from? Is the kernel's checkpatch.pl > just a single commit between 0.31 and 0.32 (surely not) or > a series of fixes? Yes, this is today's versi

Re: [Qemu-devel] [RFC PATCH v2 00/16] visitor+BER migration format

2014-05-06 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Michael S. Tsirkin" writes: > > OK but for a new machine type, let's default to BER, right? > > I see no reason to keep supporting when non-BER when -M specifies 2.1 > > compatibility, do you? > > I fail to see the relation between machine type

Re: [Qemu-devel] [RFC PATCH V4 1/6] linux-headers: Update KVM headers from linux-3.16-rc1

2014-05-06 Thread Peter Maydell
On 5 May 2014 09:57, Pranavkumar Sawargaonkar wrote: > Syncup KVM related linux headers from linux-3.16-rc1 > > Signed-off-by: Pranavkumar Sawargaonkar > Signed-off-by: Anup Patel > --- > linux-headers/asm-arm/kvm.h | 10 +++-- > linux-headers/asm-arm64/kvm.h | 10 +++-- > linux-headers/l

Re: [Qemu-devel] [PATCH v3 3/4] target-ppc: ppc can be either endian

2014-05-06 Thread Peter Maydell
On 5 May 2014 09:07, Greg Kurz wrote: > POWER7, POWER7+ and POWER8 families use the ILE bit of the LPCR > special purpose register to decide the endianness to use when > entering interrupt handlers. When running a Linux guest, this > provides a hint on the endianness used by the kernel. From a > Q

Re: [Qemu-devel] [PATCH] block/raw-posix: Fall back to SEEK_HOLE/SEEK_DATA

2014-05-06 Thread Eric Blake
On 05/06/2014 11:46 AM, Max Reitz wrote: > > Okay, then I'll put the functionality in own functions and reverse the > order in v2 while keeping the fallback idea, as I think there may exist > systems where the reverse of what this patch tries to fix is true: > SEEK_HOLE/SEEK_DATA is not supported

Re: [Qemu-devel] [PATCH] Update QEMU checkpatch.pl to current linux version

2014-05-06 Thread Peter Maydell
On 6 May 2014 19:16, Mike Day wrote: > This updates scripts/checkpatch.pl to version 0.32. Also, > forward-ported the QEMU checks for no tabs and correct capitalization > of "QEMU." Finally, make --no-tree the default option since this will > be used with Qemu. > > Signed-off-by: Mike Day > --- >

Re: [Qemu-devel] [PATCH v6 2/2] pic: use emulated lapic version 0x14 on pc machines >= 2.1

2014-05-06 Thread Gabriel L. Somlo
Michael, Once you decide it's time to pick this up and apply it, the subject line should be: s/^pic:/apic:/ Please let me know if you'd rather have me send out a v7 for this as opposed to you being able to fix it when you apply. Thanks much, --Gabriel On Tue, May 06, 2014 at 11:17:25AM -0400,

Re: [Qemu-devel] [PATCH v3 00/12] block/json: Add JSON protocol driver

2014-05-06 Thread Max Reitz
On 06.05.2014 10:10, Stefan Hajnoczi wrote: On Mon, May 05, 2014 at 06:19:07PM +0200, Max Reitz wrote: On 10.04.2014 20:43, Max Reitz wrote: This series adds a passthrough JSON protocol block driver. Its filenames are JSON objects prefixed by "json:". The objects are used as options for opening

Re: [Qemu-devel] [PATCH] block/raw-posix: Fall back to SEEK_HOLE/SEEK_DATA

2014-05-06 Thread Max Reitz
On 06.05.2014 14:27, Eric Blake wrote: On 05/06/2014 05:49 AM, Stefan Hajnoczi wrote: On Mon, May 05, 2014 at 10:01:39PM +0200, Max Reitz wrote: The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even compiled in in t

Re: [Qemu-devel] [PATCH] block/raw-posix: Fall back to SEEK_HOLE/SEEK_DATA

2014-05-06 Thread Max Reitz
On 06.05.2014 13:49, Stefan Hajnoczi wrote: On Mon, May 05, 2014 at 10:01:39PM +0200, Max Reitz wrote: The current version of raw-posix always uses ioctl(FS_IOC_FIEMAP) if FIEMAP is available; lseek with SEEK_HOLE/SEEK_DATA are not even compiled in in this case. However, there may be implementat

Re: [Qemu-devel] [libvirt] qemu leaving unix sockets behind after VM is shut down

2014-05-06 Thread Eric Blake
On 05/06/2014 08:52 AM, Chris Friesen wrote: > Yes, I am in fact using OpenStack/libvirt, and did eventually track down > libvirt as the code that was cleaning up the monitor socket. > > Even so, I think this sort of change would be valid in qemu itself. qemu > created the files, so really it shou

Re: [Qemu-devel] [PATCH v12 0/4] qapi: Allow modularization of QAPI schema files

2014-05-06 Thread Eric Blake
On 05/06/2014 10:55 AM, Luiz Capitulino wrote: > On Tue, 06 May 2014 08:55:52 -0600 > Eric Blake wrote: > >>> Eventually, we might want to have if/defs and whatnot. But having a master >>> file seems a reasonable first step to me. I actually thought this was the >>> intention. Unless I got it wro

Re: [Qemu-devel] [PATCH v12 0/4] qapi: Allow modularization of QAPI schema files

2014-05-06 Thread Luiz Capitulino
On Tue, 06 May 2014 08:55:52 -0600 Eric Blake wrote: > > Eventually, we might want to have if/defs and whatnot. But having a master > > file seems a reasonable first step to me. I actually thought this was the > > intention. Unless I got it wrong, of course. > > Ifdefs may be a bit much. If we

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-05-06 Thread Stefan Weil
Am 06.05.2014 17:49, schrieb Alex Bligh: > > On 6 May 2014, at 13:38, Paolo Bonzini wrote: > >> Il 06/05/2014 14:23, Stefan Hajnoczi ha scritto: > Signed-off-by: Stanislav Vorobiov > --- > include/glib-compat.h | 19 + > include/qemu-common.h | 12 -- > util/

Re: [Qemu-devel] [PATCH] vl.c: remove init_clocks call from main

2014-05-06 Thread Alex Bligh
On 6 May 2014, at 17:01, Peter Maydell wrote: >> >> So if I read this right, init_clocks() is now only done in vl.c. > > No, you're misreading it -- the commit message says "remove > init_clocks call from main" and you can see from the diffstat > it's removed from vl.c. It's now done only in qe

Re: [Qemu-devel] [PATCH] vl.c: remove init_clocks call from main

2014-05-06 Thread Peter Maydell
On 6 May 2014 16:57, Alex Bligh wrote: > > On 6 May 2014, at 13:59, Kirill Batuzov wrote: > >> Clocks are initialized in qemu_init_main_loop. They are not needed before it. >> Initializing them twice is not only unnecessary but is harmful: it results in >> memory leak and potentially can lead to a

Re: [Qemu-devel] [PATCH] vl.c: remove init_clocks call from main

2014-05-06 Thread Alex Bligh
On 6 May 2014, at 13:59, Kirill Batuzov wrote: > Clocks are initialized in qemu_init_main_loop. They are not needed before it. > Initializing them twice is not only unnecessary but is harmful: it results in > memory leak and potentially can lead to a situation where different parts of > QEMU use

Re: [Qemu-devel] [PATCH v3] glib: fix g_poll early timeout on windows

2014-05-06 Thread Alex Bligh
On 6 May 2014, at 13:38, Paolo Bonzini wrote: > Il 06/05/2014 14:23, Stefan Hajnoczi ha scritto: >>> > Signed-off-by: Stanislav Vorobiov >>> > --- >>> > include/glib-compat.h | 19 + >>> > include/qemu-common.h | 12 -- >>> > util/oslib-win32.c| 112 >>> > +

Re: [Qemu-devel] [PATCH] configure: Put tempfiles in subdir so we can clean up libtool files

2014-05-06 Thread Eric Blake
On 05/06/2014 08:53 AM, Peter Maydell wrote: >> # Create a (secure) tmp directory for tmp files. >> >> { >> tmp=`(umask 077 && mktemp -d "./confXX") 2>/dev/null` && >> test -d "$tmp" >> } || >> { >> tmp=./conf$$-$RANDOM >> (umask 077 && mkdir "$tmp") >> } || as_fn_error $? "cannot cre

[Qemu-devel] [PATCH] qmp: use valid JSON in transaction example

2014-05-06 Thread Eric Blake
Our example should use the correct quotes to match what someone could actually pass over the wire. * qmp-commands.hx: Use correct JSON quotes. Signed-off-by: Eric Blake --- qmp-commands.hx | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands

  1   2   3   >