[Qemu-devel] 答复: [PATCH] vnc: add additional key up event before repeated key down

2014-09-18 Thread Li, Guang
-邮件原件- 发件人: qemu-devel-bounces+lig.fnst=cn.fujitsu@nongnu.org [mailto:qemu-devel-bounces+lig.fnst=cn.fujitsu@nongnu.org] 代表 Peter Maydell 发送时间: 2014年9月18日 0:09 收件人: Gerd Hoffmann 抄送: Stefano Stabellini; Markus Armbruster; qemu-devel; xen-de...@lists.xen.org; Anthony

[Qemu-devel] [PULL 1/2] ui/vnc: set TCP_NODELAY

2014-09-18 Thread Gerd Hoffmann
From: Peter Lieven p...@kamp.de we currently have the Nagle algorithm enabled for all outgoing VNC updates. This may delay sensitive updates as mouse movements or typing in the console. As we currently prepare all data in a buffer and then send as much as we can disabling the Nagle algorithm

[Qemu-devel] [PATCH v2] slirp: udp: fix NULL pointer dereference because of uninitialized socket

2014-09-18 Thread Petr Matousek
When guest sends udp packet with source port and source addr 0, uninitialized socket is picked up when looking for matching and already created udp sockets, and later passed to sosendto() where NULL pointer dereference is hit during so-slirp-vnetwork_mask.s_addr access. Fix this by checking that

[Qemu-devel] [PULL 2/2] vnc-tls: Clean up dead store in vnc_set_x509_credential()

2014-09-18 Thread Gerd Hoffmann
From: Markus Armbruster arm...@redhat.com Signed-off-by: Markus Armbruster arm...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/vnc-tls.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c index 6392326..0f59f9b 100644 --- a/ui/vnc-tls.c +++

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

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

Re: [Qemu-devel] [PATCH v2] slirp: udp: fix NULL pointer dereference because of uninitialized socket

2014-09-18 Thread Jan Kiszka
On 2014-09-18 08:35, Petr Matousek wrote: When guest sends udp packet with source port and source addr 0, uninitialized socket is picked up when looking for matching and already created udp sockets, and later passed to sosendto() where NULL pointer dereference is hit during

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When scsi_bus_legacy_add_drive() return NULL, meanwhile err will be not NULL, which will casue memory leak and missing error message. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-storage.c | 11 ++- 1 file changed, 6 insertions(+),

[Qemu-devel] [PULL 0/2] vnc patch queue

2014-09-18 Thread Gerd Hoffmann
/qemu tags/pull-vnc-20140918-1 for you to fetch changes up to 9d64fab42274fb50a39bab184f79d0239596ba4a: vnc-tls: Clean up dead store in vnc_set_x509_credential() (2014-09-18 08:01:53 +0200) vnc: set TCP_NODELAY, cleanup in tlc

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

2014-09-18 Thread Markus Armbruster
zhanghailiang zhang.zhanghaili...@huawei.com writes: If readdir_r fails, error_setg_errno will reference the freed pointer *dirpath*. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com

Re: [Qemu-devel] [PATCH v2] slirp: udp: fix NULL pointer dereference because of uninitialized socket

2014-09-18 Thread Michael S. Tsirkin
On Thu, Sep 18, 2014 at 08:35:37AM +0200, Petr Matousek wrote: When guest sends udp packet with source port and source addr 0, uninitialized socket is picked up when looking for matching and already created udp sockets, and later passed to sosendto() where NULL pointer dereference is hit

Re: [Qemu-devel] [PATCH v3 10/23] block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()

