[Qemu-devel] [PATCH v5 2/3] qapi: add const prefix to 'char *' insider c_type()

2014-05-22 Thread Amos Kong
It's ugly to add const prefix for parameter type by an if statement outside c_type(). This patch adds a parameter to do it. Signed-off-by: Amos Kong Suggested-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Paolo Bonzini Reviewed-by: Markus Armbruster --- scripts/qapi-commands.py

[Qemu-devel] [PATCH v5 3/3] qapi: Suppress unwanted space between type and identifier

2014-05-22 Thread Amos Kong
We always generate a space between type and identifier in parameter and variable declarations, even when idiomatic C style doesn't have a space there. Suppress it. Signed-off-by: Amos Kong --- scripts/qapi-commands.py | 2 +- scripts/qapi.py | 19 +-- 2 files changed,

Re: [Qemu-devel] [PATCH] pci: move dereferencing of root only after verifying valid root pointer.

2014-05-22 Thread Andreas Färber
Am 22.05.2014 13:33, schrieb Saravanakumar: > Move dereferencing of root only after verifying valid root pointer. > > > Signed-off-by: Saravanakumar Looks sensible, but mst can hopefully tweak the overly long subject. No need to write the same into subject and body. That said, Reviewed-by: And

Re: [Qemu-devel] [PATCH] xen: make xen-platform a default device

2014-05-22 Thread Gerd Hoffmann
Hi, > Given that libxl always passes -nodefaults to QEMU, this patch is going > to effectively disable xen_platform_pci for all Xen users. It is not a > good idea. With the patch applied a Xen user would have no way to enable > xen_platform_pci except for passing some magic command line runes vi

Re: [Qemu-devel] [PATCH] pci: move dereferencing of root only after verifying valid root pointer.

2014-05-22 Thread Paolo Bonzini
Il 22/05/2014 13:33, Saravanakumar ha scritto: Move dereferencing of root only after verifying valid root pointer. Signed-off-by: Saravanakumar --- hw/pci/pci.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 22fe5ee..8d6a8d4 10064

Re: [Qemu-devel] [PATCH v2 0/2] dataplane: Enable "scsi=on"

2014-05-22 Thread Stefan Hajnoczi
On Thu, May 22, 2014 at 03:37:10PM +0800, Fam Zheng wrote: > This makes the SG_IO code of non-dataplane available to dataplane, so that > dataplane can use to allow scsi=on. > > v2: > [1/2] Fix scsi=off case and drop VirtIOBlockReq.scsi. > [2/2] Pass conf to virtio_blk_handle_scsi_req. >

Re: [Qemu-devel] [PATCH] xen: make xen-platform a default device

2014-05-22 Thread Paolo Bonzini
Il 22/05/2014 14:11, Stefano Stabellini ha scritto: On Thu, 22 May 2014, Gerd Hoffmann wrote: Patch hooks up the xen platform device to the default device code we have in qemu. Two effects: (1) The device will not be created in case -nodefaults is specified on the command line. (2) A

Re: [Qemu-devel] [PATCH v2 14/23] target-arm: add banked coprocessor register type and macros

2014-05-22 Thread Aggeler Fabian
On 22 May 2014, at 14:18, Sergey Fedorov wrote: > > On 22.05.2014 15:49, Aggeler Fabian wrote: >> On 22 May 2014, at 09:41, Edgar E. Iglesias wrote: >> >>> On Tue, May 13, 2014 at 06:15:59PM +0200, Fabian Aggeler wrote: Banked CP registers can be defined with a A32_BANKED_REG macro which

Re: [Qemu-devel] [PATCH] xen: make xen-platform a default device

2014-05-22 Thread Gerd Hoffmann
On Do, 2014-05-22 at 15:35 +0300, Michael S. Tsirkin wrote: > On Thu, May 22, 2014 at 01:11:28PM +0100, Stefano Stabellini wrote: > > On Thu, 22 May 2014, Gerd Hoffmann wrote: > > > Patch hooks up the xen platform device to the default device code we > > > have in qemu. Two effects: > > > > > >

Re: [Qemu-devel] [libvirt] [PATCHv2] Don't log an internal error when the guest hasn't updated balloon stats

2014-05-22 Thread Ján Tomko
On 05/15/2014 11:19 PM, Eric Blake wrote: > On 05/15/2014 01:22 AM, Ján Tomko wrote: >> If virDomainMemoryStats is called too soon after domain startup, >> QEMU returns: >> "error":{"class":"GenericError","desc":"guest hasn't updated any stats yet"} >> when we try to query balloon stats. >> >> Chec

Re: [Qemu-devel] [PATCH 0/6] Obtain dirty bitmap via VM logging

