[Qemu-devel] [PATCH v2 12/19] dev-serial: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-serial.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/hw/usb/dev-seria

[Qemu-devel] [PATCH v2 08/19] dev-storage: usring error_report instead of fprintf/printf

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-storage.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 182dd5a..a5e9d4a 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storag

[Qemu-devel] [PATCH v2 13/19] usb-ccid: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-smartcard-reader.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 470e69f..442f487 100644 --- a/hw/usb/dev-smartcard-read

[Qemu-devel] [PATCH v2 11/19] dev-bluetooth: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-bluetooth.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-bluetooth.c b/hw/usb/dev-bluetooth.c index a76e581..7db9921 100644 --- a/hw/usb/dev-bluetooth.c +++ b/hw/usb/dev-bluet

[Qemu-devel] [PATCH v2 02/19] usb-bus: convert USBDeviceClass init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Add "realize/unrealize" in USBDeviceClass, which has errp as a parameter. So all the implementations now use error_setg instead of error_report for reporting error. Note: this patch still keep "init" in USBDeviceClass, and call kclass->init in usb_device_realize(), avoid breaking g

[Qemu-devel] [PATCH v2 06/19] usb-hub: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-hub.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-

[Qemu-devel] [PATCH v2 09/19] dev-uas: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-uas.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 9832385..884c003 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -892,7 +892,7 @@ sta

[Qemu-devel] [PATCH v2 04/19] libusb: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/host-libusb.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hw/usb/host-libus

[Qemu-devel] [PATCH v2 00/19] usb: convert device init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei DeviceClass->init is the old interface, let's convert usb devices to the new realize API. In this way, all the implementations now use error_setg instead of qerror_report/error_report for reporting error. Cc: Markus Armbruster Cc: Paolo Bonzini Cc: Gerd Hoffmann v2 -> v1: - f

[Qemu-devel] [PATCH v2 01/19] usb-storage: fix possible memory leak and missing error message

2014-09-18 Thread arei.gonglei
From: Gonglei When scsi_bus_legacy_add_drive() return NULL, meanwhile err will be not NULL, which will casue memory leak and missing error message. Cc: Markus Armbruster Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-storage.c | 2 ++ 1 file changed, 2 insertions(+) diff -

[Qemu-devel] [PATCH v2 03/19] usb-net: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei meanwhile, qerror_report_err() is a transitional interface to help with converting existing HMP commands to QMP. It should not be used elsewhere. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-network.c | 9 - 1 file changed, 4 insertions(+), 5 deletion

Re: [Qemu-devel] [PATCH 1/6] block/qapi: Add cache information to query-block

2014-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 18.09.2014 um 13:04 hat Markus Armbruster geschrieben: >> Before this patch, QAPI type BlockdevCacheOptions is used only as a >> member of BlockdevOptionsBase. >> >> BlockdevOptionsBase is a collection configuration settings. >> Consequently, it's a complex type whose mem

Re: [Qemu-devel] [PATCH] qga: Fix possible freed memory accessing

2014-09-18 Thread zhanghailiang
On 2014/9/18 20:17, Eric Blake wrote: On 09/17/2014 09:33 PM, zhanghailiang wrote: If readdir_r fails, error_setg_errno will reference the freed pointer *dirpath*. Signed-off-by: zhanghailiang --- qga/commands-posix.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-)

Re: [Qemu-devel] vhost-user: VHOST_SET_MEM_TABLE, VHOST_SET_VRING_CALL need a reply?

2014-09-18 Thread Linhaifeng
On 2014/9/18 13:16, Michael S. Tsirkin wrote: > On Thu, Sep 18, 2014 at 08:45:37AM +0800, Linhaifeng wrote: >> >> >> On 2014/9/17 17:56, Michael S. Tsirkin wrote: >>> On Wed, Sep 17, 2014 at 05:39:04PM +0800, Linhaifeng wrote: I think maybe is not need for the backend to wait for response. >

Re: [Qemu-devel] [PATCH v2] pci-hotplug-old: avoid lossing error message

2014-09-18 Thread Eric Blake
On 09/18/2014 03:13 AM, arei.gong...@huawei.com wrote: > From: Gonglei > > When scsi_bus_legacy_add_drive() produce error, > we will loss error message. Using error_report > report it. Same typos/grammar issues as I flagged on v1. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt vi

