Re: [Qemu-devel] tcmu-runner and QEMU

2014-09-03 Thread Paolo Bonzini
Il 03/09/2014 02:20, Andy Grover ha scritto: >> The qemu-lio tool would live in the QEMU codebase and reuse all the >> infrastructure. For example, it could include a QMP monitor just like >> the one you are adding to qemu-nbd. > > Benoit and I talked a little about QMP on another part of the thr

Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 2.1.1, freeze on 2014-09-03

2014-09-03 Thread Andrey Korolyov
On Wed, Sep 3, 2014 at 10:10 AM, Michael S. Tsirkin wrote: > On Wed, Sep 03, 2014 at 02:17:02AM +0400, Andrey Korolyov wrote: >> On Wed, Sep 3, 2014 at 2:09 AM, Andrey Korolyov wrote: >> > On Wed, Sep 3, 2014 at 1:51 AM, Michael S. Tsirkin wrote: >> >> On Wed, Sep 03, 2014 at 01:29:29AM +0400, A

Re: [Qemu-devel] [PATCH v6 07/27] vl.c: add setter/getter functions for bootindex property

2014-09-03 Thread Gonglei (Arei)
Hi, > -Original Message- > From: Gonglei (Arei) > Sent: Saturday, August 30, 2014 6:00 PM > Subject: [PATCH v6 07/27] vl.c: add setter/getter functions for bootindex > property > > From: Gonglei > > when we remove bootindex form qdev.property to qom.property, > we can use those functio

Re: [Qemu-devel] [PATCH 0/3] build-sys: Exclude empty object files when linking libqemuutil.a

2014-09-03 Thread Paolo Bonzini
Il 03/09/2014 05:44, Fam Zheng ha scritto: > On Mac OS X, ranlib complains on a few empty objects: > > ARlibqemuutil.a > > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: > file: libqemuutil.a(generated-tracers.o) has no symbols > > /App

Re: [Qemu-devel] [PATCH v2] dump: let dump_error return error info to caller

2014-09-03 Thread zhanghailiang
On 2014/9/3 3:56, Eric Blake wrote: On 09/02/2014 02:25 AM, zhanghailiang wrote: The second parameter of dump_error is unused, but one purpose of using this function is to report the error info. Use error_set to return the error info to the caller. Signed-off-by: zhanghailiang --- V2: - Retu

Re: [Qemu-devel] [PATCH] block/iscsi: use 16 byte CDBs only when necessary

2014-09-03 Thread Peter Lieven
> Am 02.09.2014 um 21:30 schrieb Peter Lieven : > > Looking at the code, is it possible that not the guest is causing trouble > here, but > multiwrite_merge code? > > From what I see the only limit it has when merging requests is the number of > IOVs. > > > Any thoughts? > > Mine are: > a)

Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 2.1.1, freeze on 2014-09-03

2014-09-03 Thread Michael S. Tsirkin
On Wed, Sep 03, 2014 at 11:43:54AM +0400, Andrey Korolyov wrote: > On Wed, Sep 3, 2014 at 10:10 AM, Michael S. Tsirkin wrote: > > On Wed, Sep 03, 2014 at 02:17:02AM +0400, Andrey Korolyov wrote: > >> On Wed, Sep 3, 2014 at 2:09 AM, Andrey Korolyov wrote: > >> > On Wed, Sep 3, 2014 at 1:51 AM, Mic

Re: [Qemu-devel] [PATCH v6 07/27] vl.c: add setter/getter functions for bootindex property