2014-05-22 Thread ChenLiang
On 2014/5/22 19:21, Sanidhya Kashyap wrote: > On Wed, May 21, 2014 at 12:15 PM, ChenLiang wrote: >> On 2014/5/21 12:56, Sanidhya Kashyap wrote: >> >>> On Wed, May 21, 2014 at 9:43 AM, ChenLiang wrote: Hi, Nice job. We should avoid running migration_thread and bitmap_logging_threa

Re: [Qemu-devel] [PATCH v3 0/2] dataplane: Enable "scsi=on"

2014-05-22 Thread Stefan Hajnoczi
On Thu, May 22, 2014 at 04:22:41PM +0800, Fam Zheng wrote: > This makes the SG_IO code of non-dataplane available to dataplane, so that > dataplane can use to allow scsi=on. > > v3: Change parameter to VirtIOBlock pointer. Undo the swap in code movement. > (Paolo) > > v2: > [1/2] Fix scsi

[Qemu-devel] usb3 regression with qemu 2.0

2014-05-22 Thread Fabio Fantoni
Il 22/05/2014 13:50, Fabio Fantoni ha scritto: Il 22/05/2014 13:04, George Dunlap ha scritto: On 05/22/2014 11:44 AM, Fabio Fantoni wrote: Il 22/05/2014 12:38, George Dunlap ha scritto: On 05/20/2014 04:20 PM, Fabio Fantoni wrote: Il 20/05/2014 17:03, George Dunlap ha scritto: Fabio, If I r

Re: [Qemu-devel] [PATCH] xen: make xen-platform a default device

2014-05-22 Thread Gerd Hoffmann
> > Given that libxl always passes -nodefaults to QEMU, this patch is going > > to effectively disable xen_platform_pci for all Xen users. It is not a > > good idea. With the patch applied a Xen user would have no way to enable > > xen_platform_pci except for passing some magic command line runes

Re: [Qemu-devel] [RFC 1/3] using CPUMASK bitmaps to calculate cpu index

2014-05-22 Thread Igor Mammedov
On Tue, 13 May 2014 18:08:47 +0800 Chen Fan wrote: > instead of seeking the number of CPUs, using CPUMASK bitmaps to > calculate the cpu index, also would be a gread benefit to remove > cpu index. How would it help to remove cpu_index? What if there is only one CPU at start nad there is a need to

Re: [Qemu-devel] [RFC 0/3] cpu: add device_add foo-x86_64-cpu support

2014-05-22 Thread Igor Mammedov
On Thu, 22 May 2014 02:33:45 + "chen.fan.f...@cn.fujitsu.com" wrote: > Hi, >I think if we want to use 'device/device_add' to implement CPU, > we must do some check before qemu_init_vcpu(). how can we to do that? What check exactly would you like to perform? For target-i38 you can look fo

Re: [Qemu-devel] [PATCH] xen: make xen-platform a default device

2014-05-22 Thread Stefano Stabellini
On Thu, 22 May 2014, Gerd Hoffmann wrote: > Hi, > > > Given that libxl always passes -nodefaults to QEMU, this patch is going > > to effectively disable xen_platform_pci for all Xen users. It is not a > > good idea. With the patch applied a Xen user would have no way to enable > > xen_platform_p

[Qemu-devel] [PULL 0/3] QMP queue

2014-05-22 Thread Luiz Capitulino
The following changes since commit c5fa6c86d0765f837515d1c10654c621724a77e0: Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging (2014-05-19 14:10:01 +0100) are available in the git repository at: git://repo.or.cz/qemu/qmp-unstable.git queue/qmp for you to fetch cha

[Qemu-devel] [PULL 3/3] qapi: zero-initialize all QMP command parameters

2014-05-22 Thread Luiz Capitulino
From: Michael Roth In general QMP command parameter values are specified by consumers of the QMP/HMP interface, but in the case of optional parameters these values may be left uninitialized. It is considered a bug for code to make use of optional parameters that have not been flagged as being pr

[Qemu-devel] [PULL 2/3] scripts/qapi.py: Avoid syntax not supported by Python 2.4

2014-05-22 Thread Luiz Capitulino
The Python "except Foo as x" syntax was only introduced in Python 2.6, but we aim to support Python 2.4 and later. Use the old-style "except Foo, x" syntax instead, thus fixing configure/compile on systems with older Python. Reported-by: Peter Maydell Tested-by: Andreas Färber Signed-off-by: Lui

[Qemu-devel] [PULL 1/3] doc: add "setup" to list of migration states

2014-05-22 Thread Luiz Capitulino
From: Peter Feiner On a slow VM (e.g., nested), you see the "setup" state when you query the migration status. Signed-off-by: Peter Feiner Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qapi-schema.json | 2 +- qmp-commands.hx | 2 +- 2 files changed, 2 insertions(+), 2 deletion

Re: [Qemu-devel] [PATCH] xen: make xen-platform a default device

