[Qemu-devel] [PATCH v21 14/25] raw-posix.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
raw-posix.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/raw-posix.c | 59 1 files changed, 27 insertions(+), 32 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c

Re: [Qemu-devel] [PATCH] PPC: sPAPR: Only use getpagesize() when we run with kvm

2014-02-21 Thread Alexander Graf
On 21.02.2014, at 11:36, Peter Maydell wrote: > On 21 February 2014 09:41, Alexander Graf wrote: >> We currently size the msi window trap page according to the host's page >> size so that we poke a working hole into a memory slot in case we overlap. >> >> However, this is only ever necessary w

Re: [Qemu-devel] [Qemu-stable] [PATCH 0/3] ARM: three easy patches for coverity-reported issues

2014-02-21 Thread Paolo Bonzini
Il 21/02/2014 08:24, Michael Roth ha scritto: > > You haven't defined breakage; what breakage deserves a change in a > stable release. Some interpret it as regression, some as "any bug", > some as "any crash bug", and so on. Personally I think it's fair to punt that determination to the stable

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/28] target-ppc: Altivec 2.07

2014-02-21 Thread Aneesh Kumar K.V
Alexander Graf writes: > >> The second bug is kind of interesting. If you add ~ 256 disks (using >> virtio-scsi), then it looks as if the firmware crashes. The total >> console output is below. It looks as if "c >" is some kind of prompt. >> qemu spins using 100% of CPU after this. > > How muc

Re: [Qemu-devel] [PATCH] PPC: sPAPR: Only use getpagesize() when we run with kvm

2014-02-21 Thread Peter Maydell
On 21 February 2014 10:49, Alexander Graf wrote: > > On 21.02.2014, at 11:36, Peter Maydell wrote: > >> On 21 February 2014 09:41, Alexander Graf wrote: >>> This fixes a build breakage on win32 hosts. >> >> Unfortunately it doesn't: >> >> cam-vm-266:precise:qemu$ make -C build/w32 >> make: Enter

Re: [Qemu-devel] [PATCH] Use error_is_set() only when necessary

2014-02-21 Thread Kevin Wolf
Am 30.01.2014 um 15:07 hat Markus Armbruster geschrieben: > error_is_set(&var) is the same as var != NULL, but it takes > whole-program analysis to figure that out. Unnecessarily hard for > optimizers, static checkers, and human readers. Dumb it down to > obvious. > > Gets rid of several dozen C

Re: [Qemu-devel] [PATCH v3 5/6] iothread: add "iothread" qdev property type

2014-02-21 Thread Stefan Hajnoczi
On Thu, Feb 20, 2014 at 01:58:06PM +0100, Paolo Bonzini wrote: > >@@ -151,6 +152,8 @@ extern PropertyInfo qdev_prop_arraylen; > > DEFINE_PROP(_n, _s, _f, qdev_prop_vlan, NICPeers) > > #define DEFINE_PROP_DRIVE(_n, _s, _f) \ > > DEFINE_PROP(_n, _s, _f, qdev_prop_drive, BlockDriverState *) >

Re: [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache

2014-02-21 Thread Dr. David Alan Gilbert
* Gonglei (Arei) (arei.gong...@huawei.com) wrote: > Resizing the xbzrle cache during migration causes qemu-crash, > because the main-thread and migration-thread modify the xbzrle > cache size concurrently without lock-protection. > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei > --- > Chan

Re: [Qemu-devel] [PATCH v3 00/20] Improve bdrv_open error messages

2014-02-21 Thread Kevin Wolf
Am 20.02.2014 um 18:29 hat Paolo Bonzini geschrieben: > Il 19/02/2014 15:06, Kevin Wolf ha scritto: > >Thanks, applied to the block branch. > > Conflicts with master... to help you rebasing I put my own version > at block-open-errors on git://github.com/bonzini/qemu.git. Thanks, but rebasing is e

Re: [Qemu-devel] [PATCH 0/2] Use g_new() & friends where that makes obvious sense

2014-02-21 Thread Peter Maydell
On 18 February 2014 15:32, Markus Armbruster wrote: > Quick experiment to gauge the likelihood of conflicts: I reran > coccinelle on v1.7.0, then attempted to merge the result into master. I > got *two* conflicts. I backed out with "git-merge --abort", then merged > with "git-merge -s recursive

Re: [Qemu-devel] [PATCH] PPC: sPAPR: Only use getpagesize() when we run with kvm

2014-02-21 Thread Alexander Graf
> Am 21.02.2014 um 11:56 schrieb Peter Maydell : > >> On 21 February 2014 10:49, Alexander Graf wrote: >> >>> On 21.02.2014, at 11:36, Peter Maydell wrote: >>> On 21 February 2014 09:41, Alexander Graf wrote: This fixes a build breakage on win32 hosts. >>> >>> Unfortunately it do

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/28] target-ppc: Altivec 2.07

2014-02-21 Thread Avik Sil
On 02/21/2014 04:25 PM, Aneesh Kumar K.V wrote: > Alexander Graf writes: > >> >>> The second bug is kind of interesting. If you add ~ 256 disks (using >>> virtio-scsi), then it looks as if the firmware crashes. The total >>> console output is below. It looks as if "c >" is some kind of prompt.

[Qemu-devel] [PATCH v5 0/8] virtio endian-ambivalent target fixes