2014-09-03 Thread Gerd Hoffmann
Hi, > +void set_bootindex(int32_t *bootindex, Visitor *v, > > + const char *name, Error **errp) > > +{ > > +int32_t boot_index; > > +Error *local_err = NULL; > > + > > +visit_type_int32(v, &boot_index, name, &local_err); > > + > > +if (local_err == NULL) { > > +

Re: [Qemu-devel] [PATCH] vhost_net: initialize acked_features to a safe value during ack

2014-09-03 Thread Michael S. Tsirkin
On Wed, Sep 03, 2014 at 02:25:30PM +0800, Jason Wang wrote: > commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add > vhost_get_features and vhost_ack_features) removes the step that > initializes the acked_features to backend_features. But acked features are set in vhost_ack_features. why

Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 2.1.1, freeze on 2014-09-03

2014-09-03 Thread Andrey Korolyov
On Wed, Sep 3, 2014 at 12:13 PM, Michael S. Tsirkin wrote: > On Wed, Sep 03, 2014 at 11:43:54AM +0400, Andrey Korolyov wrote: >> On Wed, Sep 3, 2014 at 10:10 AM, Michael S. Tsirkin wrote: >> > On Wed, Sep 03, 2014 at 02:17:02AM +0400, Andrey Korolyov wrote: >> >> On Wed, Sep 3, 2014 at 2:09 AM, A

Re: [Qemu-devel] [PATCH v6 07/27] vl.c: add setter/getter functions for bootindex property

2014-09-03 Thread Gonglei (Arei)
> From: Gerd Hoffmann [mailto:kra...@redhat.com] > > Hi, > > > +void set_bootindex(int32_t *bootindex, Visitor *v, > > > + const char *name, Error **errp) > > > +{ > > > +int32_t boot_index; > > > +Error *local_err = NULL; > > > + > > > +visit_type_int32(v, &boot_i

[Qemu-devel] [RFC] vfio: migration to trace points

2014-09-03 Thread Eric Auger
This patch removes all DPRINTF and replace them by trace points. A few DPRINTF used in error cases were transformed into error_report. Signed-off-by: Eric Auger --- - __func__ is removed since trace point name does the same job - HWADDR_PRIx were replaced by PRIx64 Besides those changes format

[Qemu-devel] [PATCH] vhost_net: initialize acked_features to a safe value during ack

2014-09-03 Thread Michael S. Tsirkin
commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add vhost_get_features and vhost_ack_features) removes the step that initializes the acked_features to backend_features. As this field is now uninitialized, vhost initialization will sometimes fail. To fix, initialize field in core vhost cod

Re: [Qemu-devel] [PATCH] vhost_net: initialize acked_features to a safe value during ack

2014-09-03 Thread Michael S. Tsirkin
On Wed, Sep 03, 2014 at 02:25:30PM +0800, Jason Wang wrote: > commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add > vhost_get_features and vhost_ack_features) removes the step that > initializes the acked_features to backend_features. This will result an > unexpected value of acked_features

Re: [Qemu-devel] [PATCH V2] fix: unix sockets created for virtio-serail has insufficient permissions

2014-09-03 Thread Daniel P. Berrange
On Wed, Sep 03, 2014 at 02:18:07PM +0800, Chunyan Liu wrote: > Add umask to _virCommand, allow user to set umask to command. > Set umask(002) to qemu process to overwrite default umask(022) so > that unix sockets created for virtio-serial has expected permissions. > > Fix problem reported here: >

Re: [Qemu-devel] [PATCH v2 2/3] target-sparc: address_mask(), asi_address_mask() are TARGET_SPARC64 only

2014-09-03 Thread Artyom Tarasenko
On Tue, Sep 2, 2014 at 1:52 PM, Peter Maydell wrote: > The address_mask() and asi_address_mask() functions are only used in > TARGET_SPARC64 configs, so guard with ifdefs to avoid warnings about > unused functions in 32-bit builds. > > Since the main reason these functions were marked 'inline' was

Re: [Qemu-devel] [PATCH] vhost_net: initialize acked_features to a safe value during ack

2014-09-03 Thread Michael S. Tsirkin
On Wed, Sep 03, 2014 at 11:50:05AM +0300, Michael S. Tsirkin wrote: > commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add > vhost_get_features and vhost_ack_features) removes the step that > initializes the acked_features to backend_features. > > As this field is now uninitialized, vhost i

[Qemu-devel] [PATCH] vhost_net: init acked_features to backend_features

2014-09-03 Thread Michael S. Tsirkin
commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add vhost_get_features and vhost_ack_features) removes the step that initializes the acked_features to backend_features. As this field is now uninitialized, vhost initialization will sometimes fail. To fix, initialize field in core vhost cod

Re: [Qemu-devel] [PATCH] vhost_net: initialize acked_features to a safe value during ack

2014-09-03 Thread Andrey Korolyov
On Wed, Sep 3, 2014 at 12:52 PM, Michael S. Tsirkin wrote: > On Wed, Sep 03, 2014 at 02:25:30PM +0800, Jason Wang wrote: >> commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add >> vhost_get_features and vhost_ack_features) removes the step that >> initializes the acked_features to backend_f

[Qemu-devel] [PATCH] vhost-scsi: init backend features earlier

2014-09-03 Thread Michael S. Tsirkin
As vhost core uses backend_features during init, clear it earlier to avoid using uninitialized memory. This is harmless since vhost scsi ignores the result anyway, but it avoids valgrind errors. Cc: qemu-sta...@nongnu.org Cc: Jason Wang Signed-off-by: Michael S. Tsirkin --- hw/scsi/vhost-scsi.c

Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 2.1.1, freeze on 2014-09-03

2014-09-03 Thread Michael S. Tsirkin
On Wed, Sep 03, 2014 at 12:36:18PM +0400, Andrey Korolyov wrote: > On Wed, Sep 3, 2014 at 12:13 PM, Michael S. Tsirkin wrote: > > On Wed, Sep 03, 2014 at 11:43:54AM +0400, Andrey Korolyov wrote: > >> On Wed, Sep 3, 2014 at 10:10 AM, Michael S. Tsirkin > >> wrote: > >> > On Wed, Sep 03, 2014 at 0

Re: [Qemu-devel] [RFC PATCH v1 0/4] Handle memory hotplug errors from guest OS.

2014-09-03 Thread tangchen
Hi, Would anyone help to review this patch-set ? I'm not quit sure if this is a suitable way solve this problem. Thanks. On 08/27/2014 04:14 PM, tangchen wrote: Forgot to mention, this patch-set is based on the following patch-set: [RESEND PATCH v3 0/8] QEmu memory hot unplug support. https

Re: [Qemu-devel] [PATCH] vhost_net: initialize acked_features to a safe value during ack

2014-09-03 Thread Michael S. Tsirkin
On Wed, Sep 03, 2014 at 12:54:03PM +0400, Andrey Korolyov wrote: > On Wed, Sep 3, 2014 at 12:52 PM, Michael S. Tsirkin wrote: > > On Wed, Sep 03, 2014 at 02:25:30PM +0800, Jason Wang wrote: > >> commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add > >> vhost_get_features and vhost_ack_featu

[Qemu-devel] [PATCH] vhost_net: cleanup recovery

2014-09-03 Thread Michael S. Tsirkin
commit aad4dce934649b3a398396fc2a76f215bb194ea4 vhost_net: start/stop guest notifiers properly changed the order of calls for guest notifiers, but did not recover in the correct (reverse) order. Fix it up. Cc: qemu-sta...@nongnu.org Cc: Andrey Korolyov Cc: Jason Wang Signed-off-by: Michael

Re: [Qemu-devel] [PATCH] vhost-scsi: init backend features earlier