Re: [Qemu-devel] [PATCH] pci-hotplug-old: avoid lossing error message

2014-09-18 Thread Gonglei (Arei)
> -Original Message- > From: Eric Blake [mailto:ebl...@redhat.com] > Sent: Thursday, September 18, 2014 8:22 PM > To: Gonglei (Arei); qemu-devel@nongnu.org > Cc: Huangweidong (C); arm...@redhat.com; m...@redhat.com > Subject: Re: [Qemu-devel] [PATCH] pci-hotplug-old: avoid lossing err

Re: [Qemu-devel] [PATCH] block: Catch simultaneous usage of options and their aliases

2014-09-18 Thread Eric Blake
On 09/18/2014 03:57 AM, Kevin Wolf wrote: > While thinking about precedence of conflicting block device options from > different sources, I noticed that you can specify both an option and its > legacy alias at the same time (e.g. readonly=on,read-only=off). Rather > than specifying the order of pre

Re: [Qemu-devel] [PATCH] pci-hotplug-old: avoid lossing error message

2014-09-18 Thread Eric Blake
On 09/18/2014 02:53 AM, arei.gong...@huawei.com wrote: > From: Gonglei s/lossing/losing/ in the subject. > > When scsi_bus_legacy_add_drive() produce error, s/produce error/produces an error/ > we will loss error message. Using error_report s/loss/lose the/ s/Using error_report/Use error_rep

Re: [Qemu-devel] [INVITE] OVMF BoF session at the KVM Forum 2014

2014-09-18 Thread Laszlo Ersek
On 09/18/14 13:44, Andreas Färber wrote: > Hello Laszlo, > > Am 18.09.2014 um 10:23 schrieb Laszlo Ersek: >> I've been made an offer that I couldn't refuse :) to "organize" a Birds >> of a Feather session concerning OVMF at the KVM Forum 2014. >> >> Interested people, please sign up: >> >> http:

Re: [Qemu-devel] [PATCH] qga: Fix possible freed memory accessing