2014-05-22 Thread Stefano Stabellini
On Thu, 22 May 2014, Paolo Bonzini wrote: > Il 22/05/2014 14:11, Stefano Stabellini ha scritto: > > On Thu, 22 May 2014, Gerd Hoffmann wrote: > > > Patch hooks up the xen platform device to the default device code we > > > have in qemu. Two effects: > > > > > > (1) The device will not be create

Re: [Qemu-devel] [RFC 3/3] cpu: add device_add foo-x86_64-cpu support

2014-05-22 Thread Igor Mammedov
On Tue, 13 May 2014 18:08:49 +0800 Chen Fan wrote: > In order to implement adding cpu with device_add, we should make the > check of APIC ID after object_init(), so add UserCreatable complete > method for checking APIC ID availability, and introduce cpu_physid_mask > for saving occupied APIC ID,

[Qemu-devel] [PATCH v3 2/2] qga: Add guest-get-fs-info command

2014-05-22 Thread Tomoki Sekiyama
Add command to get mounted filesystems information in the guest. The returned value contains a list of mountpoint paths and corresponding disks info such as disk bus type, drive address, and the disk controllers' PCI addresses, so that management layer such as libvirt can resolve the disk backends.

[Qemu-devel] [PATCH v3 1/2] qga: Add 'mountpoints' argument to guest-fsfreeze-freeze command

2014-05-22 Thread Tomoki Sekiyama
When an array of mount point paths is specified as 'mountpoints' argument of guest-fsfreeze-freeze, qemu-ga with this patch will only freeze the file systems mounted on specified paths in Linux. This would be useful when the host wants to create partial disk snapshots. Signed-off-by: Tomoki Sekiya

Re: [Qemu-devel] [PATCH] xen: make xen-platform a default device

2014-05-22 Thread Stefano Stabellini
On Thu, 22 May 2014, Gerd Hoffmann wrote: > > > Given that libxl always passes -nodefaults to QEMU, this patch is going > > > to effectively disable xen_platform_pci for all Xen users. It is not a > > > good idea. With the patch applied a Xen user would have no way to enable > > > xen_platform_pci

Re: [Qemu-devel] [PATCH] xen: make xen-platform a default device

2014-05-22 Thread Michael S. Tsirkin
On Thu, May 22, 2014 at 02:53:19PM +0200, Gerd Hoffmann wrote: > On Do, 2014-05-22 at 15:35 +0300, Michael S. Tsirkin wrote: > > On Thu, May 22, 2014 at 01:11:28PM +0100, Stefano Stabellini wrote: > > > On Thu, 22 May 2014, Gerd Hoffmann wrote: > > > > Patch hooks up the xen platform device to the

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Peter Crosthwaite
On Thu, May 22, 2014 at 6:22 AM, Stefan Hajnoczi wrote: > Sometimes an object needs to present a property which is actually on > another object, or it needs to provide an alias name for an existing > property. > > Examples: > a.foo -> b.foo > a.old_name -> a.new_name > > The new object_propert

Re: [Qemu-devel] [PATCH] xen: make xen-platform a default device

2014-05-22 Thread Paolo Bonzini
Il 22/05/2014 15:55, Stefano Stabellini ha scritto: > In fact this code only runs for "-M xenfv". If you use "-M pc", the > xen-platform device has to be added manually. Perhaps it would be worthwhile > to do the opposite, i.e. add the xen-platform device to "-M pc" if not using > -nodefaults.

[Qemu-devel] [PATCH v3 0/2] qga: Add 'mountpoints' argument to guest-fsfreeze-freeze command