2014-09-03 Thread Paolo Bonzini
Il 03/09/2014 11:02, Michael S. Tsirkin ha scritto: > As vhost core uses backend_features during init, > clear it earlier to avoid using uninitialized > memory. > This is harmless since vhost scsi ignores the result > anyway, but it avoids valgrind errors. > > Cc: qemu-sta...@nongnu.org > Cc: Jaso

Re: [Qemu-devel] [PATCH] vhost-scsi: init backend features earlier

2014-09-03 Thread Michael S. Tsirkin
On Wed, Sep 03, 2014 at 11:08:00AM +0200, Paolo Bonzini wrote: > Il 03/09/2014 11:02, Michael S. Tsirkin ha scritto: > > As vhost core uses backend_features during init, > > clear it earlier to avoid using uninitialized > > memory. > > This is harmless since vhost scsi ignores the result > > anyway

Re: [Qemu-devel] [RFC] vfio: migration to trace points

2014-09-03 Thread Alexander Graf
On 03.09.14 10:45, Eric Auger wrote: > This patch removes all DPRINTF and replace them by trace points. > A few DPRINTF used in error cases were transformed into error_report. > > Signed-off-by: Eric Auger > > --- > > - __func__ is removed since trace point name does the same job > - HWADDR_P

Re: [Qemu-devel] [PATCH] vhost_net: initialize acked_features to a safe value during ack

2014-09-03 Thread Michael S. Tsirkin
On Wed, Sep 03, 2014 at 12:54:03PM +0400, Andrey Korolyov wrote: > On Wed, Sep 3, 2014 at 12:52 PM, Michael S. Tsirkin wrote: > > On Wed, Sep 03, 2014 at 02:25:30PM +0800, Jason Wang wrote: > >> commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add > >> vhost_get_features and vhost_ack_featu

Re: [Qemu-devel] [PATCH] vhost-scsi: init backend features earlier

2014-09-03 Thread Jason Wang
On 09/03/2014 05:02 PM, Michael S. Tsirkin wrote: > As vhost core uses backend_features during init, > clear it earlier to avoid using uninitialized > memory. > This is harmless since vhost scsi ignores the result > anyway, but it avoids valgrind errors. > > Cc: qemu-sta...@nongnu.org > Cc: Jason W

Re: [Qemu-devel] [PATCH] vhost_net: init acked_features to backend_features

2014-09-03 Thread Jason Wang
On 09/03/2014 04:57 PM, Michael S. Tsirkin wrote: > commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add > vhost_get_features and vhost_ack_features) removes the step that > initializes the acked_features to backend_features. > > As this field is now uninitialized, vhost initialization will

Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 2.1.1, freeze on 2014-09-03

2014-09-03 Thread Andrey Korolyov
> > OK so my patch fixes initialization likely by luck. > >> with crash still in place. > > Hmm so something is still wrong with the userspace path. > Could you please apply this debugging patch on top of > all the stack that is now working for you, and see if > assert still surfaces? > > > diff --

Re: [Qemu-devel] [PATCH] vhost_net: cleanup recovery

2014-09-03 Thread Jason Wang
On 09/03/2014 05:10 PM, Michael S. Tsirkin wrote: > commit aad4dce934649b3a398396fc2a76f215bb194ea4 > vhost_net: start/stop guest notifiers properly > > changed the order of calls for guest notifiers, > but did not recover in the correct (reverse) order. > Fix it up. > > Cc: qemu-sta...@nongnu.

[Qemu-devel] [PATCH 0/5] cpu/acpi: convert cpu hot plug to hotplug_handler API

2014-09-03 Thread Gu Zheng
Gu Zheng (5): acpi/cpu: add cpu hotplug callback function to match hotplug_handler API acpi:ich9: convert cpu hotplug handle to hotplug_handler API acpi:piix4: convert cpu hotplug handle to hotplug_handler API pc: add cpu hotplug handler to PC_MACHINE cpu/hotplug: remove the left unu

[Qemu-devel] [PATCH 1/5] acpi/cpu: add cpu hotplug callback function to match hotplug_handler API

2014-09-03 Thread Gu Zheng
Signed-off-by: Gu Zheng --- hw/acpi/cpu_hotplug.c | 17 + include/hw/acpi/cpu_hotplug.h |3 +++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c index 2ad83a0..92c189b 100644 --- a/hw/acpi/cpu_hotplug.c ++

[Qemu-devel] [PATCH 2/5] acpi:ich9: convert cpu hotplug handle to hotplug_handler API

2014-09-03 Thread Gu Zheng
Convert notifier based hotplug handle to hotplug_handler API. Signed-off-by: Gu Zheng --- hw/acpi/ich9.c | 13 ++--- include/hw/acpi/ich9.h |1 - 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 7b14bbb..89f97d7 100644 --

[Qemu-devel] [PATCH 3/5] acpi:piix4: convert cpu hotplug handle to hotplug_handler API

2014-09-03 Thread Gu Zheng
Convert notifier based hotplug handle to hotplug_handler API. Signed-off-by: Gu Zheng --- hw/acpi/piix4.c | 14 ++ 1 files changed, 2 insertions(+), 12 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index b72b34e..6209385 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/pii

[Qemu-devel] [PATCH 4/5] pc: add cpu hotplug handler to PC_MACHINE

2014-09-03 Thread Gu Zheng
Add cpu hotplug handler to PC_MACHINE, which will perform the acpi cpu hotplug callback via hotplug_handler API. Signed-off-by: Gu Zheng --- hw/i386/pc.c | 26 +- qom/cpu.c|1 - 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc.c b/hw/i3

Re: [Qemu-devel] [PATCH 1/5] s390x/gdb: don't touch the cc if tcg is not enabled