2014-09-18 Thread Eric Blake
On 09/17/2014 09:33 PM, zhanghailiang wrote: > If readdir_r fails, error_setg_errno will reference the freed > pointer *dirpath*. > > Signed-off-by: zhanghailiang > --- > qga/commands-posix.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > for (;;) { > if (rea

Re: [Qemu-devel] [PATCH v2] qemu-char: Do not disconnect when there's data for reading

2014-09-18 Thread Markus Armbruster
Zifei Tong writes: > After commit 812c1057f6175ac9a9829fa2920a2b5783814193 (Handle G_IO_HUP > in tcp_chr_read for tcp chardev), connections are disconnected when in > G_IO_HUP condition. > > However, it's possible that there is still data for reading in the channel. > In that case, the remaining

[Qemu-devel] [PATCH v2] pc-dimm/numa: Fix stat of memory size in node when hotplug memory

2014-09-18 Thread zhanghailiang
When do memory hotplug, if there is numa node, we should add the memory size to the corresponding node memory size. For now, it mainly affects the result of hmp command "info numa". Signed-off-by: zhanghailiang --- v2: - Don't modify the numa_info.node_mem directly when treating hotplug memory,

Re: [Qemu-devel] [PATCH 3/6] block: Introduce query-block-node

2014-09-18 Thread Markus Armbruster
Kevin Wolf writes: > This new command is a renamed version of query-named-block-nodes > with an additional argument that allows querying only one specific > BlockDriverState instead of getting a list for all of them. > > Signed-off-by: Kevin Wolf > --- > block.c | 15 +

Re: [Qemu-devel] [PATCH 1/6] block/qapi: Add cache information to query-block

2014-09-18 Thread Kevin Wolf
Am 18.09.2014 um 13:04 hat Markus Armbruster geschrieben: > Before this patch, QAPI type BlockdevCacheOptions is used only as a > member of BlockdevOptionsBase. > > BlockdevOptionsBase is a collection configuration settings. > Consequently, it's a complex type whose members are optional exactly >

Re: [Qemu-devel] [PATCH 2/6] block: Add optional device argument to query-block

2014-09-18 Thread Markus Armbruster
Kevin Wolf writes: > This allows querying one specific BlockDriverState instead of a list of > all drives. I've long resisted optional arguments to limit list-valued queries, because I believe the additional interface complexity isn't worth the additional utility. But resistance might be futile

Re: [Qemu-devel] [PATCH v2] pci-hotplug-old: avoid lossing error message

2014-09-18 Thread Gonglei (Arei)
> From: Markus Armbruster [mailto:arm...@redhat.com] > Sent: Thursday, September 18, 2014 7:09 PM > Subject: Re: [Qemu-devel] [PATCH v2] pci-hotplug-old: avoid lossing error > message > > writes: > > > From: Gonglei > > > > When scsi_bus_legacy_add_drive() produce error, > > we will loss error

Re: [Qemu-devel] [INVITE] OVMF BoF session at the KVM Forum 2014

2014-09-18 Thread Andreas Färber
Hello Laszlo, Am 18.09.2014 um 10:23 schrieb Laszlo Ersek: > I've been made an offer that I couldn't refuse :) to "organize" a Birds > of a Feather session concerning OVMF at the KVM Forum 2014. > > Interested people, please sign up: > > http://www.linux-kvm.org/page/KVM_Forum_2014_BOF#OVMF N

Re: [Qemu-devel] [PATCH 1/6] block/qapi: Add cache information to query-block

2014-09-18 Thread Markus Armbruster
Markus Armbruster writes: > Kevin Wolf writes: [...] >> @@ -335,6 +336,13 @@ void hmp_info_block(Monitor *mon, const QDict *qdict) >> continue; >> } >> >> +inserted = info->value->inserted; >> + >> +monitor_printf(mon, "Cache mode: %s%s%s\n", >>

[Qemu-devel] [PATCH v5 1/1] async: aio_context_new(): Handle event_notifier_init failure

2014-09-18 Thread Chrysostomos Nanakos
On a system with a low limit of open files the initialization of the event notifier could fail and QEMU exits without printing any error information to the user. The problem can be easily reproduced by enforcing a low limit of open files and start QEMU with enough I/O threads to hit this limit. T

[Qemu-devel] [PATCH v5 0/1] async: aio_context_new(): Handle event_notifier_init failure

2014-09-18 Thread Chrysostomos Nanakos
v4->v5 -- * Set thread_id before calling aio_context_new(). That way qmp_query_iothreads() will display thread_id -1 for a failed IOThread object than an uninitialized value. * qemu_init_main_loop() will return -EMFILE if aio_context_new() fail. The actual failure reason is placed in the

[Qemu-devel] [PATCH v2] qemu-char: Do not disconnect when there's data for reading

2014-09-18 Thread Zifei Tong
After commit 812c1057f6175ac9a9829fa2920a2b5783814193 (Handle G_IO_HUP in tcp_chr_read for tcp chardev), connections are disconnected when in G_IO_HUP condition. However, it's possible that there is still data for reading in the channel. In that case, the remaining data is not handled. I saw a re

Re: [Qemu-devel] qemu process stuck in Rl state

2014-09-18 Thread Andrey Korolyov
On Thu, Sep 18, 2014 at 2:49 PM, Stefan Hajnoczi wrote: > On Wed, Sep 17, 2014 at 11:56:57PM +0400, Andrey Korolyov wrote: >> I`ve faced an issue with qemu VMs with very large uptime spans - half >> of year or so. They are hanging in running state forever and are not >> killable in any imaginable

Re: [Qemu-devel] [PATCH v2] pci-hotplug-old: avoid lossing error message

2014-09-18 Thread Markus Armbruster
writes: > From: Gonglei > > When scsi_bus_legacy_add_drive() produce error, > we will loss error message. Using error_report > report it. > > Cc: Markus Armbruster > Signed-off-by: Gonglei Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH 1/6] block/qapi: Add cache information to query-block

2014-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Signed-off-by: Kevin Wolf > --- > block/qapi.c | 10 ++ > hmp.c | 8 > qapi/block-core.json | 4 +++- > tests/qemu-iotests/051.out | 1 + > tests/qemu-iotests/067.out | 10 +- > 5 files changed, 27 inserti

Re: [Qemu-devel] qemu process stuck in Rl state

2014-09-18 Thread Stefan Hajnoczi
On Wed, Sep 17, 2014 at 11:56:57PM +0400, Andrey Korolyov wrote: > I`ve faced an issue with qemu VMs with very large uptime spans - half > of year or so. They are hanging in running state forever and are not > killable in any imaginable fashion. Tried to freeze it via freezer cg > without any luck.

Re: [Qemu-devel] [PATCH v4] async: aio_context_new(): Handle event_notifier_init failure

2014-09-18 Thread Stefan Hajnoczi
On Wed, Sep 17, 2014 at 04:48:34PM +0300, Chrysostomos Nanakos wrote: > diff --git a/iothread.c b/iothread.c > index d9403cf..6e394a0 100644 > --- a/iothread.c > +++ b/iothread.c > @@ -17,6 +17,7 @@ > #include "block/aio.h" > #include "sysemu/iothread.h" > #include "qmp-commands.h" > +#include "

Re: [Qemu-devel] [PATCH] block/archipelago: Fix typo in qemu_archipelago_truncate()

2014-09-18 Thread Stefan Hajnoczi
On Tue, Sep 16, 2014 at 12:17:10PM +0300, Chrysostomos Nanakos wrote: > > Chrysostomos Nanakos (1): > block/archipelago: Fix typo in qemu_archipelago_truncate() > > block/archipelago.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > -- > 1.7.10.4 > > Thanks, applied to my b

Re: [Qemu-devel] [PATCH 14/19] dev-hid: convert init to realize

2014-09-18 Thread Gonglei (Arei)
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Thursday, September 18, 2014 6:16 PM > Subject: Re: [PATCH 14/19] dev-hid: convert init to realize > > Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > > From: Gonglei > > > > In this way, all the implementations now use > > err

Re: [Qemu-devel] [PATCH 02/19] usb-bus: convert USBDeviceClass init to realize

2014-09-18 Thread Gonglei (Arei)
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Thursday, September 18, 2014 6:09 PM > Subject: Re: [PATCH 02/19] usb-bus: convert USBDeviceClass init to realize > > Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > > static void usb_msd_password_cb(void *opaque, int err) > >

Re: [Qemu-devel] [PATCH 02/19] usb-bus: convert USBDeviceClass init to realize

2014-09-18 Thread Gonglei (Arei)
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Thursday, September 18, 2014 6:08 PM > Subject: Re: [PATCH 02/19] usb-bus: convert USBDeviceClass init to realize > > Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > > @@ -460,7 +460,7 @@ static void usb_serial_event(void *opaqu

Re: [Qemu-devel] [PATCH 19/19] usb-bus: remove "init" from USBDeviceClass struct

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:33, arei.gong...@huawei.com ha scritto: > From: Gonglei > > All usb-bus devices are realized by realize(), > remove init callback function from USBDeviceClass struct. > > Signed-off-by: Gonglei > --- > hw/usb/bus.c | 2 -- > include/hw/usb.h | 2 -- > 2 files changed, 4 de

Re: [Qemu-devel] [PATCH 01/19] usb-storage: fix possible memory leak and missing error message

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > When scsi_bus_legacy_add_drive() return NULL, meanwhile err will > be not NULL, which will casue memory leak and missing error message. > > Cc: Markus Armbruster > Signed-off-by: Gonglei > --- > hw/usb/dev-storage.c

Re: [Qemu-devel] [PATCH 18/19] usb-mtp: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > Signed-off-by: Gonglei > --- > hw/usb/dev-mtp.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c > index 0820046..108ece8 100644 > --- a/hw/usb/dev-mtp.

Re: [Qemu-devel] [PATCH 17/19] usb-redir: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > In this way, all the implementations now use > error_setg instead of qerror_report for reporting error. > > Signed-off-by: Gonglei > --- > hw/usb/redirect.c | 15 +++ > 1 file changed, 7 insertions(+), 8 d

Re: [Qemu-devel] [PATCH 11/19] dev-bluetooth: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > Signed-off-by: Gonglei > --- > hw/usb/dev-bluetooth.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/hw/usb/dev-bluetooth.c b/hw/usb/dev-bluetooth.c > index a76e581..7db9921 100644 > --

Re: [Qemu-devel] [PATCH 16/19] usb-audio: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > Signed-off-by: Gonglei > --- > hw/usb/dev-audio.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c > index 7b9957b..83ebe83 100644 > --- a/hw/usb/de

Re: [Qemu-devel] [PATCH 03/19] usb-net: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > meanwhile, qerror_report_err() is a transitional interface to > help with converting existing HMP commands to QMP. It should > not be used elsewhere. > > Signed-off-by: Gonglei > --- > hw/usb/dev-network.c | 9 ---

Re: [Qemu-devel] [PATCH 10/19] dev-uas: using error_report instead of fprintf

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > Signed-off-by: Gonglei > --- > hw/usb/dev-uas.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c > index 884c003..1508064 100644 > --- a/hw/usb/d

Re: [Qemu-devel] [PATCH 14/19] dev-hid: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > In this way, all the implementations now use > error_setg instead of error_report for reporting error. > > Signed-off-by: Gonglei > --- > hw/usb/dev-hid.c | 23 +++ > 1 file changed, 11 insertions(

Re: [Qemu-devel] [PATCH 15/19] dev-wacom: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > Signed-off-by: Gonglei > --- > hw/usb/dev-wacom.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c > index 1b73fd0..217d48e 100644 > --- a/hw/usb/de

Re: [Qemu-devel] [PATCH 13/19] usb-ccid: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > Signed-off-by: Gonglei > --- > hw/usb/dev-smartcard-reader.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c > index 470e69f.

Re: [Qemu-devel] [PATCH 07/19] dev-storage: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > In this way, all the implementations now use > error_setg instead of error_report for reporting error. > > Signed-off-by: Gonglei > --- > hw/usb/dev-storage.c | 21 - > 1 file changed, 8 insertions

Re: [Qemu-devel] [PATCH 12/19] dev-serial: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > In this way, all the implementations now use > error_setg instead of error_report for reporting error. > > Signed-off-by: Gonglei > --- > hw/usb/dev-serial.c | 11 +-- > 1 file changed, 5 insertions(+), 6 dele

Re: [Qemu-devel] [PATCH 08/19] dev-storage: usring error_report instead of fprintf/printf

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > Signed-off-by: Gonglei > --- > hw/usb/dev-storage.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c > index 6dc5f47..681959d 100644 > -

Re: [Qemu-devel] [PATCH 09/19] dev-uas: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > Signed-off-by: Gonglei > --- > hw/usb/dev-uas.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c > index 9832385..884c003 100644 > --- a/hw/usb/dev-uas

Re: [Qemu-devel] [PATCH 05/19] libusb: using error_report instead of fprintf

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > Signed-off-by: Gonglei > --- > hw/usb/host-libusb.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c > index 863be64..0650910 100644 > --- a

Re: [Qemu-devel] [PATCH 06/19] usb-hub: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > In this way, all the implementations now use > error_setg instead of error_report for reporting error. > > Signed-off-by: Gonglei > --- > hw/usb/dev-hub.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(

Re: [Qemu-devel] [PATCH 04/19] libusb: convert init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > From: Gonglei > > In this way, all the implementations now use > error_setg instead of error_report for reporting error. > > Signed-off-by: Gonglei > --- > hw/usb/host-libusb.c | 17 - > 1 file changed, 8 insertions(+),

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

2014-09-18 Thread Gu Zheng
Hi Igor, The issues you mentioned in previous comments are fixed in this version. Could please help to review it? Thanks, Gu On 09/17/2014 09:23 AM, Gu Zheng wrote: > Previously we use cpu_added_notifiers to register cpu hotplug notifier > callback > which is not able to pass/handle errors, so

Re: [Qemu-devel] [PATCH 02/19] usb-bus: convert USBDeviceClass init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > static void usb_msd_password_cb(void *opaque, int err) > { > MSDState *s = opaque; > +Error *local_err = NULL; > > -if (!err) > -err = usb_device_attach(&s->dev); > +if (!err) { > +usb_device_attach(&s->

Re: [Qemu-devel] [PATCH 02/19] usb-bus: convert USBDeviceClass init to realize

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 11:32, arei.gong...@huawei.com ha scritto: > @@ -460,7 +460,7 @@ static void usb_serial_event(void *opaque, int event) > break; > case CHR_EVENT_OPENED: > if (!s->dev.attached) { > -usb_device_attach(&s->dev); > +usb_d

[Qemu-devel] [PATCH] block: Catch simultaneous usage of options and their aliases

2014-09-18 Thread Kevin Wolf
While thinking about precedence of conflicting block device options from different sources, I noticed that you can specify both an option and its legacy alias at the same time (e.g. readonly=on,read-only=off). Rather than specifying the order of precedence, we should simply forbid such combinations

Re: [Qemu-devel] migration: qemu-coroutine-lock.c:141: qemu_co_mutex_unlock: Assertion `mutex->locked == 1' failed

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 05:26, Alexey Kardashevskiy ha scritto: > On 09/18/2014 01:07 AM, Stefan Hajnoczi wrote: >> On Wed, Sep 17, 2014 at 2:44 PM, Alexey Kardashevskiy wrote: >>> On 09/17/2014 07:25 PM, Paolo Bonzini wrote: >>> btw any better idea of a hack to try? Testers are pushing me - they want to >>

[Qemu-devel] [PATCH 11/19] dev-bluetooth: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/usb/dev-bluetooth.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-bluetooth.c b/hw/usb/dev-bluetooth.c index a76e581..7db9921 100644 --- a/hw/usb/dev-bluetooth.c +++ b/hw/usb/dev-bluetooth.c @@ -501,7 +501,7 @@ s

[Qemu-devel] [PATCH 07/19] dev-storage: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei --- hw/usb/dev-storage.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storag

[Qemu-devel] [PATCH 05/19] libusb: using error_report instead of fprintf

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/usb/host-libusb.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 863be64..0650910 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -275,7 +275,7 @@ static v

[Qemu-devel] [PATCH 03/19] usb-net: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei meanwhile, qerror_report_err() is a transitional interface to help with converting existing HMP commands to QMP. It should not be used elsewhere. Signed-off-by: Gonglei --- hw/usb/dev-network.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/usb/de

[Qemu-devel] [PATCH 17/19] usb-redir: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of qerror_report for reporting error. Signed-off-by: Gonglei --- hw/usb/redirect.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 95158

[Qemu-devel] [PATCH 09/19] dev-uas: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/usb/dev-uas.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 9832385..884c003 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -892,7 +892,7 @@ static void usb_uas_handle_dest

[Qemu-devel] [PATCH 15/19] dev-wacom: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/usb/dev-wacom.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c index 1b73fd0..217d48e 100644 --- a/hw/usb/dev-wacom.c +++ b/hw/usb/dev-wacom.c @@ -335,14 +335,13 @@ static void usb_waco

[Qemu-devel] [PATCH 13/19] usb-ccid: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/usb/dev-smartcard-reader.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 470e69f..442f487 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartc

[Qemu-devel] [PATCH 12/19] dev-serial: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei --- hw/usb/dev-serial.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 178e

[Qemu-devel] [PATCH 10/19] dev-uas: using error_report instead of fprintf

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/usb/dev-uas.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 884c003..1508064 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -13,6 +13,7 @@ #include "qemu/option.h"

[Qemu-devel] [PATCH 18/19] usb-mtp: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/usb/dev-mtp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 0820046..108ece8 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -1060,7 +1060,7 @@ static void usb_mtp_handle_dat

[Qemu-devel] [PATCH 16/19] usb-audio: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/usb/dev-audio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index 7b9957b..83ebe83 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -628,7 +628,7 @@ static void usb_audio_

[Qemu-devel] [PATCH 14/19] dev-hid: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei --- hw/usb/dev-hid.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index

[Qemu-devel] [PATCH 04/19] libusb: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei --- hw/usb/host-libusb.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c i

[Qemu-devel] [PATCH 08/19] dev-storage: usring error_report instead of fprintf/printf

2014-09-18 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/usb/dev-storage.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 6dc5f47..681959d 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -409,19 +409,19 @@ st

[Qemu-devel] [PATCH 06/19] usb-hub: convert init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei --- hw/usb/dev-hub.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 7492174..8e3f7a8

[Qemu-devel] [PATCH 19/19] usb-bus: remove "init" from USBDeviceClass struct

2014-09-18 Thread arei.gonglei
From: Gonglei All usb-bus devices are realized by realize(), remove init callback function from USBDeviceClass struct. Signed-off-by: Gonglei --- hw/usb/bus.c | 2 -- include/hw/usb.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 12881cb..b375293 1

[Qemu-devel] [PATCH 01/19] usb-storage: fix possible memory leak and missing error message

2014-09-18 Thread arei.gonglei
From: Gonglei When scsi_bus_legacy_add_drive() return NULL, meanwhile err will be not NULL, which will casue memory leak and missing error message. Cc: Markus Armbruster Signed-off-by: Gonglei --- hw/usb/dev-storage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/usb/dev-storage.c

[Qemu-devel] [PATCH 02/19] usb-bus: convert USBDeviceClass init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei Add "realize/unrealize" in USBDeviceClass, which has errp as a parameter. So all the implementations now use error_setg instead of error_report for reporting error. Note: this patch still keep "init" in USBDeviceClass, and call kclass->init in usb_device_realize(), avoid breaking g

[Qemu-devel] [PATCH 00/19] usb: convert device init to realize

2014-09-18 Thread arei.gonglei
From: Gonglei DeviceClass->init is the old interface, let's convert usb devices to the new realize API. In this way, all the implementations now use error_setg instead of qerror_report/error_report for reporting error. Please review, Thanks! Cc: Markus Armbruster Cc: Paolo Bonzini Cc: Gerd H

Re: [Qemu-devel] [PATCH 2/3] scsi: Introduce scsi_req_cancel_async

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 04:36, Fam Zheng ha scritto: > @@ -552,7 +552,7 @@ SCSIRequest *scsi_req_alloc(const SCSIReqOps *reqops, > SCSIDevice *d, > SCSIBus *bus = scsi_bus_from_device(d); > BusState *qbus = BUS(bus); > > -req = g_malloc0(reqops->size); > +req = g_malloc0(reqops ? reqops-

Re: [Qemu-devel] [PATCH 2/3] scsi: Introduce scsi_req_cancel_async

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 04:36, Fam Zheng ha scritto: > +QTAILQ_FOREACH_SAFE(ref, &req->cancel_deps, next, next) { > +SCSIRequest *r = ref->req; > +assert(r->cancel_dep_count); > +r->cancel_dep_count--; > +if (!r->cancel_dep_count && req->bus->info->cancel_dep_complete) { >

[Qemu-devel] [PATCH v2] pci-hotplug-old: avoid lossing error message

2014-09-18 Thread arei.gonglei
From: Gonglei When scsi_bus_legacy_add_drive() produce error, we will loss error message. Using error_report report it. Cc: Markus Armbruster Signed-off-by: Gonglei --- v2: using original condition instead of local_err (Markus) --- hw/pci/pci-hotplug-old.c | 5 - 1 file changed, 4 inserti

Re: [Qemu-devel] [PATCH] usb-storage: fix possible memory leak and missing error message

2014-09-18 Thread Gonglei (Arei)
> >> > --- > >> > hw/usb/dev-storage.c | 11 ++- > >> > 1 file changed, 6 insertions(+), 5 deletions(-) > >> > > >> > diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c > >> > index 5c51ac0..cabd053 100644 > >> > --- a/hw/usb/dev-storage.c > >> > +++ b/hw/usb/dev-storage.c > >> > @@

[Qemu-devel] [INVITE] OVMF BoF session at the KVM Forum 2014

2014-09-18 Thread Laszlo Ersek
Hello All, I've been made an offer that I couldn't refuse :) to "organize" a Birds of a Feather session concerning OVMF at the KVM Forum 2014. Interested people, please sign up: http://www.linux-kvm.org/page/KVM_Forum_2014_BOF#OVMF Everyone else: apologies about the noise. Thanks, Laszlo

Re: [Qemu-devel] [PATCH 1/3] scsi-bus: Unify request unref in scsi_req_cancel

2014-09-18 Thread Paolo Bonzini
Il 18/09/2014 04:36, Fam Zheng ha scritto: > Before, scsi_req_cancel will take ownership of the canceled request and > unref it. This is because we didn't know if AIO CB will be called or not > during the cancelling, so we set the io_canceled flag before calling it, > and skip to unref in the poten

[Qemu-devel] [PATCH] pci-hotplug-old: avoid lossing error message

2014-09-18 Thread arei.gonglei
From: Gonglei When scsi_bus_legacy_add_drive() produce error, we will loss error message. Using error_report report it. Cc: Markus Armbruster Signed-off-by: Gonglei --- hw/pci/pci-hotplug-old.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/pci/pci-hotplug-old.c

Re: [Qemu-devel] [PATCH] usb-storage: fix possible memory leak and missing error message

2014-09-18 Thread Markus Armbruster
"Gonglei (Arei)" writes: >> From: Markus Armbruster [mailto:arm...@redhat.com] >> Sent: Thursday, September 18, 2014 3:38 PM >> Subject: Re: [Qemu-devel] [PATCH] usb-storage: fix possible memory leak and >> missing error message >> >> writes: >> >> > From: Gonglei >> > >> > When scsi_bus_lega

Re: [Qemu-devel] [PATCH v4] Add HMP command "info memory-devices"

2014-09-18 Thread zhugh
Hi, Could anyone help to review this patch? If there was no problem, could help to merge it? thanks! zhu On Mon, 2014-09-15 at 19:31 +0800, Zhu Guihua wrote: > Provides HMP equivalent of QMP query-memory-devices command. > > Signed-off-by: Zhu Guihua > --- > > Changes since v3: > - optimize t

[Qemu-devel] [PATCH v1 1/3] qom: add function to get opaque property in ObjectProperty

2014-09-18 Thread Zhu Guihua
Add object_property_get_opaque() to get opaque property in ObjectProperty. Signed-off-by: Zhu Guihua --- include/qom/object.h | 1 + qom/object.c | 9 + 2 files changed, 10 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index 8a05a81..5d55889 100644 --- a

[Qemu-devel] [PATCH v1 3/3] monitor: add del completion for peripheral device

2014-09-18 Thread Zhu Guihua
Add peripheral_device_del_completion() to let peripheral device del completion be possible. Signed-off-by: Zhu Guihua --- monitor.c | 24 1 file changed, 24 insertions(+) diff --git a/monitor.c b/monitor.c index 667efb7..c0e00e4 100644 --- a/monitor.c +++ b/monitor.c @@

[Qemu-devel] [PATCH v1 2/3] qom: export object_property_is_child()

2014-09-18 Thread Zhu Guihua
Export object_property_is_child() to let it be invoked in other places. Signed-off-by: Zhu Guihua --- include/qom/object.h | 1 + qom/object.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/qom/object.h b/include/qom/object.h index 5d55889..8f27b7c 100644 -

Re: [Qemu-devel] [PATCH] usb-storage: fix possible memory leak and missing error message

2014-09-18 Thread Gonglei (Arei)
> From: Markus Armbruster [mailto:arm...@redhat.com] > Sent: Thursday, September 18, 2014 3:38 PM > Subject: Re: [Qemu-devel] [PATCH] usb-storage: fix possible memory leak and > missing error message > > writes: > > > From: Gonglei > > > > When scsi_bus_legacy_add_drive() return NULL, meanwhile

[Qemu-devel] [PATCH v1 0/3] monitor: add peripheral device del completion support

2014-09-18 Thread Zhu Guihua
After inputting device_del command in monitor, we expect to list all hotpluggable devices automatically by pressing tab key. This patchset provides the function to list all peripheral devices such as memory devices. Zhu Guihua (3): qom: add function to get opaque property in ObjectProperty qom

Re: [Qemu-devel] [PATCH] block: Validate node-name

2014-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 17.09.2014 um 13:49 hat Benoît Canet geschrieben: >> >> >> > +int qemu_opts_id_wellformed(const char *id) >> >> This return 0 and 1 as a bool. >> Could we make the function return bool in the same series ? > > I considered the change (as you probably saw, the new block.

Re: [Qemu-devel] [PATCH] block: vhdx - fix reading beyond pointer during image creation

2014-09-18 Thread Markus Armbruster
Markus Armbruster writes: > Jeff Cody writes: > >> On Wed, Sep 17, 2014 at 08:33:10AM +0200, Markus Armbruster wrote: >>> Jeff Cody writes: >>> >>> > In vhdx_create_metadata(), we allocate 40 bytes to entry_buffer for >>> > the various metadata table entries. However, we write out 64kB from >

[Qemu-devel] vhost-blk didn't work on Windows Guest

2014-09-18 Thread Yonghyeok Lee
Hi, I want to use vhost-blk on Windows 8 guest, but vhost-blk didn't work. When Windows 8 guest was boot-up, vhost-blk couldn't start and Windows 8 guest is hang on boot sequence. I checked vhost-blk (qemu, linux kernel module) and I found out the msi-x is not enabled when Windows guest is bootin

<    1   2   3   4   >