2014-02-21 Thread Greg Kurz
Hi, This serie introduces helpers to enable virtio devices in a cross-endian environment. As of today, we only have legacy virtio but hopefully this helpers will be reused when we implement virtio 1.0. Some assumptions are made for the legacy implementation: - all guest cpus have the same endiann

[Qemu-devel] [PATCH v5 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio

2014-02-21 Thread Greg Kurz
From: Rusty Russell virtio data structures are defined as "target endian", which assumes that's a fixed value. In fact, that actually means it's platform-specific. The OASIS virtio 1.0 spec will fix this. Meanwhile, create a hook for little endian ppc (and potentially ARM). This is called at

[Qemu-devel] [PATCH v5 2/8] virtio: allow byte swapping for vring and config access

2014-02-21 Thread Greg Kurz
From: Rusty Russell This is based on a simpler patch by Anthony Liguouri, which only handled the vring accesses. We also need some drivers to access these helpers, eg. for data which contains headers. Signed-off-by: Rusty Russell [ ldq_phys() API change, fixed missing virtio_ in vring_used_f

[Qemu-devel] [PATCH v5 3/8] virtio-net: use virtio wrappers to access headers

2014-02-21 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori Signed-off-by: Greg Kurz --- hw/net/virtio-net.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 3626608..34d6b48 100644 --- a/hw

[Qemu-devel] [PATCH v5 6/8] virtio-scsi: use virtio wrappers to access headers

2014-02-21 Thread Greg Kurz
From: Rusty Russell Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori Signed-off-by: Greg Kurz --- hw/scsi/virtio-scsi.c | 33 + 1 file changed, 17 insertions(+), 16 deletions

[Qemu-devel] [PATCH v5 5/8] virtio-blk: use virtio wrappers to access headers

2014-02-21 Thread Greg Kurz
From: Rusty Russell Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori Signed-off-by: Greg Kurz --- hw/block/virtio-blk.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletio

[Qemu-devel] [PATCH v5 4/8] virtio-balloon: use virtio wrappers to access page frame numbers

2014-02-21 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori Signed-off-by: Greg Kurz --- hw/virtio/virtio-balloon.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index a470a0b..5e7f26f 100644

[Qemu-devel] [PATCH v5 8/8] virtio-9p: use virtio wrappers to access headers

2014-02-21 Thread Greg Kurz
Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Greg Kurz --- hw/9pfs/virtio-9p-device.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 15a4983..b3161ec 100644 --- a/

[Qemu-devel] [PATCH v5 7/8] virtio-serial-bus: use virtio wrappers to access headers

2014-02-21 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori Signed-off-by: Greg Kurz --- hw/char/virtio-serial-bus.c | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial

Re: [Qemu-devel] [PATCH v3 5/6] iothread: add "iothread" qdev property type

2014-02-21 Thread Paolo Bonzini
Il 21/02/2014 12:03, Stefan Hajnoczi ha scritto: On Thu, Feb 20, 2014 at 01:58:06PM +0100, Paolo Bonzini wrote: @@ -151,6 +152,8 @@ extern PropertyInfo qdev_prop_arraylen; DEFINE_PROP(_n, _s, _f, qdev_prop_vlan, NICPeers) #define DEFINE_PROP_DRIVE(_n, _s, _f) \ DEFINE_PROP(_n, _s, _f, qd

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target-ppc: Introduce hypervisor call H_GET_TCE

2014-02-21 Thread Greg Kurz
On Fri, 21 Feb 2014 10:29:06 +0100 Laurent Dufour wrote: > This patch introduces the hypervisor call H_GET_TCE which is basically the > reverse of H_PUT_TCE, as defined in the Power Architecture Platform > Requirements (PAPR). > > The hcall H_GET_TCE is required by the kdump kernel which is call

Re: [Qemu-devel] [PATCH v2] tcg/i386: Fix build for systems without working cpuid.h (MacOSX, Win32)

2014-02-21 Thread Peter Maydell
On 20 February 2014 21:08, Richard Henderson wrote: > On 02/20/2014 01:42 PM, Peter Maydell wrote: >> Win32 doesn't have a cpuid.h, and MacOSX may have one but without >> the __cpuid() function we use, which means that commit 9d2eec20 >> broke the build for those platforms. Fix this by tightening

Re: [Qemu-devel] [PATCH v3 00/20] Improve bdrv_open error messages

2014-02-21 Thread Paolo Bonzini
Il 21/02/2014 12:08, Kevin Wolf ha scritto: > Am 20.02.2014 um 18:29 hat Paolo Bonzini geschrieben: >> Il 19/02/2014 15:06, Kevin Wolf ha scritto: >>> Thanks, applied to the block branch. >> >> Conflicts with master... to help you rebasing I put my own version >> at block-open-errors on git://githu

Re: [Qemu-devel] [PATCH v3 00/20] Improve bdrv_open error messages

2014-02-21 Thread Kevin Wolf
Am 21.02.2014 um 12:37 hat Paolo Bonzini geschrieben: > Il 21/02/2014 12:08, Kevin Wolf ha scritto: > > Am 20.02.2014 um 18:29 hat Paolo Bonzini geschrieben: > >> Il 19/02/2014 15:06, Kevin Wolf ha scritto: > >>> Thanks, applied to the block branch. > >> > >> Conflicts with master... to help you re

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/28] target-ppc: Altivec 2.07

2014-02-21 Thread Alexander Graf
On 21.02.2014, at 12:21, Avik Sil wrote: > On 02/21/2014 04:25 PM, Aneesh Kumar K.V wrote: >> Alexander Graf writes: >> >>> The second bug is kind of interesting. If you add ~ 256 disks (using virtio-scsi), then it looks as if the firmware crashes. The total console output is

Re: [Qemu-devel] [PATCH 0/2] Use g_new() & friends where that makes obvious sense

2014-02-21 Thread Markus Armbruster
Peter Maydell writes: > On 18 February 2014 15:32, Markus Armbruster wrote: >> Quick experiment to gauge the likelihood of conflicts: I reran >> coccinelle on v1.7.0, then attempted to merge the result into master. I >> got *two* conflicts. I backed out with "git-merge --abort", then merged >>

Re: [Qemu-devel] [PATCH 0/2] Use g_new() & friends where that makes obvious sense

2014-02-21 Thread Peter Maydell
On 21 February 2014 11:49, Markus Armbruster wrote: > PATCH 1/2 is a bug fix, please apply it directly, or tell me to resubmit > via -trivial. Yes, please send that via trivial. thanks -- PMM

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/28] target-ppc: Altivec 2.07