2014-09-03 Thread Alexander Graf
On 02.09.14 09:07, Christian Borntraeger wrote: > On 02/09/14 00:39, Alexander Graf wrote: >> >> >> On 29.08.14 15:52, Jens Freimann wrote: >>> From: David Hildenbrand >>> >>> When reading/writing the psw mask, the condition code may only be touched if >>> running on tcg. >> >> Why? Shouldn't we

[Qemu-devel] [PATCH 5/5] cpu/hotplug: remove the left unused cpu hotplug notifier function

2014-09-03 Thread Gu Zheng
Remove the left unused cpu hotplug notifier function, and rename AcpiCpuHotplug_init --> acpi_cpu_hotplug_init AcpiCpuHotplug_ops --> acpi_cpu_hotplug_ops to match the coding style. Signed-off-by: Gu Zheng --- hw/acpi/cpu_hotplug.c | 17 +++-- hw/acpi/ich9.c

Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 2.1.1, freeze on 2014-09-03

2014-09-03 Thread Michael S. Tsirkin
On Wed, Sep 03, 2014 at 01:18:47PM +0400, Andrey Korolyov wrote: > > > > OK so my patch fixes initialization likely by luck. > > > >> with crash still in place. > > > > Hmm so something is still wrong with the userspace path. > > Could you please apply this debugging patch on top of > > all the sta

Re: [Qemu-devel] [PATCH] vhost_net: init acked_features to backend_features

2014-09-03 Thread Andrey Korolyov
On Wed, Sep 3, 2014 at 1:16 PM, Jason Wang wrote: > On 09/03/2014 04:57 PM, Michael S. Tsirkin wrote: >> commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add >> vhost_get_features and vhost_ack_features) removes the step that >> initializes the acked_features to backend_features. >> >> As t

Re: [Qemu-devel] [PATCH] vhost_net: cleanup recovery

2014-09-03 Thread Andrey Korolyov
On Wed, Sep 3, 2014 at 1:20 PM, Jason Wang wrote: > On 09/03/2014 05:10 PM, Michael S. Tsirkin wrote: >> commit aad4dce934649b3a398396fc2a76f215bb194ea4 >> vhost_net: start/stop guest notifiers properly >> >> changed the order of calls for guest notifiers, >> but did not recover in the correct

Re: [Qemu-devel] [PATCH 5/5] gdb: provide the name of the architecture in the target.xml