2014-05-22 Thread Tomoki Sekiyama
Hi, This is v3 patch for qemu-ga to add argument to specify which filesystems to be frozen by guest-fsfreeze-freeze command. Changes since v2: - new PATCH 2/2 to add a command 'guest-get-fs-info' get mounted filesysmtes information - rebased to latest master (v2: http://lists.gnu.org/archiv

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Andreas Färber
Am 22.05.2014 16:02, schrieb Peter Crosthwaite: > On Thu, May 22, 2014 at 6:22 AM, Stefan Hajnoczi wrote: >> diff --git a/include/qom/object.h b/include/qom/object.h >> index a641dcd..70cbd13 100644 >> --- a/include/qom/object.h >> +++ b/include/qom/object.h >> @@ -1203,6 +1203,24 @@ void object_p

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Igor Mammedov
On Wed, 21 May 2014 22:22:46 +0200 Stefan Hajnoczi wrote: > Sometimes an object needs to present a property which is actually on > another object, or it needs to provide an alias name for an existing > property. > > Examples: > a.foo -> b.foo > a.old_name -> a.new_name this could be used for

Re: [Qemu-devel] [PATCH 4/7] virtio-blk: use aliases instead of duplicate qdev properties

2014-05-22 Thread Peter Crosthwaite
On Thu, May 22, 2014 at 8:32 PM, Andreas Färber wrote: > Am 22.05.2014 12:24, schrieb Stefan Hajnoczi: >> On Thu, May 22, 2014 at 12:18 PM, Andreas Färber wrote: >>> Am 22.05.2014 00:04, schrieb Paolo Bonzini: Il 21/05/2014 22:22, Stefan Hajnoczi ha scritto: > virtio-blk-pci, virtio-blk-

Re: [Qemu-devel] [Xen-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-05-22 Thread Igor Mammedov
On Thu, 22 May 2014 14:25:32 +0300 "Michael S. Tsirkin" wrote: > On Thu, May 22, 2014 at 10:50:10AM +, Chen, Tiejun wrote: > > > -Original Message- > > > From: Gerd Hoffmann [mailto:kra...@redhat.com] > > > Sent: Thursday, May 22, 2014 2:45 PM > > > To: Chen, Tiejun > > > Cc: Anthony

Re: [Qemu-devel] [PATCH v2 8/8] spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB

2014-05-22 Thread Alexey Kardashevskiy
On 05/22/2014 08:57 PM, Alexander Graf wrote: > > On 22.05.14 12:53, Alexey Kardashevskiy wrote: >> On 05/22/2014 05:16 PM, Alexander Graf wrote:> Am 22.05.2014 um 08:53 schrieb Alexey Kardashevskiy : > On 05/21/2014 10:42 PM, Alexey Kardashevskiy wrote: >> On 05/21/2014 08:35 PM

Re: [Qemu-devel] [PULL 00/22] Block patches

2014-05-22 Thread Peter Maydell
On 19 May 2014 15:22, Kevin Wolf wrote: > The following changes since commit 1a381811b495651ddfc2b50d7c8cfaaf375816b0: > > Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-s390-20140515' into > staging (2014-05-15 18:56:08 +0100) > > are available in the git repository at: > > > git://

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Stefan Hajnoczi
On Fri, May 23, 2014 at 12:02:44AM +1000, Peter Crosthwaite wrote: > On Thu, May 22, 2014 at 6:22 AM, Stefan Hajnoczi wrote: > > +void object_property_add_alias(Object *obj, const char *name, > > + Object *target_obj, const char *target_name, > > +

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Stefan Hajnoczi
On Thu, May 22, 2014 at 04:05:46PM +0200, Igor Mammedov wrote: > On Wed, 21 May 2014 22:22:46 +0200 > Stefan Hajnoczi wrote: > > > Sometimes an object needs to present a property which is actually on > > another object, or it needs to provide an alias name for an existing > > property. > > > > E

Re: [Qemu-devel] [RFC 0/3] cpu: add device_add foo-x86_64-cpu support

2014-05-22 Thread Eduardo Habkost
On Thu, May 22, 2014 at 12:49:26PM +0200, Andreas Färber wrote: > Hi, > > Am 22.05.2014 04:33, schrieb chen.fan.f...@cn.fujitsu.com: > >I think if we want to use 'device/device_add' to implement CPU, > > we must do some check before qemu_init_vcpu(). how can we to do that? > > We ran into suc

Re: [Qemu-devel] [PATCH v2 16/23] target-arm: Use arm_current_sctlr to access SCTLR

2014-05-22 Thread Aggeler Fabian
On 22 May 2014, at 09:33, Edgar E. Iglesias wrote: > On Tue, May 13, 2014 at 06:16:01PM +0200, Fabian Aggeler wrote: >> Add SCTLR_EL3 and introduce new function to access correct >> instance of SCTLR in different modes/worlds. > > Hi, > > AArch64 has a couple of insn/regs that do address trans

Re: [Qemu-devel] [PATCH v3] Add remove_boot_device_path() function for hot-unplug device

2014-05-22 Thread Jun Li
On 05/21/2014 04:13 PM, Andreas Färber wrote: Am 19.05.2014 17:57, schrieb Michael S. Tsirkin: On Mon, May 19, 2014 at 05:31:43PM +0200, Andreas Färber wrote: Hi, Am 19.05.2014 17:03, schrieb Jun Li: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This pat

[Qemu-devel] [PATCH 2/7] libcacard: Plug memory leaks around vreader_get_reader_list()

2014-05-22 Thread Markus Armbruster
Spotted by Coverity. Signed-off-by: Markus Armbruster --- libcacard/vcard_emul_nss.c | 4 libcacard/vscclient.c | 1 + 2 files changed, 5 insertions(+) diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index e2b196d..692534c 100644 --- a/libcacard/vcard_emul_nss.c +

[Qemu-devel] [PATCH 6/7] libcacard/vcard_emul_nss: Assert vreaderOpt isn't null

2014-05-22 Thread Markus Armbruster
It's not locally obvious, and Coverity can't see it either. Signed-off-by: Markus Armbruster --- libcacard/vcard_emul_nss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index f98541f..83b89e4 100644 --- a/libcacard/vcard_emul_nss.c +

[Qemu-devel] [PATCH 4/7] libcacard/vreader: Tighten assertion to clarify intent

2014-05-22 Thread Markus Armbruster
Bonus: hushes up Coverity. Signed-off-by: Markus Armbruster --- libcacard/vreader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcacard/vreader.c b/libcacard/vreader.c index c966bb3..3a8f81a 100644 --- a/libcacard/vreader.c +++ b/libcacard/vreader.c @@ -283,7 +283,7 @@

[Qemu-devel] [PATCH 1/7] libcacard/vscclient: Bury some dead code

2014-05-22 Thread Markus Armbruster
Spotted by Coverity. Signed-off-by: Markus Armbruster --- libcacard/vscclient.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index 3477ab3..29f4958 100644 --- a/libcacard/vscclient.c +++ b/libcacard/vscclient.c @@ -502,8

Re: [Qemu-devel] [PULL 00/15] SCSI changes for 2014-05-20

2014-05-22 Thread Peter Maydell
On 20 May 2014 19:14, Paolo Bonzini wrote: > Peter, > > The following changes since commit 6a86dec61921163b6ab582df988416a6f0ca0ed5: > > [PATCH] block/iscsi: bump year in copyright notice (2014-05-05 10:04:30 > +0200) > > are available in the git repository at: > > git://github.com/bonzini/qe

[Qemu-devel] [PATCH] PPC: openpic_kvm: Implement reset

2014-05-22 Thread Alexander Graf
When we trigger a system reset, the in-kernel openpic controller should also get reset. This happens through a write to the GCR.RESET register which is the same mechanism a guest would use to manually reset the device. Signed-off-by: Alexander Graf --- hw/intc/openpic_kvm.c | 15 ++-

Re: [Qemu-devel] [PULL 00/15] SCSI changes for 2014-05-20

2014-05-22 Thread Paolo Bonzini
Il 22/05/2014 17:13, Peter Maydell ha scritto: How did you contrive a Subject claiming 00/15 with only four patches? Anyway, applied :-) I figured it was simpler to reuse the subject for the previous pull request, since the only thing that changed would be the day of the month. Oh wait. Pao

[Qemu-devel] [PATCH 5/7] libcacard: Convert two leftover realloc() to GLib

2014-05-22 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- libcacard/cac.c| 13 ++--- libcacard/vcard_emul_nss.c | 6 +- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/libcacard/cac.c b/libcacard/cac.c index 74ef3e3..05ce8a2 100644 --- a/libcacard/cac.c +++ b/libcacard/cac.c @

[Qemu-devel] [PATCH 3/7] libcacard/vreader: Drop broken recovery from failed assertion

2014-05-22 Thread Markus Armbruster
We suppress some code when we got unexpected status and assertion checking is off: assert(card_status == VCARD_DONE); if (card_status == VCARD_DONE) { int size = MIN(*receive_buf_len, response->b_total_len); memcpy(receive_buf, response->b_data, size); *receive

[Qemu-devel] [PATCH 0/7] libcacard: A few simple fixes and cleanups

2014-05-22 Thread Markus Armbruster
Makes Coverity happy with libcacard/ (for now). Markus Armbruster (7): libcacard/vscclient: Bury some dead code libcacard: Plug memory leaks around vreader_get_reader_list() libcacard/vreader: Drop broken recovery from failed assertion libcacard/vreader: Tighten assertion to clarify intent

[Qemu-devel] [PATCH 7/7] libcacard/vcard_emul_nss: Drop a redundant conditional

2014-05-22 Thread Markus Armbruster
Bailing out when PK11_FindGenericObjects() returns null ensures the loop that follows it executes at least once. The "loop did not execute" test right after it is useless. Drop it. Spotted by Coverity. Signed-off-by: Markus Armbruster --- libcacard/vcard_emul_nss.c | 5 - 1 file changed,

[Qemu-devel] [PATCH v2 0/7] virtio-blk: use alias properties in transport devices

2014-05-22 Thread Stefan Hajnoczi
v2: * Add qdev_alias_all_properties() instead of virtio-blk-specific function [Paolo] * Explain refcount handling in doc comment [Paolo] * Fix "property" duplicate typo [Peter Crosthwaite] * Add "the same object or" to clarify commit description [Igor] Thanks for the feedback on the RFC.

[Qemu-devel] [PATCH v2 2/7] virtio-blk: avoid qdev property definition duplication

2014-05-22 Thread Stefan Hajnoczi
It becomes unwiedly to duplicate all virtio-blk qdev property definitions due to an #ifdef. The C preprocessor syntax makes it a little hard to resolve this cleanly but we can extract the #ifdef and call a macro it defines later. Avoiding duplication is important since it will only get worse when

[Qemu-devel] [PATCH v2 3/7] virtio-blk: move x-data-plane qdev property to virtio-blk.h

2014-05-22 Thread Stefan Hajnoczi
Move the x-data-plane property. Originally it was outside since not every transport may wish to support dataplane. But that makes little sense when we have a dedicated CONFIG_VIRTIO_BLK_DATA_PLANE ifdef already. This move makes it easier to switch to property aliases in the next patch. Signed-o

[Qemu-devel] [PATCH v2 4/7] virtio-blk: use aliases instead of duplicate qdev properties

2014-05-22 Thread Stefan Hajnoczi
virtio-blk-pci, virtio-blk-s390, and virtio-blk-ccw all duplicate the qdev properties of their VirtIOBlock child. This approach does not work well with string or pointer properties since we must be careful about leaking or double-freeing them. Use the QOM alias property to forward property access

[Qemu-devel] [PATCH v2 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Stefan Hajnoczi
Sometimes an object needs to present a property which is actually on another object, or it needs to provide an alias name for an existing property. Examples: a.foo -> b.foo a.old_name -> a.new_name The new object_property_add_alias() API allows objects to alias a property on the same object o

[Qemu-devel] [PATCH v2 7/7] virtio-blk: move qdev properties into virtio-blk.c

2014-05-22 Thread Stefan Hajnoczi
There is no need to make DEFINE_VIRTIO_BLK_PROPERTIES() public. Inline it into virtio-blk.c so it cannot be used by mistake from other source files. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 12 +++- include/hw/virtio/virtio-blk.h | 23 ---

[Qemu-devel] [PATCH v2 5/7] virtio-blk: drop virtio_blk_set_conf()

2014-05-22 Thread Stefan Hajnoczi
This function is no longer used since parent objects now use child aliases to set the VirtIOBlkConf directly. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 6 -- include/hw/virtio/virtio-blk.h | 2 -- 2 files changed, 8 deletions(-) diff --git a/hw/block/virtio-blk.c b

[Qemu-devel] [PATCH v2 6/7] virtio: fix virtio-blk child refcount in transports

2014-05-22 Thread Stefan Hajnoczi
object_initialize() leaves the object with a refcount of 1. object_property_add_child() adds its own reference which is dropped again when the property is deleted. The upshot of this is that we always have a refcount >= 1. Upon hot unplug the virtio-blk child is not finalized! Drop our reference

Re: [Qemu-devel] [PATCH 02/20] block: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:00PM +0200, Kevin Wolf wrote: > @@ -2270,7 +2270,10 @@ int bdrv_commit(BlockDriverState *bs) > } > > total_sectors = length >> BDRV_SECTOR_BITS; > -buf = g_malloc(COMMIT_BUF_SECTORS * BDRV_SECTOR_SIZE); > + > +/* qemu_try_blockalign() for bs will ch

Re: [Qemu-devel] [PATCH 01/20] block: Introduce qemu_try_blockalign()

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:27:59PM +0200, Kevin Wolf wrote: > This function returns NULL instead of aborting when an allocation fails. > > Signed-off-by: Kevin Wolf > --- > block.c | 5 + > include/block/block.h | 1 + > include/qemu/osdep.h | 1 + > util/oslib-posix.c|

Re: [Qemu-devel] [PATCH 03/20] bochs: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:01PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the boch

Re: [Qemu-devel] [PATCH 04/20] cloop: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:02PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the cloo

Re: [Qemu-devel] [PATCH 05/20] curl: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:03PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the curl

Re: [Qemu-devel] [PATCH 06/20] dmg: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:04PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the dmg

Re: [Qemu-devel] [PATCH 07/20] iscsi: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:05PM +0200, Kevin Wolf wrote: > @@ -550,7 +553,11 @@ static BlockDriverAIOCB > *iscsi_aio_ioctl(BlockDriverState *bs, > #else > struct iovec *iov = (struct iovec *)acb->ioh->dxferp; > > -acb->buf = g_malloc(acb->ioh->dxfer_len); > +

Re: [Qemu-devel] [PATCH 08/20] nfs: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:06PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the nfs

Re: [Qemu-devel] [PATCH 09/20] parallels: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:07PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the para

Re: [Qemu-devel] [PATCH 10/20] qcow1: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:08PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the qcow

Re: [Qemu-devel] [PULL 0/9] s390 patches for 2014/05/20

2014-05-22 Thread Peter Maydell
On 20 May 2014 12:44, Cornelia Huck wrote: > Changes from <1400244096-16234-1-git-send-email-cornelia.h...@de.ibm.com>: > > - drop trailing period in subjects > - add "kvm: Fix enable_cap helpers on older gcc" to avoid compile failures > > The following changes since commit c5fa6c86d0765f837515d1c

Re: [Qemu-devel] [PATCH 11/20] qcow2: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:09PM +0200, Kevin Wolf wrote: > diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c > index 8ecbb5b..465ef24 100644 > --- a/block/qcow2-cache.c > +++ b/block/qcow2-cache.c > @@ -53,10 +53,20 @@ Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, int > num_tables)

Re: [Qemu-devel] [PATCH 12/20] qed: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:10PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the qed

Re: [Qemu-devel] [PATCH 14/20] raw-win32: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:12PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the raw-

Re: [Qemu-devel] [PATCH 13/20] raw-posix: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:11PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the raw-

Re: [Qemu-devel] [PATCH 18/20] vmdk: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:16PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the vmdk

Re: [Qemu-devel] [PATCH 17/20] vhdx: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:15PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the vhdx

Re: [Qemu-devel] [PATCH 16/20] vdi: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:14PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the vdi

Re: [Qemu-devel] [PATCH 19/20] vpc: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:17PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the vpc

Re: [Qemu-devel] [PATCH 20/20] mirror: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:18PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the mirr

Re: [Qemu-devel] [PATCH 15/20] rbd: Handle failure for potentially large allocations

2014-05-22 Thread Stefan Hajnoczi
On Wed, May 21, 2014 at 06:28:13PM +0200, Kevin Wolf wrote: > Some code in the block layer makes potentially huge allocations. Failure > is not completely unexpected there, so avoid aborting qemu and handle > out-of-memory situations gracefully. > > This patch addresses the allocations in the rbd

Re: [Qemu-devel] [PATCH 08/20] nfs: Handle failure for potentially large allocations

2014-05-22 Thread ronnie sahlberg
For this case and for the iscsi case, isn't it likely that once this happens the guest is pretty much doomed since I/O to the disk will no longer work ? Should we also change the block layer so that IF *_readv/_writev fails with -ENOMEM then it should try again but break the request up into a chai

Re: [Qemu-devel] [PATCH v5 3/3] qapi: Suppress unwanted space between type and identifier

2014-05-22 Thread Eric Blake
On 05/22/2014 06:41 AM, Amos Kong wrote: > We always generate a space between type and identifier in parameter > and variable declarations, even when idiomatic C style doesn't have > a space there. Suppress it. > > Signed-off-by: Amos Kong > --- > scripts/qapi-commands.py | 2 +- > scripts/qap

Re: [Qemu-devel] [PATCH] docs: clarify that qcow2 file size is not always a cluster multiple

2014-05-22 Thread Eric Blake
On 05/22/2014 03:42 AM, Stefan Hajnoczi wrote: > Normally one would expect that qcow2 image file lengths are multiples of > the cluster size. This is not true in all cases and the spec should > document this so implementers remember to accept such files. > > $ qemu-img create -f qcow2 foo.qcow2 2

Re: [Qemu-devel] [PATCH v20 06/15] block: Add backing_blocker in BlockDriverState

2014-05-22 Thread Jeff Cody
On Wed, May 21, 2014 at 10:37:50PM +0800, Fam Zheng wrote: > On Wed, 05/21 10:24, Jeff Cody wrote: > > On Wed, May 21, 2014 at 04:03:03PM +0200, Stefan Hajnoczi wrote: > > > On Tue, May 20, 2014 at 02:04:31PM +0800, Fam Zheng wrote: > > > > diff --git a/block/mirror.c b/block/mirror.c > > > > index

Re: [Qemu-devel] [PATCH 0/7] libcacard: A few simple fixes and cleanups

2014-05-22 Thread Alon Levy
On 05/22/2014 05:57 PM, Markus Armbruster wrote: > Makes Coverity happy with libcacard/ (for now). > > Markus Armbruster (7): > libcacard/vscclient: Bury some dead code > libcacard: Plug memory leaks around vreader_get_reader_list() > libcacard/vreader: Drop broken recovery from failed asser

Re: [Qemu-devel] [PULL 0/2] audio: two intel-hda fixes.

2014-05-22 Thread Peter Maydell
On 21 May 2014 09:50, Gerd Hoffmann wrote: > Hi, > > $sibject says all. > > please pull, > Gerd > > The following changes since commit c5fa6c86d0765f837515d1c10654c621724a77e0: > > Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging > (2014-05-19 14:10:01 +0100) > > a

Re: [Qemu-devel] [PULL 0/5] purge error_is_set()

2014-05-22 Thread Peter Maydell
On 21 May 2014 11:45, Gerd Hoffmann wrote: > Hi, > > $subject says all. Final chardev pieces (and one socket). > > please pull, > Gerd > > The following changes since commit c5fa6c86d0765f837515d1c10654c621724a77e0: > > Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into stag

Re: [Qemu-devel] [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for

2014-05-22 Thread Eric Blake
[Adding qemu] On 05/22/2014 05:07 AM, Laine Stump wrote: > commit e31b5cf393857 attempted to fix libvirt's > VIR_DOMAIN_EVENT_ID_RTC_CHANGE, which is documentated to always s/documentated/documented/ > provide the new offset of the domain's real time clock from UTC. The > problem was that, in th

Re: [Qemu-devel] [PATCH v1 RFC 6/6] KVM: s390: add cpu model support

2014-05-22 Thread Christian Borntraeger
On 22/05/14 10:53, Paolo Bonzini wrote: > Il 22/05/2014 10:23, Michael Mueller ha scritto: >> On Wed, 21 May 2014 15:22:35 +0200 >> Alexander Graf wrote: >> >> I have seen the slides from Eduardo which he presented during this years >> DevConf in Brno and made my comments according the s390x imple

[Qemu-devel] qemu 2.0, deadlock in block-commit

2014-05-22 Thread Marcin Gibuła
Hi, I've encountered deadlock in qemu during some stress testing. The test is making snapshots, committing them and constantly quering for block job info. The version of QEMU is 2.0.0 rc3 (backtrace below says rc2, but it's manualy patched to rc3), but there seems to be no changes in block l

Re: [Qemu-devel] [PATCH v2 1/7] iotests: Allow out-of-tree run

2014-05-22 Thread Max Reitz
On 22.05.2014 08:45, Fam Zheng wrote: On Tue, 05/20 22:23, Max Reitz wrote: As out-of-tree builds are preferred for qemu, running the qemu-iotests in that out-of-tree build should be supported as well. To do so, a symbolic link has to be created pointing to the check script in the source directo

Re: [Qemu-devel] qemu 2.0, deadlock in block-commit

2014-05-22 Thread Marcin Gibuła
W dniu 2014-05-22 22:49, Marcin Gibuła pisze: Thread 1 (Thread 0x7f699bfcd900 (LWP 13647)): #0 0x7f6998020286 in ppoll () from /lib64/libc.so.6 #1 0x7f699c1f3d9b in ppoll (__ss=0x0, __timeout=0x0, __nfds=, __fds=) at /usr/include/bits/poll2.h:77 #2 qemu_poll_ns (fds=, nfds=, timeout=)

Re: [Qemu-devel] [PATCH V6 8/8] hw/arm/virt: Use PSCI v0.2 compatible string when KVM or TCG provides it

2014-05-22 Thread Rob Herring
On Thu, May 22, 2014 at 6:18 AM, Pranavkumar Sawargaonkar wrote: > If we have PSCI v0.2 emulation available for KVM ARM/ARM64 or TCG then > we need to provide PSCI v0.2 compatible string via generated DTB. > > Signed-off-by: Pranavkumar Sawargaonkar > Signed-off-by: Anup Patel Reviewed-by: Rob

Re: [Qemu-devel] [PATCH v2 16/23] target-arm: Use arm_current_sctlr to access SCTLR

2014-05-22 Thread Edgar E. Iglesias
On Thu, May 22, 2014 at 02:56:22PM +, Aggeler Fabian wrote: > > On 22 May 2014, at 09:33, Edgar E. Iglesias wrote: > > > On Tue, May 13, 2014 at 06:16:01PM +0200, Fabian Aggeler wrote: > >> Add SCTLR_EL3 and introduce new function to access correct > >> instance of SCTLR in different modes/

Re: [Qemu-devel] qemu 2.0, deadlock in block-commit

2014-05-22 Thread Eric Blake
On 05/22/2014 02:49 PM, Marcin Gibuła wrote: > Hi, > > I've encountered deadlock in qemu during some stress testing. The test > is making snapshots, committing them and constantly quering for block > job info. What is the exact command you used for triggering the block-commit? Was it via direct

[Qemu-devel] [PATCH v3 0/7] iotests: Allow out-of-tree run

2014-05-22 Thread Max Reitz
This series enables qemu-iotests to be run in a build tree outside of the source tree. It also makes the tests use the command for invoking the Python interpreter specified through configure instead of always using "/usr/bin/env python". v3: - Patch 1: - assume in-tree build when run from the

[Qemu-devel] [PATCH v3 2/7] configure: Enable out-of-tree iotests

2014-05-22 Thread Max Reitz
In order to allow out-of-tree iotests, create a symlink for the check script in the build tree. While doing so, also write configured options relevant to the iotests to common.env in the build tree; currently, this is the command to invoke Python 2. Signed-off-by: Max Reitz --- configure | 12 +

[Qemu-devel] [PATCH v3 1/7] iotests: Allow out-of-tree run

2014-05-22 Thread Max Reitz
As out-of-tree builds are preferred for qemu, running the qemu-iotests in that out-of-tree build should be supported as well. To do so, a symbolic link has to be created pointing to the check script in the source directory. That script will check whether it has been run through a symlink, and if so

[Qemu-devel] [PATCH v3 6/7] iotests: Drop Python version from 065's Shebang

2014-05-22 Thread Max Reitz
Test 065 specified python2 to be used in its Shebang; this might not work on systems without a python2 symlink and furthermore it is now counter-productive, as the check script compares the Shebang to "#!/usr/bin/env python" and only uses the Python interpreter selected by configure on an exact mat

<    1   2   3   >