2014-02-21 Thread Peter Maydell
On 21 February 2014 11:48, Alexander Graf wrote: > Yes, he did. But to apply the update we first need the SLOF > copy on git.qemu.org updated. I can do that if you tell me what the upstream git repo it should be mirroring is. thanks -- PMM

Re: [Qemu-devel] [Qemu-ppc] [V4 PATCH 17/22] target-ppc: Fix and enable fri[mnpz]

2014-02-21 Thread Alexander Graf
On 08.01.2014, at 19:32, Richard Henderson wrote: > On 01/07/2014 08:06 AM, Tom Musta wrote: >> The fri* series of instructions was introduced prior to ISA 2.06 and >> is supported on Power7 and Power8 hardware. However, the instruction >> is still considered illegal in the P7 and P8 QEMU emula

Re: [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache

2014-02-21 Thread Gonglei (Arei)
Hi, > -Original Message- > From: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com] > Sent: Friday, February 21, 2014 7:04 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; Juan Quintela; owass...@redhat.com; > chenliang (T) > Subject: Re: [PATCH v2] XBZRLE: Fix qemu crash when resize

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/28] target-ppc: Altivec 2.07

2014-02-21 Thread Alexander Graf
On 21.02.2014, at 12:53, Peter Maydell wrote: > On 21 February 2014 11:48, Alexander Graf wrote: >> Yes, he did. But to apply the update we first need the SLOF >> copy on git.qemu.org updated. > > I can do that if you tell me what the upstream git repo > it should be mirroring is. That'd be a

Re: [Qemu-devel] [PULL v2 33/37] block: vhdx - add .bdrv_create() support

2014-02-21 Thread Alexander Graf
On 08.11.2013, at 11:12, Stefan Hajnoczi wrote: > From: Jeff Cody > > This adds support for VHDX image creation, for images of type "Fixed" > and "Dynamic". "Differencing" types (i.e., VHDX images with backing > files) are currently not supported. > > Options for image creation include: >

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] spapr_vscsi: Fix REPORT_LUNS handling

2014-02-21 Thread Alexander Graf
On 20.01.2014, at 16:03, Alexander Graf wrote: > > On 12.01.2014, at 23:34, Nathan Whitehorn wrote: > >> Intercept REPORT_LUNS commands addressed either to SRP LUN 0 or the >> well-known >> LUN for REPORT_LUNS commands. This is required to implement the SAM and SPC >> specifications. >> >>

Re: [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache

2014-02-21 Thread Dr. David Alan Gilbert
* Gonglei (Arei) (arei.gong...@huawei.com) wrote: > Hi, > > > +static void XBZRLE_cache_lock(void) > > > +{ > > > +qemu_mutex_lock(&XBZRLE.lock); > > > +} > > > + > > > +static void XBZRLE_cache_unlock(void) > > > +{ > > > +qemu_mutex_unlock(&XBZRLE.lock); > > > +} > > > + > > > > You m

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/28] target-ppc: Altivec 2.07

2014-02-21 Thread Peter Maydell
On 21 February 2014 12:04, Alexander Graf wrote: > > On 21.02.2014, at 12:53, Peter Maydell wrote: > >> On 21 February 2014 11:48, Alexander Graf wrote: >>> Yes, he did. But to apply the update we first need the SLOF >>> copy on git.qemu.org updated. >> >> I can do that if you tell me what the u

[Qemu-devel] [PATCH] qga: Fix memory allocation pasto

2014-02-21 Thread Markus Armbruster
qmp_guest_file_seek() allocates memory for a GuestFileRead object instead of the GuestFileSeek object it actually uses. Harmless, because the GuestFileRead is slightly larger. Signed-off-by: Markus Armbruster --- qga/commands-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

Re: [Qemu-devel] [PATCH 0/2] Use g_new() & friends where that makes obvious sense

2014-02-21 Thread Markus Armbruster
Peter Maydell writes: > On 21 February 2014 11:49, Markus Armbruster wrote: >> PATCH 1/2 is a bug fix, please apply it directly, or tell me to resubmit >> via -trivial. > > Yes, please send that via trivial. Done & thanks

Re: [Qemu-devel] [PATCH v3 5/6] iothread: add "iothread" qdev property type