2014-09-18 Thread Markus Armbruster
Benoît Canet benoit.ca...@nodalink.com writes: On Tue, Sep 16, 2014 at 08:12:15PM +0200, Markus Armbruster wrote: Restoring context... @@ -252,14 +253,16 @@ static int milkymist_memcard_init(SysBusDevice *dev) { MilkymistMemcardState *s = MILKYMIST_MEMCARD(dev);

Re: [Qemu-devel] [PATCH v3 13/23] virtio-blk: Rename VirtIOBlkConf variables to conf

2014-09-18 Thread Markus Armbruster
Benoît Canet benoit.ca...@nodalink.com writes: -if (size % dev-blk.conf.logical_block_size) { +if (size % dev-conf.conf.logical_block_size) { This look strange (conf.conf) Yeah, it does. I picked conf anyway, for consistency with the existing similar members of sibling structs

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

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

[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

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

2014-09-18 Thread Markus Armbruster
Markus Armbruster arm...@redhat.com writes: Jeff Cody jc...@redhat.com writes: On Wed, Sep 17, 2014 at 08:33:10AM +0200, Markus Armbruster wrote: Jeff Cody jc...@redhat.com writes: In vhdx_create_metadata(), we allocate 40 bytes to entry_buffer for the various metadata table entries.

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

2014-09-18 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com 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

[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

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 arei.gong...@huawei.com writes: From: Gonglei arei.gong...@huawei.com When

[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 zhugh.f...@cn.fujitsu.com --- 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

[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 zhugh.f...@cn.fujitsu.com --- 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

[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 zhugh.f...@cn.fujitsu.com --- monitor.c | 24 1 file changed, 24 insertions(+) diff --git a/monitor.c b/monitor.c index 667efb7..c0e00e4 100644 ---

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 zhugh.f...@cn.fujitsu.com --- Changes

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

2014-09-18 Thread Markus Armbruster
Gonglei (Arei) arei.gong...@huawei.com 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 arei.gong...@huawei.com writes: From: Gonglei

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When scsi_bus_legacy_add_drive() produce error, we will loss error message. Using error_report report it. Cc: Markus Armbruster arm...@redhat.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/pci/pci-hotplug-old.c | 7 +-- 1 file changed, 5

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

[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] 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 @@ -599,7 +599,6 @@ static int

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When scsi_bus_legacy_add_drive() produce error, we will loss error message. Using error_report report it. Cc: Markus Armbruster arm...@redhat.com Signed-off-by: Gonglei arei.gong...@huawei.com --- v2: using original condition instead of local_err (Markus)

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) { +

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-size :

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com 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

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com 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

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com 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 arm...@redhat.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-storage.c | 2 ++ 1

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

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

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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 +++

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

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

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

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

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

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

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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 +++

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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 +++

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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 @@

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

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

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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 +++

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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 ---

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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 @@

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

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

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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 +++

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com 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 arei.gong...@huawei.com --- hw/usb/dev-network.c | 9 - 1 file changed, 4

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

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

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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 +++

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 a...@ozlabs.ru 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

[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

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); +

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-dev,

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 we

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 arei.gong...@huawei.com In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/host-libusb.c | 17

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 arei.gong...@huawei.com In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-hub.c | 9 - 1 file

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 arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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

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 arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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

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 arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-storage.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/usb/dev-storage.c

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 arei.gong...@huawei.com In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-serial.c | 11 +-- 1

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 arei.gong...@huawei.com In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-storage.c | 21

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 arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-smartcard-reader.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c

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 arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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

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 arei.gong...@huawei.com In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-hid.c | 23

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 arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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

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 arei.gong...@huawei.com 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 arei.gong...@huawei.com

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 arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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

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 arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-bluetooth.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-bluetooth.c

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 arei.gong...@huawei.com In this way, all the implementations now use error_setg instead of qerror_report for reporting error. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/redirect.c | 15 +++

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 arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- 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

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 arei.gong...@huawei.com 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 arm...@redhat.com Signed-off-by:

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 arei.gong...@huawei.com All usb-bus devices are realized by realize(), remove init callback function from USBDeviceClass struct. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/bus.c | 2 --

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 *opaque, int

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 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 arei.gong...@huawei.com In this way, all the implementations

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 Nice

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 arei.gong...@huawei.com writes: From: Gonglei arei.gong...@huawei.com When scsi_bus_legacy_add_drive()

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

2014-09-18 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com 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

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 when

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

2014-09-18 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com 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 kw...@redhat.com --- block.c

[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 zhang.zhanghaili...@huawei.com --- v2: - Don't modify the numa_info.node_mem directly

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

2014-09-18 Thread Markus Armbruster
Zifei Tong zifeit...@gmail.com 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,

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 zhang.zhanghaili...@huawei.com --- qga/commands-posix.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) for

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:

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 arei.gong...@huawei.com 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

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

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 error

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 arei.gong...@huawei.com 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

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. There is

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 zhang.zhanghaili...@huawei.com --- qga/commands-posix.c | 10 ++ 1 file changed, 6

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

2014-09-18 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com 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

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com 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 arei.gong...@huawei.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com ---

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com 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 arm...@redhat.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Paolo Bonzini

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com 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 arm...@redhat.com Cc: Paolo

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- hw/usb/host-libusb.c | 17 - 1 file

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- 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 ---

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com 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

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- hw/usb/dev-hub.c | 9 - 1 file changed, 4

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

2014-09-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- 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

  1   2   3   >