2014-09-03 Thread David Hildenbrand
> [ccing Andreas in case he wants to review the QOM aspects of this, > though they're fairly straightforward I think.] > > On 29 August 2014 14:52, Jens Freimann wrote: > > From: David Hildenbrand > > > > This patch provides the name of the architecture in the target.xml if > > available. > > >

[Qemu-devel] [PATCH v2] vhost_net: cleanup recovery

2014-09-03 Thread Michael S. Tsirkin
commit aad4dce934649b3a398396fc2a76f215bb194ea4 vhost_net: start/stop guest notifiers properly changed the order of calls for guest notifiers, but did not recover in the correct (reverse) order. Fix it up. Cc: qemu-sta...@nongnu.org Cc: Andrey Korolyov Cc: Jason Wang Signed-off-by: Michael

Re: [Qemu-devel] [PATCH 5/5] gdb: provide the name of the architecture in the target.xml

2014-09-03 Thread Edgar E. Iglesias
On Wed, Sep 03, 2014 at 11:37:24AM +0200, David Hildenbrand wrote: > > [ccing Andreas in case he wants to review the QOM aspects of this, > > though they're fairly straightforward I think.] > > > > On 29 August 2014 14:52, Jens Freimann wrote: > > > From: David Hildenbrand > > > > > > This patch

[Qemu-devel] [PATCH] qtest: fix qtest log fd should be initialized before qtest chardev

2014-09-03 Thread john.liuli
From: Li Liu qtest_log_fp should be inited before qemu_chr_add_handlers. If not the log dumped from callback functions may be lost. easy to reproduce it by command: "QTEST_LOG=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 gtester -k --verbose -m=quick tests/qdev-monitor-test" The log "[

[Qemu-devel] [PATCH v2 0/2] actual checks of KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE

2014-09-03 Thread Eric Auger
This patch serie replaces direct settings of kvm_irqfds_allowed by actual checks of the KVM_CAP_IRQFD extension. Also A new kvm_resamplefds_enabled() enables to check KVM_CAP_IRQFD_RESAMPLE. in the second patch file the vfio device is the first user of kvm_resamplefds_enabled(). Eric Auger (2):

[Qemu-devel] [PATCH v2 1/2] KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE checks

2014-09-03 Thread Eric Auger
Compute kvm_irqfds_allowed by checking the KVM_CAP_IRQFD extension. Remove direct settings in architecture specific files. Add a new kvm_resamplefds_allowed variable, initialized by checking the KVM_CAP_IRQFD_RESAMPLE extension. Add a corresponding kvm_resamplefds_enabled() function. Signed-off-b

[Qemu-devel] [PATCH v2 2/2] vfio: use kvm_resamplefds_enabled()

2014-09-03 Thread Eric Auger
Use the kvm_resamplefds_enabled function Signed-off-by: Eric Auger --- hw/misc/vfio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index 40dcaa6..24f6a3a 100644 --- a/hw/misc/vfio.c +++ b/hw/misc/vfio.c @@ -406,7 +406,7 @@ static void v

[Qemu-devel] [PATCH v3] dump: let dump_error return error info to caller

2014-09-03 Thread zhanghailiang
The second parameter of dump_error is unused, but one purpose of using this function is to report the error info. Use error_set to return the error info to the caller. Signed-off-by: zhanghailiang --- V3: - Drop the '\n' in the message when call dump_error(comment of Eric Blake) V2: - Return

Re: [Qemu-devel] [PATCH 5/5] gdb: provide the name of the architecture in the target.xml

2014-09-03 Thread David Hildenbrand
> On Wed, Sep 03, 2014 at 11:37:24AM +0200, David Hildenbrand wrote: > > > [ccing Andreas in case he wants to review the QOM aspects of this, > > > though they're fairly straightforward I think.] > > > > > > On 29 August 2014 14:52, Jens Freimann wrote: > > > > From: David Hildenbrand > > > > >

Re: [Qemu-devel] [PATCH 5/5] gdb: provide the name of the architecture in the target.xml

2014-09-03 Thread Edgar E. Iglesias
On Wed, Sep 03, 2014 at 11:59:45AM +0200, David Hildenbrand wrote: > > On Wed, Sep 03, 2014 at 11:37:24AM +0200, David Hildenbrand wrote: > > > > [ccing Andreas in case he wants to review the QOM aspects of this, > > > > though they're fairly straightforward I think.] > > > > > > > > On 29 August

Re: [Qemu-devel] [libvirt] [PATCH V2] fix: unix sockets created for virtio-serail has insufficient permissions

2014-09-03 Thread Eric Blake
On 09/03/2014 12:18 AM, Chunyan Liu wrote: s/serail/serial/ in the subject Actually, I'd go with a broader subject line: qemu: ensure sane umask for qemu process > Add umask to _virCommand, allow user to set umask to command. > Set umask(002) to qemu process to overwrite default umask(022) so >

Re: [Qemu-devel] [PATCH v5] block: Introduce "null" drivers

2014-09-03 Thread Fam Zheng
On Wed, 09/03 12:10, Kevin Wolf wrote: > Am 01.09.2014 um 11:22 hat Fam Zheng geschrieben: > > This is an analogue to Linux null_blk. It can be used for testing or > > benchmarking block device emulation and general block layer > > functionalities such as coroutines and throttling, where disk IO is

[Qemu-devel] [PATCH v3] vhost_net: cleanup recovery

2014-09-03 Thread Michael S. Tsirkin
commit aad4dce934649b3a398396fc2a76f215bb194ea4 vhost_net: start/stop guest notifiers properly changed the order of calls for guest notifiers, but did not recover in the correct (reverse) order. Fix it up. Cc: qemu-sta...@nongnu.org Cc: Andrey Korolyov Cc: Jason Wang Signed-off-by: Michael

Re: [Qemu-devel] [PATCH] vhost_net: cleanup recovery

2014-09-03 Thread Michael S. Tsirkin
On Wed, Sep 03, 2014 at 01:37:33PM +0400, Andrey Korolyov wrote: > On Wed, Sep 3, 2014 at 1:20 PM, Jason Wang wrote: > > On 09/03/2014 05:10 PM, Michael S. Tsirkin wrote: > >> commit aad4dce934649b3a398396fc2a76f215bb194ea4 > >> vhost_net: start/stop guest notifiers properly > >> > >> changed

Re: [Qemu-devel] [PATCH 09/12] spapr_pci: enable basic hotplug operations

2014-09-03 Thread Bharata B Rao
On Tue, Aug 19, 2014 at 5:51 AM, Michael Roth wrote: > This enables hotplug for PHB bridges. Upon hotplug we generate the > OF-nodes required by PAPR specification and IEEE 1275-1994 > "PCI Bus Binding to Open Firmware" for the device. > > We associate the corresponding FDT for these nodes with th

Re: [Qemu-devel] Query regarding bdrv_co_discard

2014-09-03 Thread Stefan Hajnoczi
On Tue, Sep 02, 2014 at 02:09:44AM -0700, Sanjay Kumar2 wrote: > Please let me know how to test bdrv_co_discard interface. I mean what steps I > need to do on KVM host and inside guest to do end to end testing of this > interface. I have implemented a network protocol based block driver and > de

[Qemu-devel] Serial: possible hang during intensive interaction over the console

2014-09-03 Thread Andrey Korolyov
Given 2.1 and isa-serial output, set as ttyS0 for the guest VM with 9600 baud rate. The test case is quite simple - display as much data as possible over serial console and do not hang the system. While qemu-1.1 works perfectly, with complaining for lost interrupts (known bug for used guest kernel

Re: [Qemu-devel] [PATCH] block/archipelago: Use QEMU atomic builtins

2014-09-03 Thread Stefan Hajnoczi
On Tue, Sep 02, 2014 at 03:41:34PM +0300, Chrysostomos Nanakos wrote: > Replace __sync builtins with ones provided by QEMU > for atomic operations. > > Special thanks goes to Paolo Bonzini for his refactoring > suggestion in order to use the already existing atomic builtins > interface. > > Signe

Re: [Qemu-devel] [PATCH v2 0/2] qemu-img: src_mode option documentation improvements

2014-09-03 Thread Stefan Hajnoczi
On Tue, Sep 02, 2014 at 11:01:01AM +0100, Stefan Hajnoczi wrote: > v2: > * Fix "backing file files" -> "backing files" typo [Fam] > > These patches clarify and fix the documentation for the recent qemu-img > src_mode (-T) option. > > Stefan Hajnoczi (2): > qemu-img: clarify src_cache option do

Re: [Qemu-devel] Query regarding bdrv_co_discard

2014-09-03 Thread Sanjay Kumar2
Thanks Stefan. I using the same. Below is the XML. I am able to see the scsi disk, /dev/sda inside the guest, but does not showing TRIM supported in the hdparm output. Fstrim command is also failing. Regards, Sanjay

Re: [Qemu-devel] qemu-system-sparc64 hang (possibly virtio related?) with 2.1

2014-09-03 Thread Stefan Hajnoczi
On Tue, Sep 02, 2014 at 02:12:45PM +0100, Mark Cave-Ayland wrote: > Fortunately I can reproduce the issue with a debug-enabled build of > qemu-system-sparc64, and I've posted a backtrace obtained during the hung > state at http://www.ilande.co.uk/tmp/sparc64-gdb-bt.txt. I can't see > anything too o

Re: [Qemu-devel] [PATCH] virtio-net: don't run bh on vm stopped

2014-09-03 Thread Stefan Hajnoczi
On Tue, Sep 02, 2014 at 05:26:12PM +0300, Michael S. Tsirkin wrote: > commit 783e7706937fe15523b609b545587a028a2bdd03 > virtio-net: stop/start bh when appropriate > > is incomplete: BH might execute within the same main loop iteration but > after vmstop, so in theory, we might trigger an asser

Re: [Qemu-devel] [PATCH v3] vhost_net: cleanup recovery

2014-09-03 Thread Andrey Korolyov
On Wed, Sep 3, 2014 at 2:35 PM, Michael S. Tsirkin wrote: > commit aad4dce934649b3a398396fc2a76f215bb194ea4 > vhost_net: start/stop guest notifiers properly > > changed the order of calls for guest notifiers, > but did not recover in the correct (reverse) order. > Fix it up. > > Cc: qemu-sta..

Re: [Qemu-devel] [PATCH v3] vhost_net: cleanup recovery

2014-09-03 Thread Jason Wang
On 09/03/2014 06:35 PM, Michael S. Tsirkin wrote: > commit aad4dce934649b3a398396fc2a76f215bb194ea4 > vhost_net: start/stop guest notifiers properly > > changed the order of calls for guest notifiers, > but did not recover in the correct (reverse) order. > Fix it up. > > Cc: qemu-sta...@nongnu.

Re: [Qemu-devel] Question about cow format with hexdump

2014-09-03 Thread Stefan Hajnoczi
On Wed, Sep 03, 2014 at 01:27:00PM +0800, shhuiw wrote: > I'm reading the source code of cow.c: > https://github.com/qemu/qemu/blob/master/block/cow.c > and try to understand the format better. The 'cow' format is an old format that is rarely used. It's not a good example. qcow2 is actively dev

Re: [Qemu-devel] Fw:Re:What does "COW" mean?

2014-09-03 Thread Stefan Hajnoczi
On Wed, Sep 03, 2014 at 12:47:44PM +0800, shhuiw wrote: > At 2014-09-02 04:33:50, "shhuiw" wrote: > > > > > >Hi, > > > >I'm new to qemu community, and I'm trying the COW image format (old but > >simple:-). > >I have read through its source code, and didn't find anything about 'copy on > >write'.

Re: [Qemu-devel] [PATCH v5] block: Introduce "null" drivers

2014-09-03 Thread Kevin Wolf
Am 01.09.2014 um 11:22 hat Fam Zheng geschrieben: > This is an analogue to Linux null_blk. It can be used for testing or > benchmarking block device emulation and general block layer > functionalities such as coroutines and throttling, where disk IO is not > necessary or wanted. > > Use null-aio:/

Re: [Qemu-devel] [PATCH v3] block: Introduce "null" driver

2014-09-03 Thread Kevin Wolf
Am 29.08.2014 um 02:55 hat Fam Zheng geschrieben: > On Thu, 08/28 16:23, Eric Blake wrote: > > On 08/27/2014 11:53 PM, Fam Zheng wrote: > > > This is an analogue to Linux null_blk. It can be used for testing block > > > device emulation and general block layer functionalities such as > > > coroutin

Re: [Qemu-devel] [PULL 00/13] pci, pc fixes, features

2014-09-03 Thread Michael S. Tsirkin
On Tue, Sep 02, 2014 at 06:07:01PM +0300, Michael S. Tsirkin wrote: > The following changes since commit 187de915e8d06aaf82be206aebc551c82bf0670c: > > pcie: fix trailing whitespace (2014-08-25 00:16:07 +0200) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/virt/k

Re: [Qemu-devel] [PATCH v3] vhost_net: cleanup recovery

2014-09-03 Thread Michael S. Tsirkin
On Wed, Sep 03, 2014 at 06:52:46PM +0800, Jason Wang wrote: > On 09/03/2014 06:35 PM, Michael S. Tsirkin wrote: > > commit aad4dce934649b3a398396fc2a76f215bb194ea4 > > vhost_net: start/stop guest notifiers properly > > > > changed the order of calls for guest notifiers, > > but did not recover

Re: [Qemu-devel] [PATCH] virtio-net: don't run bh on vm stopped

2014-09-03 Thread Michael S. Tsirkin
On Wed, Sep 03, 2014 at 11:45:57AM +0100, Stefan Hajnoczi wrote: > On Tue, Sep 02, 2014 at 05:26:12PM +0300, Michael S. Tsirkin wrote: > > commit 783e7706937fe15523b609b545587a028a2bdd03 > > virtio-net: stop/start bh when appropriate > > > > is incomplete: BH might execute within the same main

[Qemu-devel] [PATCH v4 00/20] block: Asynchronous request cancellation

2014-09-03 Thread Fam Zheng
v4: Drop AIOCBInfo.cancel. This series adds a new block layer API: void bdrv_aio_cancel_async(BlockDriverAIOCB *acb); And use it to emulate bdrv_aio_cancel. The function is similar to bdrv_aio_cancel in that it cancels an AIO request, but different that it doesn't block until the request is c

[Qemu-devel] [PATCH v4 03/20] block: Drop bdrv_em_co_aiocb_info.cancel

2014-09-03 Thread Fam Zheng
Also drop the now unused ->done pointer. Signed-off-by: Fam Zheng --- block.c | 21 - 1 file changed, 21 deletions(-) diff --git a/block.c b/block.c index 2dfd1be..4aa1bd7 100644 --- a/block.c +++ b/block.c @@ -4757,22 +4757,8 @@ typedef struct BlockDriverAIOCBCoroutine {

[Qemu-devel] [PATCH v4 07/20] dma: Check iov pointer before unmap memory

2014-09-03 Thread Fam Zheng
Not all the iov elements are always valid. Signed-off-by: Fam Zheng --- dma-helpers.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dma-helpers.c b/dma-helpers.c index 499b52b..3655d88 100644 --- a/dma-helpers.c +++ b/dma-helpers.c @@ -105,6 +105,9 @@ static void dma_bdrv_unmap(DMAAIOCB

[Qemu-devel] [PATCH v4 02/20] block: Add bdrv_aio_cancel_async

2014-09-03 Thread Fam Zheng
This is the async version of bdrv_aio_cancel, which doesn't block the caller. It guarantees that the cb is called either before returning or some time later. bdrv_aio_cancel can base on bdrv_aio_cancel_async, later we can convert all .io_cancel implementations to .io_cancel_async, and the aio_poll

[Qemu-devel] [PATCH v4 01/20] block: Add refcnt in BlockDriverAIOCB

2014-09-03 Thread Fam Zheng
This will be useful in synchronous cancel emulation with bdrv_aio_cancel_async. Signed-off-by: Fam Zheng --- block.c | 12 +++- include/block/aio.h | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index cb670fd..78d68cb 100644 --- a/bl

[Qemu-devel] [PATCH v4 06/20] linux-aio: Convert laio_aiocb_info.cancel to .cancel_async

2014-09-03 Thread Fam Zheng
Just call io_cancel (2), if it fails, it means the request is not canceled, so the event loop will eventually call qemu_laio_process_completion. In qemu_laio_process_completion, change to call the cb unconditionally. It is required by bdrv_aio_cancel_async. Signed-off-by: Fam Zheng --- block/li

[Qemu-devel] [PATCH v4 15/20] quorum: Convert quorum_aiocb_info.cancel to .cancel_async

2014-09-03 Thread Fam Zheng
Before, we cancel all the child requests with bdrv_aio_cancel, then free the acb.. Now we just kick off asynchronous cancellation of child requests and return, we know quorum_aio_cb will be called later, so in the end quorum_aio_finalize will take care of calling the caller's cb. Signed-off-by: F

[Qemu-devel] [PATCH v4 10/20] archipelago: Drop archipelago_aiocb_info.cancel

2014-09-03 Thread Fam Zheng
The cancelled flag is no longer useful. Later the request will complete as before, and cb will be called. Signed-off-by: Fam Zheng --- block/archipelago.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/block/archipelago.c b/block/archipelago.c index 34f72dc

[Qemu-devel] [PATCH v4 09/20] iscsi: Convert iscsi_aiocb_info.cancel to .cancel_async

2014-09-03 Thread Fam Zheng
Also drop the unused field "canceled". Signed-off-by: Fam Zheng --- block/iscsi.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 3e19202..a0aca5f 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -88,7 +88,6 @@ typedef s

[Qemu-devel] [PATCH v4 04/20] block: Convert bdrv_em_aiocb_info.cancel to .cancel_async

2014-09-03 Thread Fam Zheng
All the difference is that the old .cancel doesn't call cb, but .cancel_async does. Signed-off-by: Fam Zheng --- block.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 4aa1bd7..b7253af 100644 --- a/block.c +++ b/block.c @@ -4679,6 +4679,9 @@ stati

[Qemu-devel] [PATCH v4 16/20] rbd: Drop rbd_aiocb_info.cancel

2014-09-03 Thread Fam Zheng
And also drop the now unused "cancelled" field. Signed-off-by: Fam Zheng --- block/rbd.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index ea969e7..349d465 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -77,7 +77,6 @@ typed

[Qemu-devel] [PATCH v4 11/20] blkdebug: Convert blkdebug_aiocb_info.cancel to .cancel_async

2014-09-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/blkdebug.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index 69b330e..9f23530 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -55,8 +55,8 @@ typedef struct BlkdebugSuspendedReq { static v

[Qemu-devel] [PATCH v4 19/20] ide: Convert trim_aiocb_info.cancel to .cancel_async

2014-09-03 Thread Fam Zheng
We know that either bh is scheduled or ide_issue_trim_cb will be called again, so we just set i, j and ret to the right values. In both cases, ide_trim_bh_cb will be called. Also forward the cancellation to the iocb->aiocb which we get from bdrv_aio_discard. Signed-off-by: Fam Zheng --- hw/ide/

[Qemu-devel] [PATCH v4 05/20] thread-pool: Convert thread_pool_aiocb_info.cancel to cancel_async

2014-09-03 Thread Fam Zheng
The .cancel_async has the same the first half with .cancel: try to steal the request if not submitted yet. In this case set the elem to THREAD_DONE status and ret to -ECANCELED, which means thread_pool_completion_bh will call the cb with -ECANCELED. If the request is already submitted, do nothing,

[Qemu-devel] [PATCH v4 13/20] curl: Drop curl_aiocb_info.cancel

2014-09-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/curl.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/block/curl.c b/block/curl.c index 0258339..ed64b18 100644 --- a/block/curl.c +++ b/block/curl.c @@ -613,14 +613,8 @@ out_noclean: return -EINVAL; } -static void curl_aio_cancel(BlockDriverAI

[Qemu-devel] [PATCH v4 08/20] dma: Convert dma_aiocb_info.cancel to .cancel_async

2014-09-03 Thread Fam Zheng
Just forward the request to bdrv_aio_cancel_async. Signed-off-by: Fam Zheng --- dma-helpers.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/dma-helpers.c b/dma-helpers.c index 3655d88..8163940 100644 --- a/dma-helpers.c +++ b/dma-helpers.c @@ -73,7 +73

[Qemu-devel] [PATCH v4 20/20] block: Drop AIOCBInfo.cancel

2014-09-03 Thread Fam Zheng
Now that all the implementations are converted to asynchronous version and we can emulate synchronous cancellation with it. Let's drop the unused member. Signed-off-by: Fam Zheng --- block.c | 24 ++-- include/block/aio.h | 1 - 2 files changed, 10 insertions(+),

[Qemu-devel] [PATCH v4 14/20] qed: Drop qed_aiocb_info.cancel

2014-09-03 Thread Fam Zheng
Also drop the now unused ->finished field. Signed-off-by: Fam Zheng --- block/qed.c | 21 - 1 file changed, 21 deletions(-) diff --git a/block/qed.c b/block/qed.c index ba395af..07cdb47 100644 --- a/block/qed.c +++ b/block/qed.c @@ -18,22 +18,8 @@ #include "qapi/qmp/qerror.

Re: [Qemu-devel] [PATCH v4 04/20] block: Convert bdrv_em_aiocb_info.cancel to .cancel_async

2014-09-03 Thread Paolo Bonzini
Il 03/09/2014 13:23, Fam Zheng ha scritto: > All the difference is that the old .cancel doesn't call cb, but > .cancel_async does. This requires auditing all callbacks though, doesn't it? Or at least adding an if (ret == -ECANCELED) { return; } at the beginning. Paolo > Signed

[Qemu-devel] [PATCH v4 12/20] blkverify: Drop blkverify_aiocb_info.cancel

2014-09-03 Thread Fam Zheng
Also the finished pointer is not used any more. Signed-off-by: Fam Zheng --- block/blkverify.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/block/blkverify.c b/block/blkverify.c index 163064c..460393f 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -29,7 +29,

[Qemu-devel] [PATCH v4 17/20] sheepdog: Convert sd_aiocb_info.cancel to .cancel_async

2014-09-03 Thread Fam Zheng
Also drop the now unused SheepdogAIOCB.finished field. Note that this aio is internal to sheepdog driver and has NULL cb and opaque, and should be unused at all. Signed-off-by: Fam Zheng --- block/sheepdog.c | 46 +++--- 1 file changed, 19 insertions(+), 2

[Qemu-devel] [PATCH v4 18/20] win32-aio: Drop win32_aiocb_info.cancel

2014-09-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/win32-aio.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/block/win32-aio.c b/block/win32-aio.c index 5030e32..eed86f7 100644 --- a/block/win32-aio.c +++ b/block/win32-aio.c @@ -106,22 +106,8 @@ static void win32_aio_completion_cb(EventNotif

Re: [Qemu-devel] [PATCH v4 07/20] dma: Check iov pointer before unmap memory

2014-09-03 Thread Paolo Bonzini
Il 03/09/2014 13:23, Fam Zheng ha scritto: > Not all the iov elements are always valid. > > Signed-off-by: Fam Zheng > --- > dma-helpers.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/dma-helpers.c b/dma-helpers.c > index 499b52b..3655d88 100644 > --- a/dma-helpers.c > +++ b/dma-

[Qemu-devel] [PATCH 1/2] memory: Add MemoryRegion get address space offset helper function

2014-09-03 Thread Bogdan Purcareata
Adding this function would allow a MemoryRegion to compute its start address within the AddressSpace. This is done recursively based on mr->container. Signed-off-by: Bogdan Purcareata --- include/exec/memory.h |8 memory.c | 10 ++ 2 files changed, 18 insertio

[Qemu-devel] [PATCH 0/2] PPC: kvm: Fix incorrect remapping of in-kernel MPIC

2014-09-03 Thread Bogdan Purcareata
On target-ppc, the kvm-openpic memory region is part of the E500-CCSR memory region. On the kernel side, the MPIC is mapped at the same offset as the kvm-openpic within the address space. When adding the PCI BAR0 memory region, an alias is created to point to the E500-CCSR memory region. This resu

[Qemu-devel] [PATCH 2/2] PPC: openpic_kvm: Filter region callbacks based on memory region offset

2014-09-03 Thread Bogdan Purcareata
This is done due to the fact that the kvm-openpic region_{add,del} callbacks can be invoked for sections generated from other memory regions as well. These callbacks should handle only requests for the kvm-openpic memory region. The patch fixes a bug on target-ppc occuring when the "e500-pci-bar0"

Re: [Qemu-devel] [PATCH v4 11/20] blkdebug: Convert blkdebug_aiocb_info.cancel to .cancel_async

2014-09-03 Thread Paolo Bonzini
Il 03/09/2014 13:23, Fam Zheng ha scritto: > static void blkdebug_aio_cancel(BlockDriverAIOCB *blockacb) > { > BlkdebugAIOCB *acb = container_of(blockacb, BlkdebugAIOCB, common); > +acb->ret = -ECANCELED; > +acb->common.cb(acb->common.opaque, acb->ret); > if (acb->bh) { >

  1   2   3   >