2014-02-21 Thread Stefan Hajnoczi
On Fri, Feb 21, 2014 at 12:33 PM, Paolo Bonzini wrote: > Il 21/02/2014 12:03, Stefan Hajnoczi ha scritto: > >> On Thu, Feb 20, 2014 at 01:58:06PM +0100, Paolo Bonzini wrote: @@ -151,6 +152,8 @@ extern PropertyInfo qdev_prop_arraylen; DEFINE_PROP(_n, _s, _f, qdev_prop_vlan, NICPe

Re: [Qemu-devel] [Qemu-ppc] [V4 PATCH 17/22] target-ppc: Fix and enable fri[mnpz]

2014-02-21 Thread Tom Musta
On 2/21/2014 5:58 AM, Alexander Graf wrote: > This patch (among others) spawn warnings about constants that are defined > "ul" on 32bit hosts: > > > http://award.ath.cx/results/89-alex/ibook/virt.qemu.build/debug/virt.qemu.build.DEBUG > > Tom, please follow up with a patch fixing all of these

Re: [Qemu-devel] [RFC PATCH] file ram alloc: fail if cannot preallocate

2014-02-21 Thread Alexey Kardashevskiy
On 02/21/2014 07:57 PM, Alexander Graf wrote: > > On 21.02.2014, at 05:57, Alexey Kardashevskiy wrote: > >> On 02/10/2014 05:32 PM, Alexey Kardashevskiy wrote: >>> At the moment if the user asked for huge pages and there is no more huge >>> pages, QEMU prints warning and falls back to the anonym

Re: [Qemu-devel] [PATCH v3 5/6] iothread: add "iothread" qdev property type

2014-02-21 Thread Paolo Bonzini
Il 21/02/2014 13:45, Stefan Hajnoczi ha scritto: This is okay; object_property_add_link reference count takes ownership of the original value of the pointer. Here's an example: static void pxa2xx_pcmcia_initfn(Object *obj) int pxa2xx_pcmcia_attach(void *opaque, PCMCIACardState *card) On one h

Re: [Qemu-devel] [RFC PATCH] file ram alloc: fail if cannot preallocate

2014-02-21 Thread Alexander Graf
On 21.02.2014, at 13:56, Alexey Kardashevskiy wrote: > On 02/21/2014 07:57 PM, Alexander Graf wrote: >> >> On 21.02.2014, at 05:57, Alexey Kardashevskiy wrote: >> >>> On 02/10/2014 05:32 PM, Alexey Kardashevskiy wrote: At the moment if the user asked for huge pages and there is no more h

Re: [Qemu-devel] [PATCH V7 03/11] qapi-script: remember line number in schema parsing

2014-02-21 Thread Markus Armbruster
Wenchao Xia writes: > Thanks for your quick review, I'll respin it next week. Looking forward to it. I think we're very close to merge.

[Qemu-devel] [PATCH 0/4] arm: Avoid shifting left into sign bit

2014-02-21 Thread Peter Maydell
Four simple patches which correct situations where we shift left into the sign bit of a signed integer type, which is undefined behaviour in C. These are by no means the only examples (even restricted to ARM board code; try "grep '1 << 31'"), but I'm vaguely aiming for "get 'make check' to not emit

[Qemu-devel] [PATCH 3/4] hw/ssi/xilinx_spips.c: Avoid shifting left into sign bit

2014-02-21 Thread Peter Maydell
Add missing 'U' suffix to avoid shifting left into sign bit of a signed integer. Signed-off-by: Peter Maydell --- hw/ssi/xilinx_spips.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c index 6a28746..8977243 100644 --- a/hw/ssi

[Qemu-devel] [PATCH 2/4] hw/arm/omap1.c: Avoid shifting left into sign bit

2014-02-21 Thread Peter Maydell
Add missing 'U' suffix to avoid shifting left into sign bit. Signed-off-by: Peter Maydell --- hw/arm/omap1.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c index 47511d2..b433748 100644 --- a/hw/arm/omap1.c +++ b/hw/

[Qemu-devel] [PATCH 4/4] hw/arm/musicpal: Avoid shifting left into sign bit

2014-02-21 Thread Peter Maydell
Add missing 'U' suffixes to avoid shifting left into sign bit of a signed integer. Signed-off-by: Peter Maydell --- hw/arm/musicpal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 50a3b8f..47e3889 100644 --- a/hw/arm/musicpal.

[Qemu-devel] [PATCH 1/4] pxa2xx: Don't shift into sign bit

2014-02-21 Thread Peter Maydell
Add missing 'U' suffixes to avoid potentially shifting into the sign bit of a signed integer. Signed-off-by: Peter Maydell --- hw/arm/pxa2xx.c | 6 +++--- hw/arm/pxa2xx_gpio.c | 2 +- hw/arm/pxa2xx_pic.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/arm/pxa2x

Re: [Qemu-devel] [RFC PATCH] file ram alloc: fail if cannot preallocate

2014-02-21 Thread Alexander Graf
On 21.02.2014, at 14:04, Alexey Kardashevskiy wrote: > On 02/22/2014 12:02 AM, Alexander Graf wrote: >> >> On 21.02.2014, at 13:56, Alexey Kardashevskiy wrote: >> >>> On 02/21/2014 07:57 PM, Alexander Graf wrote: On 21.02.2014, at 05:57, Alexey Kardashevskiy wrote: > On

Re: [Qemu-devel] [RFC PATCH] file ram alloc: fail if cannot preallocate

2014-02-21 Thread Alexey Kardashevskiy
On 02/22/2014 12:02 AM, Alexander Graf wrote: > > On 21.02.2014, at 13:56, Alexey Kardashevskiy wrote: > >> On 02/21/2014 07:57 PM, Alexander Graf wrote: >>> >>> On 21.02.2014, at 05:57, Alexey Kardashevskiy wrote: >>> On 02/10/2014 05:32 PM, Alexey Kardashevskiy wrote: > At the moment

Re: [Qemu-devel] [RFC PATCH] file ram alloc: fail if cannot preallocate

2014-02-21 Thread Alexey Kardashevskiy
On 02/22/2014 12:10 AM, Alexander Graf wrote: > > On 21.02.2014, at 14:04, Alexey Kardashevskiy wrote: > >> On 02/22/2014 12:02 AM, Alexander Graf wrote: >>> >>> On 21.02.2014, at 13:56, Alexey Kardashevskiy wrote: >>> On 02/21/2014 07:57 PM, Alexander Graf wrote: > > On 21.02.2014

Re: [Qemu-devel] [RFC PATCH] file ram alloc: fail if cannot preallocate

2014-02-21 Thread Paolo Bonzini
Il 21/02/2014 14:02, Alexander Graf ha scritto: I think it makes sense to disable any fallback for -mem-path, so that it always only allocates RAM pages from the -mem-path pool. But this is a big change from how it used to work before and thus needs to be properly coordinated. Paolo, Peter, any

Re: [Qemu-devel] [PATCH v3 5/6] iothread: add "iothread" qdev property type

2014-02-21 Thread Stefan Hajnoczi
On Fri, Feb 21, 2014 at 2:01 PM, Paolo Bonzini wrote: > Il 21/02/2014 13:45, Stefan Hajnoczi ha scritto: The rng device examples don't seem to help because there is no way to specify the rng backend via a qdev property (we always create a default backend). I need to be able to spec

Re: [Qemu-devel] CentOS 5.x intermittently fails to boot on QEMU 1.7.0

2014-02-21 Thread Alex Bligh
On 21 Feb 2014, at 04:34, Matt Lupfer wrote: > A git bisect points to this commit as the culprit: > > b1bbfe7 aio / timers: On timer modification, qemu_notify or aio_notify > > which was part of the Aug 2013 timer rewrite. Reverting this hunk in > particular makes the issue go away: > > > @@

Re: [Qemu-devel] [PATCH v3 5/6] iothread: add "iothread" qdev property type

2014-02-21 Thread Paolo Bonzini
Il 21/02/2014 14:25, Stefan Hajnoczi ha scritto: Hrmm...so the command-line is already populating QOM properties and not qdev properties. Then adding DEFINE_PROP_LINK() isn't really necessary. It would only expose it as part of "-device foo,?". But perhaps there are other ways to achieve the

Re: [Qemu-devel] [PATCH v7 0/2] target-ppc: CPU device tree id

2014-02-21 Thread Alexey Kardashevskiy
On 02/11/2014 06:20 PM, Alexey Kardashevskiy wrote: > On 02/02/2014 01:45 AM, Alexey Kardashevskiy wrote: >> This is some cleanup. Please, comment. Thanks! > > Ping? pingping? > > >> >> Changes: >> v7: >> * cleaned up a bit of QOM use >> >> v6: >> * removed kvmppc_fixup_cpu() >> >> v5: >> * c

Re: [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache

2014-02-21 Thread Gonglei (Arei)
> -Original Message- > From: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com] > Sent: Friday, February 21, 2014 8:10 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; Juan Quintela; owass...@redhat.com; > chenliang (T) > Subject: Re: [PATCH v2] XBZRLE: Fix qemu crash when resize the x

Re: [Qemu-devel] [PATCH] qga: Fix memory allocation pasto

2014-02-21 Thread Eric Blake
On 02/21/2014 05:36 AM, Markus Armbruster wrote: > qmp_guest_file_seek() allocates memory for a GuestFileRead object > instead of the GuestFileSeek object it actually uses. Harmless, > because the GuestFileRead is slightly larger. > > Signed-off-by: Markus Armbruster > --- > qga/commands-posix.

Re: [Qemu-devel] [PATCH V7 04/11] qapi script: check correctness of discriminator values in union

2014-02-21 Thread Eric Blake
On 02/21/2014 01:21 AM, Markus Armbruster wrote: >> I'd still rather make it explicit that we KNOW that this branch of the >> union has no additional options: >> >> { 'union': 'FooOptions', >> 'base': 'CommonFooOptions', >> 'discriminator': 'type', >> 'data': { 'plain': {}, >> 'b

Re: [Qemu-devel] [PATCH V7 07/11] qapi script: support pre-defined enum type as discriminator in union

2014-02-21 Thread Eric Blake
On 02/21/2014 01:13 AM, Markus Armbruster wrote: >>> I guess you move this into its own loop because when base types are used >>> before they're defined, or an enum type is used for a discriminator >>> before it's defined, then discriminator_find_enum_define() complains. >>> Correct? >>> >> Exac

[Qemu-devel] [PATCH] hw/ide/ahci.h: Avoid shifting left into sign bit

2014-02-21 Thread Peter Maydell
Add 'U' suffixes to avoid undefined behaviour shifting left into the signed bit of a signed integer type. Clang's sanitizer will warn about this: hw/ide/ahci.c:1210:27: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Signed-off-by: Peter Maydell --- This is the

Re: [Qemu-devel] [PATCH V7 04/11] qapi script: check correctness of discriminator values in union

2014-02-21 Thread Markus Armbruster
Eric Blake writes: > On 02/21/2014 01:21 AM, Markus Armbruster wrote: > >>> I'd still rather make it explicit that we KNOW that this branch of the >>> union has no additional options: >>> >>> { 'union': 'FooOptions', >>> 'base': 'CommonFooOptions', >>> 'discriminator': 'type', >>> 'data': {

Re: [Qemu-devel] [PATCH v3 5/6] iothread: add "iothread" qdev property type

2014-02-21 Thread Stefan Hajnoczi
On Fri, Feb 21, 2014 at 2:29 PM, Paolo Bonzini wrote: > Il 21/02/2014 14:25, Stefan Hajnoczi ha scritto: > >> Hrmm...so the command-line is already populating QOM properties and >> not qdev properties. Then adding DEFINE_PROP_LINK() isn't really >> necessary. > > > It would only expose it as part

Re: [Qemu-devel] [PULL v2 33/37] block: vhdx - add .bdrv_create() support

2014-02-21 Thread Jeff Cody
On Fri, Feb 21, 2014 at 01:06:43PM +0100, Alexander Graf wrote: > > On 08.11.2013, at 11:12, Stefan Hajnoczi wrote: > > > From: Jeff Cody > > > > This adds support for VHDX image creation, for images of type "Fixed" > > and "Dynamic". "Differencing" types (i.e., VHDX images with backing > > f

Re: [Qemu-devel] [PATCH 27/51] piix: fix 32bit pci hole

2014-02-21 Thread Laszlo Ersek
On 02/21/14 09:17, Michael Roth wrote: > From: Gerd Hoffmann > > Make the 32bit pci hole start at end of ram, so all possible address > space is covered. > > We used to try and make addresses aligned so they are easier to cover > with MTRRs, but since they are cosmetic on KVM, this is probably n

Re: [Qemu-devel] QOM vs QAPI for QMP APIs

2014-02-21 Thread Anthony Liguori
On Fri, Feb 21, 2014 at 1:16 AM, Stefan Hajnoczi wrote: > I need to add a QMP API that lists dataplane threads. This is similar > to "query-cpus" where the thread IDs are reported. It allows the client > to bind threads to host CPUs. > > I'm inclined to add a "query-iothreads" QMP command: > *

Re: [Qemu-devel] QOM vs QAPI for QMP APIs

2014-02-21 Thread Stefan Hajnoczi
On Fri, Feb 21, 2014 at 10:16 AM, Stefan Hajnoczi wrote: > Maybe I just need some convincing but it seems that QAPI is the simplest > and cleanest way to define external APIs. > > Disagree? Tell me why :). I'm replying to myself because we had an interesting discussion on IRC. Thanks Paolo, Mar

Re: [Qemu-devel] [PULL 0/6] linux-user updates

2014-02-21 Thread Peter Maydell
On 19 February 2014 10:35, wrote: > From: Riku Voipio > > The following changes since commit 46eef33b89e936ca793e13c4aeea1414e97e8dbb: > > Fix QEMU build on OpenBSD on x86 archs (2014-02-17 11:44:00 +) > > are available in the git repository at: > > git://git.linaro.org/people/riku.voipi

Re: [Qemu-devel] QOM vs QAPI for QMP APIs

2014-02-21 Thread Paolo Bonzini
Il 21/02/2014 15:29, Anthony Liguori ha scritto: On Fri, Feb 21, 2014 at 1:16 AM, Stefan Hajnoczi wrote: I need to add a QMP API that lists dataplane threads. This is similar to "query-cpus" where the thread IDs are reported. It allows the client to bind threads to host CPUs. I'm inclined to

[Qemu-devel] [PATCH] target-ppc: Introduce hypervisor call H_GET_TCE

2014-02-21 Thread Laurent Dufour
This patch introduces the hypervisor call H_GET_TCE which is basically the reverse of H_PUT_TCE, as defined in the Power Architecture Platform Requirements (PAPR). The hcall H_GET_TCE is required by the kdump kernel which is calling it to retrieve the TCE set up by the panicing kernel. Signed-off

Re: [Qemu-devel] [PATCH V7 07/11] qapi script: support pre-defined enum type as discriminator in union

2014-02-21 Thread Markus Armbruster
Eric Blake writes: > On 02/21/2014 01:13 AM, Markus Armbruster wrote: > I guess you move this into its own loop because when base types are used before they're defined, or an enum type is used for a discriminator before it's defined, then discriminator_find_enum_define() complains.

Re: [Qemu-devel] [PULL 0/1] target-i386: Fix I/O bitmap regression

2014-02-21 Thread Peter Maydell
On 19 February 2014 15:47, Kevin Wolf wrote: > The following changes since commit 46eef33b89e936ca793e13c4aeea1414e97e8dbb: > > Fix QEMU build on OpenBSD on x86 archs (2014-02-17 11:44:00 +) > > are available in the git repository at: > > git://repo.or.cz/qemu/kevin.git tags/for-upstream >

Re: [Qemu-devel] [PULL 0/6] Tracing patches

2014-02-21 Thread Peter Maydell
On 19 February 2014 15:45, Stefan Hajnoczi wrote: > Lluis: CCed you since Mohamad's LTTng 2.x patches conflict with your cleanup > series. > > The following changes since commit 46eef33b89e936ca793e13c4aeea1414e97e8dbb: > > Fix QEMU build on OpenBSD on x86 archs (2014-02-17 11:44:00 +) > > a

[Qemu-devel] [PATCH v4 3/6] iothread: add I/O thread object

2014-02-21 Thread Stefan Hajnoczi
This is a stand-in for Michael Roth's QContext. I expect this to be replaced once QContext is completed. The IOThread object is an AioContext event loop thread. This patch adds the concept of multiple event loop threads, allowing users to define them. When SMP guests run on SMP hosts it makes s

[Qemu-devel] [PATCH v4 0/6] dataplane: switch to N:M devices-per-thread model

2014-02-21 Thread Stefan Hajnoczi
v2: * Based off Igor's "-object/object-add support custom location and 2nd stage initialization" series * Dropped dedicated -iothread option in favor of -object * Avoid re-acquiring rfifo in iothread_run() [mdroth] v3: * Fixed "Reliquinish" typo [fam] * Rebased onto qemu.git/master which n

[Qemu-devel] [PATCH v4 5/6] iothread: add "iothread" qdev property type

2014-02-21 Thread Stefan Hajnoczi
Add a "iothread" qdev property type so devices can be hooked up to an IOThread from the comand-line: qemu -object iothread,id=iothread0 \ -device some-device,x-iothread=iothread0 Note that Paolo Bonzini has suggested using QOM links instead. This way the relationship between the object

[Qemu-devel] [PATCH v4 1/6] rfifolock: add recursive FIFO lock

2014-02-21 Thread Stefan Hajnoczi
QemuMutex does not guarantee fairness and cannot be acquired recursively: Fairness means each locker gets a turn and the scheduler cannot cause starvation. Recursive locking is useful for composition, it allows a sequence of locking operations to be invoked atomically by acquiring the lock around

[Qemu-devel] [PATCH v4 6/6] dataplane: replace internal thread with IOThread

2014-02-21 Thread Stefan Hajnoczi
Today virtio-blk dataplane uses a 1:1 device-per-thread model. Now that IOThreads have been introduced we can generalize this to N:M devices per threads. This patch drops thread code from dataplane in favor of running inside an IOThread AioContext. As a bonus we solve the case where a guest keep

[Qemu-devel] [PATCH v4 2/6] aio: add aio_context_acquire() and aio_context_release()

2014-02-21 Thread Stefan Hajnoczi
It can be useful to run an AioContext from a thread which normally does not "own" the AioContext. For example, request draining can be implemented by acquiring the AioContext and looping aio_poll() until all requests have been completed. The following pattern should work: /* Event loop thread

[Qemu-devel] [PATCH v4 4/6] qdev: add get_pointer_and_free() for temporary strings

2014-02-21 Thread Stefan Hajnoczi
get_pointer() assumes the string has unspecified lifetime (at least as long as the object is alive). In some cases we can only produce a temporary string that should be freed when get_pointer() is done. Signed-off-by: Stefan Hajnoczi --- hw/core/qdev-properties-system.c | 14 ++ 1 f

[Qemu-devel] [PATCH 2/2] qmp: add query-iothreads command

2014-02-21 Thread Stefan Hajnoczi
The "query-iothreads" command returns a list of information about iothreads. See the patch for API documentation. Signed-off-by: Stefan Hajnoczi --- iothread.c | 36 qapi-schema.json | 29 + qmp-commands.hx | 39 +++

[Qemu-devel] [PATCH 0/2] dataplane: add query-iothreads QMP command

2014-02-21 Thread Stefan Hajnoczi
This series applies on top of "[PATCH v4 0/6] dataplane: switch to N:M devices-per-thread model". The new "query-iothreads" command allows QMP clients to fetch the thread IDs for dataplane threads. This will allow libvirt and friends to bind dataplane threads. The approach is similar to "query-c

[Qemu-devel] [PATCH 1/2] iothread: stash thread ID away

2014-02-21 Thread Stefan Hajnoczi
Keep the thread ID around so we can report it via QMP. There's only one problem: qemu_get_thread_id() (gettid() wrapper on Linux) must be called from the thread itself. There is no way to get the thread ID outside the thread. This patch uses a condvar to wait for iothread_run() to populate the t

Re: [Qemu-devel] [PULL] Chardev fix

2014-02-21 Thread Peter Maydell
On 20 February 2014 10:00, Amit Shah wrote: > This fix by Gal Hammer has been on list for quite a while, please pull. > > > The following changes since commit > 46eef33b89e936ca793e13c4aeea1414e97e8dbb: > > Fix QEMU build on OpenBSD on x86 archs (2014-02-17 11:44:00 +) > > are available in t

Re: [Qemu-devel] [PULL 0/3] qtest: avoid pidfile and QEMU process leaks

2014-02-21 Thread Peter Maydell
On 19 February 2014 14:50, Stefan Hajnoczi wrote: > Reviewed by Paolo and Markus. Here is the pull request. > > v2: > * Don't call qtest_end() from SIGABRT handler to avoid reentrancy [Paolo] > * Use sigemptyset() to avoid assumption about signal mask [Markus] > * if (fd != -1) close(fd) is no

Re: [Qemu-devel] [PATCH 1/2] iothread: stash thread ID away

2014-02-21 Thread Paolo Bonzini
Il 21/02/2014 15:51, Stefan Hajnoczi ha scritto: Keep the thread ID around so we can report it via QMP. There's only one problem: qemu_get_thread_id() (gettid() wrapper on Linux) must be called from the thread itself. There is no way to get the thread ID outside the thread. This patch uses a c

[Qemu-devel] [PATCH v3 0/6] qemu-img: Support multiple -o options

2014-02-21 Thread Kevin Wolf
Kevin Wolf (6): qemu-option: has_help_option() and is_valid_option_list() qemu-img create: Support multiple -o options qemu-img convert: Support multiple -o options qemu-img amend: Support multiple -o options qemu-img: Allow -o help with incomplete argument list qemu-iotests: Check qemu

[Qemu-devel] [PATCH v3 2/6] qemu-img create: Support multiple -o options

2014-02-21 Thread Kevin Wolf
If you specified multiple -o options for qemu-img create, it would silently ignore all but the last one. This patch fixes the problem. Now multiple -o options has the same meaning as having a single option with all settings in the order of their respective -o options. Signed-off-by: Kevin Wolf -

[Qemu-devel] [PATCH v3 1/6] qemu-option: has_help_option() and is_valid_option_list()

2014-02-21 Thread Kevin Wolf
has_help_option() checks if any help option ('help' or '?') occurs anywhere in an option string, so that things like 'cluster_size=4k,help' are recognised. is_valid_option_list() ensures that the option list doesn't have options with leading commas or trailing unescaped commas. Signed-off-by: Kev

[Qemu-devel] [PATCH v3 4/6] qemu-img amend: Support multiple -o options

2014-02-21 Thread Kevin Wolf
Instead of ignoring all option values but the last one, multiple -o options now have the same meaning as having a single option with all settings in the order of their respective -o options. Signed-off-by: Kevin Wolf --- qemu-img.c | 17 +++-- 1 file changed, 15 insertions(+), 2 dele

[Qemu-devel] [PATCH v3 6/6] qemu-iotests: Check qemu-img command line parsing

2014-02-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/082 | 208 ++ tests/qemu-iotests/082.out | 529 + tests/qemu-iotests/group | 1 + 3 files changed, 738 insertions(+) create mode 100755 tests/qemu-iotests/082 create mode 100644

[Qemu-devel] [PATCH v3 3/6] qemu-img convert: Support multiple -o options

2014-02-21 Thread Kevin Wolf
Instead of ignoring all option values but the last one, multiple -o options now have the same meaning as having a single option with all settings in the order of their respective -o options. Signed-off-by: Kevin Wolf --- qemu-img.c | 34 +- 1 file changed, 25 inse

[Qemu-devel] [PATCH v3 5/6] qemu-img: Allow -o help with incomplete argument list

2014-02-21 Thread Kevin Wolf
This patch allows using 'qemu-img $subcmd -o help' for the create, convert and amend subcommands, without specifying the previously required filename arguments. Note that it's still allowed and meaningful to specify a filename: An invocation like 'qemu-img create -o help sheepdog:foo' will also di

Re: [Qemu-devel] [PATCH 2/2] qmp: add query-iothreads command

2014-02-21 Thread Eric Blake
On 02/21/2014 07:51 AM, Stefan Hajnoczi wrote: > The "query-iothreads" command returns a list of information about > iothreads. See the patch for API documentation. > > Signed-off-by: Stefan Hajnoczi > --- > +++ b/qapi-schema.json > @@ -884,6 +884,35 @@ > { 'command': 'query-cpus', 'returns':

[Qemu-devel] [PATCH] vnc: Fix tight_detect_smooth_image() for lossless case

2014-02-21 Thread Markus Armbruster
VncTight member uint8_t quality is either (uint8_t)-1 for lossless or less than 10 for lossy. tight_detect_smooth_image() first promotes it to int, then compares with -1. Always unequal, so we always execute the lossy code. Reads beyond tight_conf[] and returns crap when quality is actually loss

Re: [Qemu-devel] [PULL 00/30] target-arm queue

2014-02-21 Thread Peter Maydell
On 20 February 2014 11:17, Peter Maydell wrote: > Here's the latest target-arm pull request. There are definitely > more things still in the pipeline so there will be at least one > more before softfreeze... Applied, thanks. -- PMM

Re: [Qemu-devel] [PATCH RFC] char: fix avail_connections init in qemu_chr_open_eventfd()

2014-02-21 Thread David Marchand
On Mon, Feb 17, 2014 at 12:52 PM, David Marchand wrote: > > Since this change has no impact, can it be pulled in current git tree ? > > ping http://patchwork.ozlabs.org/patch/316785/ -- David Marchand

Re: [Qemu-devel] [PATCH] tcg/i386: Fix build for systems without working cpuid.h (MacOSX, Win32)

2014-02-21 Thread Peter Maydell
On 21 February 2014 05:53, Stefan Weil wrote: > One of my hosts runs Ubuntu precise. mingw-w64 works fine here and > includes both 32 bit and 64 compilers and libraries (the -w64 in its > name might be misleading). Maybe you will also need mingw-w64-tools, and > you can also add g++-mingw-w64 (whi

<    1   2   3   4   >