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

2014-09-19 Thread Gerd Hoffmann
static const VMStateDescription vmstate_usb_wacom = { @@ -357,7 +356,7 @@ static void usb_wacom_class_init(ObjectClass *klass, void *data) uc-product_desc = QEMU PenPartner Tablet; uc-usb_desc = desc_wacom; -uc-init = usb_wacom_initfn; +uc-realize

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

2014-09-19 Thread Gonglei (Arei)
Hi, From: Gerd Hoffmann [mailto:kra...@redhat.com] Sent: Friday, September 19, 2014 2:02 PM Subject: Re: [PATCH v2 15/19] dev-wacom: convert init to realize static const VMStateDescription vmstate_usb_wacom = { @@ -357,7 +356,7 @@ static void usb_wacom_class_init(ObjectClass *klass,

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

2014-09-19 Thread Gerd Hoffmann
On Do, 2014-09-18 at 20:47 +0800, arei.gong...@huawei.com wrote: 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

Re: [Qemu-devel] [PATCH] ohci: Convert fprint/DPRINTF/print to traces

2014-09-19 Thread Gerd Hoffmann
On Fr, 2014-09-19 at 13:57 +1000, Alexey Kardashevskiy wrote: On 09/12/2014 06:55 PM, Alexey Kardashevskiy wrote: This converts many kinds of debug prints to traces. This implements packets logging to avoid unnecessary calculations if usb_ohci_td_pkt_short/usb_ohci_td_pkt_long is not

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

2014-09-19 Thread Markus Armbruster
Zifei Tong zifeit...@gmail.com writes: Hi Markus, On Thu, Sep 18, 2014 at 8:11 PM, Markus Armbruster arm...@redhat.com wrote: Zifei Tong zifeit...@gmail.com writes: After commit 812c1057f6175ac9a9829fa2920a2b5783814193 (Handle G_IO_HUP in tcp_chr_read for tcp chardev), connections are

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

2014-09-19 Thread Gonglei (Arei)
From: Gerd Hoffmann [mailto:kra...@redhat.com] Sent: Friday, September 19, 2014 2:06 PM To: Gonglei (Arei) Subject: Re: [PATCH v2 00/19] usb: convert device init to realize On Do, 2014-09-18 at 20:47 +0800, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com

[Qemu-devel] [PATCH v6 1/2] dump: let dump_error return error info to caller

2014-09-19 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 zhang.zhanghaili...@huawei.com --- dump.c | 165

[Qemu-devel] [PATCH v6 2/2] dump: Don't return error code when return an Error object

2014-09-19 Thread zhanghailiang
Functions shouldn't return an error code and an Error object at the same time. Turn all these functions that returning Error object to void. We also judge if a function success or fail by reference to the local_err. Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com --- dump.c | 313

[Qemu-devel] [PATCH v6 0/2] dump: let dump_error return error reason to caller

2014-09-19 Thread zhanghailiang
Hi, In original code, Function dump_error ignores its second parameter which contains error reason, it is better to return the error message to the caller. Here we use error_setg to return the error info to caller. And at the same time, we turn functions like write_elf64_note() to void, Because

Re: [Qemu-devel] [PATCH 0/2] pflash (UEFI varstore) migration shortcut for libvirt

2014-09-19 Thread Alexey Kardashevskiy
On 08/25/2014 08:33 PM, Paolo Bonzini wrote: Il 23/08/2014 12:19, Laszlo Ersek ha scritto: Libvirt is growing support for x86_64 OVMF guests: http://www.redhat.com/archives/libvir-list/2014-August/msg01045.html An important feature of such guests is the persistent store for non-volatile

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

2014-09-19 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. Note: Next, I will post a incremental patch series

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

2014-09-19 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/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

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

2014-09-19 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-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

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

2014-09-19 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

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

2014-09-19 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 v3 07/19] dev-storage: convert init to realize

2014-09-19 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-storage.c | 21 - 1 file

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

2014-09-19 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 v3 09/19] dev-uas: convert init to realize

2014-09-19 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..a97a02f 100644 ---

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

2014-09-19 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 | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index a97a02f..04fc515

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

2014-09-19 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 v3 15/19] dev-wacom: convert init to realize

2014-09-19 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-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..844eafa

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

2014-09-19 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 v3 16/19] usb-audio: convert init to realize

2014-09-19 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-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..67deffe

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

2014-09-19 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 v3 17/19] usb-redir: convert init to realize

2014-09-19 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 Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- hw/usb/redirect.c | 15 +++ 1 file changed, 7

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

2014-09-19 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-smartcard-reader.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c

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

2014-09-19 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 Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- hw/usb/bus.c | 2 -- include/hw/usb.h | 2 -- 2

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

2014-09-19 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 | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-)

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

2014-09-19 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-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 ---

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

2014-09-19 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-serial.c | 18 ++ 1 file

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

2014-09-19 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Il 18/09/2014 19:15, Markus Armbruster ha scritto: Thanks for doing this work. If you can do a bit more of the same, here are a few more device model init() methods I'd love to have converted, because they use qerror_report_err():

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

2014-09-19 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: [Qemu-devel] [PATCH v2] ivshmem: use error_report

2014-09-19 Thread David Marchand
On 09/19/2014 01:17 AM, Andrew Jones wrote: Replace all the fprintf(stderr, ...) calls with error_report. Also make sure exit() consistently uses the error code 1. A few calls used -1. Signed-off-by: Andrew Jones drjo...@redhat.com --- hw/misc/ivshmem.c | 39

[Qemu-devel] [PATCH 1/2] usb-bus: introduce a wrapper function to check speed

2014-09-19 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com In this way, we can check speed directly, don't need call usb_device_attach(), which has other conditions, such as checking the chardev is open. Cc: Paolo Bonzini pbonz...@redhat.com Cc: Gerd Hoffmann kra...@redhat.com Signed-off-by: Gonglei

[Qemu-devel] [PATCH 0/2] usb-serial: only check speed once at realize time

2014-09-19 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com This patch series based on [PATCH v3 00/19] usb: convert device init to realize As Paolo's comments: usb port speed check could be extracted to a separate function usb_check_attach, that is called just once at realize time, even if !s-cs-be_open. Please

[Qemu-devel] [PATCH 2/2] usb-serial: only check speed once at realize time

2014-09-19 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Whatever the chardev is open or not, we should assure the speed is matched each other. So, call usb_check_attach() check speed. And then pass error_abort at all calls to usb_device_attach(). Cc: Paolo Bonzini pbonz...@redhat.com Cc: Gerd Hoffmann

[Qemu-devel] [PATCH] qemu-socket: Polish errors for connect() and listen() failure

2014-09-19 Thread Markus Armbruster
connect() doesn't connect to socket, it connects a socket to an address and, if it's of type SOCK_STREAM, initiates a connection. Scratch to. listen() does set socket to listening mode, but it sounds awkward. Change to listen on socket. Signed-off-by: Markus Armbruster arm...@redhat.com ---

Re: [Qemu-devel] [PATCH v2] ivshmem: use error_report

2014-09-19 Thread zhanghailiang
On 2014/9/19 7:17, Andrew Jones wrote: Replace all the fprintf(stderr, ...) calls with error_report. Also make sure exit() consistently uses the error code 1. A few calls used -1. Signed-off-by: Andrew Jones drjo...@redhat.com --- hw/misc/ivshmem.c | 39 +++

Re: [Qemu-devel] [PATCH 0/6] pc: bring ACPI table size below to 2.0 levels, try fixing -initrd for good

2014-09-19 Thread Gerd Hoffmann
Hi, However, there is another problem. As the ACPI tables grow, we need to move the address at which linuxboot.bin loads the initrd. This address is placed close to the end of memory, but it is QEMU that tells linuxboot.bin where exactly the initrd is to be loaded. And QEMU cannot

Re: [Qemu-devel] [PATCH] qemu-socket: Polish errors for connect() and listen() failure

2014-09-19 Thread Gonglei (Arei)
Subject: [Qemu-devel] [PATCH] qemu-socket: Polish errors for connect() and listen() failure connect() doesn't connect to socket, it connects a socket to an address and, if it's of type SOCK_STREAM, initiates a connection. Scratch to. listen() does set socket to listening mode, but it

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

2014-09-19 Thread Markus Armbruster
zhanghailiang zhang.zhanghaili...@huawei.com writes: The logic of pcmcia_socket_unregister is wrong, which will cause a freed memory accessing Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com --- Hi, The function pcmcia_socket_unregister seemes to be unused, Should it be

Re: [Qemu-devel] [PATCH 0/6] pc: bring ACPI table size below to 2.0 levels, try fixing -initrd for good

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 09:36, Gerd Hoffmann ha scritto: Hmm. That assumes we are running seabios, where we know how much memory we actually need. Right. However, note that this only affects one patch in the series (patch 3). Patches 1-2 are useful to unify Xen-specific behavior with other

Re: [Qemu-devel] [PATCH 0/2] usb-serial: only check speed once at realize time

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 09:25, arei.gong...@huawei.com ha scritto: From: Gonglei arei.gong...@huawei.com This patch series based on [PATCH v3 00/19] usb: convert device init to realize As Paolo's comments: usb port speed check could be extracted to a separate function usb_check_attach, that is

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

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 05:37, zhanghailiang ha scritto: The logic of pcmcia_socket_unregister is wrong, which will cause a freed memory accessing Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com --- Hi, The function pcmcia_socket_unregister seemes to be unused, Should it be removed?

Re: [Qemu-devel] [PATCH 0/2] usb-serial: only check speed once at realize time

2014-09-19 Thread Gonglei (Arei)
Il 19/09/2014 09:25, arei.gong...@huawei.com ha scritto: From: Gonglei arei.gong...@huawei.com This patch series based on [PATCH v3 00/19] usb: convert device init to realize As Paolo's comments: usb port speed check could be extracted to a separate function usb_check_attach,

Re: [Qemu-devel] [PATCH 0/2] pflash (UEFI varstore) migration shortcut for libvirt

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 08:48, Alexey Kardashevskiy ha scritto: Right now we use NVRAM on sPAPR as: -drive id=id3,if=none,file=qemu_nvram.img -global spapr-nvram.drive=id3 So the NVRAM file is BlockDriverState and HMP's migrate -b copies the content just fine. What is missing here? Thanks.

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

2014-09-19 Thread Alexey Kardashevskiy
On 09/18/2014 07:56 PM, Paolo Bonzini wrote: 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

Re: [Qemu-devel] [RFC v2 1/3] blockdev: Add function to search for orphaned drives

2014-09-19 Thread Markus Armbruster
John Snow js...@redhat.com writes: Signed-off-by: John Snow js...@redhat.com --- blockdev.c| 19 +++ include/sysemu/blockdev.h | 1 + vl.c | 5 + 3 files changed, 25 insertions(+) diff --git a/blockdev.c b/blockdev.c index

Re: [Qemu-devel] [PATCH v2] ivshmem: use error_report

2014-09-19 Thread zhanghailiang
On 2014/9/19 15:34, zhanghailiang wrote: On 2014/9/19 7:17, Andrew Jones wrote: Replace all the fprintf(stderr, ...) calls with error_report. Also make sure exit() consistently uses the error code 1. A few calls used -1. Signed-off-by: Andrew Jones drjo...@redhat.com --- hw/misc/ivshmem.c |

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

2014-09-19 Thread Kevin Wolf
Am 16.09.2014 um 14:59 hat Paolo Bonzini geschrieben: Il 16/09/2014 14:52, Kevin Wolf ha scritto: Yes, that's true. We can't fix this problem in qcow2, though, because it's a more general one. I think we must make sure that bdrv_invalidate_cache() doesn't yield. Either by forbidding

[Qemu-devel] [PATCH 0/2] serial: cleanups for physical serial port passthrough

2014-09-19 Thread Paolo Bonzini
Patch 1 ensures that the serial port state is the same at VM startup and after reset. Patch 2 ensures that the poll_msl field is computed at reset time (rather than arbitrarily later), so that it becomes -1 for serial ports backed by PTYs, sockets, etc. Please review! Paolo Paolo Bonzini (2):

[Qemu-devel] [PATCH 2/2] serial: check if backed by a physical serial port at realize time

2014-09-19 Thread Paolo Bonzini
Right now, s-poll_msl may linger at 0 value for an arbitrarily long time, until serial_update_msl is called for the first time. This is unnecessary, and will lead to the s-poll_msl field being unnecessarily migrated. We can call serial_update_msl immediately at realize time (via serial_reset)

[Qemu-devel] [PATCH 1/2] serial: reset state at startup

2014-09-19 Thread Paolo Bonzini
When a serial port is started, its initial state is all zero. Make it consistent with reset state instead. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/char/serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/char/serial.c b/hw/char/serial.c index 764e184..4523ccb 100644

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

2014-09-19 Thread Stefan Hajnoczi
On Wed, Sep 03, 2014 at 09:45:14AM +0100, 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 eric.au...@linaro.org The subject line says RFC. Are you proposing

Re: [Qemu-devel] [PATCH v3 0/3] block: Always compile virtio-blk dataplane

2014-09-19 Thread Paolo Bonzini
Il 10/09/2014 08:17, Fam Zheng ha scritto: v3: Fix -ENOBUFS. v2: Import virtio_vring.h. Fam Zheng (3): virtio: Import virtio_vring.h vring: Better error handling if num is too large block: Always compile virtio-blk dataplane configure | 21 +

[Qemu-devel] [PATCH 1/1] vpc.c: Add VHD resize support

2014-09-19 Thread Lucian Petrut
This patch introduces resize support for dynamic and fixed VHD images. Note that differencing VHD images do not support this operation. In order to resize dynamic VHDs, the BAT region may need to be extended. This may require moving the first data blocks, making room for it to expand. This

Re: [Qemu-devel] [PATCH 1/2] serial: reset state at startup

2014-09-19 Thread Chen, Tiejun
On 2014/9/19 16:54, Paolo Bonzini wrote: When a serial port is started, its initial state is all zero. Make it consistent with reset state instead. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/char/serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/char/serial.c

Re: [Qemu-devel] [RFC PATCH v3] Support vhd type VHD_DIFFERENCING

2014-09-19 Thread Stefan Hajnoczi
On Wed, Sep 10, 2014 at 09:32:15PM +0800, Xiaodong Gong wrote: Now qemu only supports vhd type VHD_FIXED and VHD_DYNAMIC, so qemu can't read snapshot volume of vhd, and can't support other storage features of vhd file. This patch add read parent information in function vpc_open, read bitmap

Re: [Qemu-devel] [RFC PATCH v2 00/10] virtio-scsi: Dataplane on single iothread

2014-09-19 Thread Paolo Bonzini
Il 06/08/2014 07:34, Fam Zheng ha scritto: Hi all, This series adds iothread property to virtio-scsi in a way just similar to virtio-blk, and turns all scsi devices to run on top of it. Example: -object iothread,id=iothread-1 \ -device

Re: [Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-09-19 Thread Paolo Bonzini
Il 06/08/2014 07:35, Fam Zheng ha scritto: This implements the core part of dataplane feature of virtio-scsi. A few fields are added in VirtIOSCSICommon to maintain the dataplane status. These fields are managed by a new source file: virtio-scsi-dataplane.c. Most code in this file will

Re: [Qemu-devel] [RFC PATCH v2 10/10] virtio-scsi: Hook up with dataplane

2014-09-19 Thread Paolo Bonzini
Il 06/08/2014 07:35, Fam Zheng ha scritto: This enables the virtio-scsi-dataplane code by setting the iothread in virtio-scsi device, and makes any function that is called by back from dataplane to cooperate with the caller: they need to be vring/iothread aware when handling the requests and

Re: [Qemu-devel] [RFC v2 2/3] Add units-per-idebus property

2014-09-19 Thread Markus Armbruster
John Snow js...@redhat.com writes: Signed-off-by: John Snow js...@redhat.com --- blockdev.c| 10 -- device-hotplug.c | 2 +- hw/i386/pc_q35.c | 3 ++- include/hw/boards.h | 3 ++- include/sysemu/blockdev.h | 2 +- vl.c

Re: [Qemu-devel] [PATCH] block: delete cow block driver

2014-09-19 Thread Stefan Hajnoczi
On Tue, Sep 16, 2014 at 03:24:24PM +0100, Stefan Hajnoczi wrote: This patch removes support for the cow file format. Normally we do not break backwards compatibility but in this case there is no impact and it is the most logical option. Extraordinary claims require extraordinary evidence so

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

2014-09-19 Thread Stefan Hajnoczi
On Tue, Sep 16, 2014 at 03:12:06PM -0400, Jeff Cody wrote: 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 into the new file. Only write out the correct 40 bytes. Signed-off-by: Jeff Cody

Re: [Qemu-devel] [RFC v2 3/3] ahci: implement -cdrom and -hd[a-d]

2014-09-19 Thread Markus Armbruster
John Snow js...@redhat.com writes: Signed-off-by: John Snow js...@redhat.com --- hw/i386/pc_q35.c | 3 +++ hw/ide/ahci.c| 31 +++ hw/ide/ahci.h| 3 +++ 3 files changed, 37 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index

Re: [Qemu-devel] [PATCH v2 0/9] virtio: fix virtio child recount in transports

2014-09-19 Thread Gonglei (Arei)
Hi, Michael, Paolo and Markus This patch series fix an obvious resource leak issue about virtio devices. Maybe those should be merged in qemu-stable tree IMHO. But the patch serial using property_alias function which introduce a regression (-device FOO,?) such as: before:

Re: [Qemu-devel] [RFC v2 0/3] Q35/AHCI -cdrom/-hda desugaring

2014-09-19 Thread Markus Armbruster
John Snow js...@redhat.com writes: This is an extremely rough/quick sketch of a -cdrom/-hda desugaring fix for Q35/AHCI. Before I spent any time on it, I wanted feedback from Markus or anyone else who had concerns about how this problem would get fixed. This is, then, rough approach #2.

[Qemu-devel] [[PATCH v2] 1/1] vpc.c: Add VHD resize support

2014-09-19 Thread Lucian Petrut
This patch introduces resize support for dynamic and fixed VHD images. Note that differencing VHD images do not support this operation. In order to resize dynamic VHDs, the BAT region may need to be extended. This may require moving the first data blocks, making room for it to expand. This

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

2014-09-19 Thread Stefan Hajnoczi
On Wed, Sep 17, 2014 at 01:31:06PM +0200, Kevin Wolf wrote: The device_name of a BlockDriverState is currently checked because it is always used as a QemuOpts ID and qemu_opts_create() checks whether such IDs are wellformed. node-name is supposed to share the same namespace, but it isn't

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

2014-09-19 Thread Stefan Hajnoczi
On Thu, Sep 18, 2014 at 02:30:48PM +0300, Chrysostomos Nanakos wrote: 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

Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix

2014-09-19 Thread Pavel Dovgaluk
Hi, Paolo! From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini From: Pavel Dovgalyuk pavel.dovga...@ispras.ru This patch postpones vapic_paddr initialization, which is performed during migration. When vapic_paddr is synchronized within the migration process,

Re: [Qemu-devel] [PATCH 00/15] AHCI test helper refactors

2014-09-19 Thread Markus Armbruster
John Snow js...@redhat.com writes: The original version of the AHCI test base which is now staged for being merged, processes the ahci_identify test in a monolithic fashion. In authoring new tests, it became necessary and obvious as to how the operation of this device should be factored

Re: [Qemu-devel] [PATCH v2] vmdk: Fix integer overflow in offset calculation

2014-09-19 Thread Max Reitz
On 15.09.2014 04:32, Fam Zheng wrote: This fixes the bug introduced by commit c6ac36e (vmdk: Optimize cluster allocation). $ ~/build/master/qemu-io /stor/vm/arch.vmdk -c 'write 2G 1k' write failed: Invalid argument Reported-by: Mark Cave-Ayland mark.cave-ayl...@ilande.co.uk Signed-off-by: Fam

Re: [Qemu-devel] [PATCH v2] vmdk: Fix integer overflow in offset calculation

2014-09-19 Thread Max Reitz
On 19.09.2014 13:52, Max Reitz wrote: On 15.09.2014 04:32, Fam Zheng wrote: This fixes the bug introduced by commit c6ac36e (vmdk: Optimize cluster allocation). $ ~/build/master/qemu-io /stor/vm/arch.vmdk -c 'write 2G 1k' write failed: Invalid argument Reported-by: Mark Cave-Ayland

[Qemu-devel] [RFC patch 3/6] vfio: make vfio build on s390

2014-09-19 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch adds some small changes to make vfio build on s390. Signed-off-by: Frank Blaschka frank.blasc...@de.ibm.com --- drivers/vfio/Kconfig |2 +- drivers/vfio/pci/vfio_pci_rdwr.c |8 2 files changed, 9

[Qemu-devel] [RFC patch 1/6] KVM: s390: Enable PCI instructions

2014-09-19 Thread frank . blaschka
Enable PCI instructions for s390 KVM. Signed-off-by: Frank Blaschka frank.blasc...@de.ibm.com --- arch/s390/kvm/kvm-s390.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -1787,7 +1787,7 @@ static int __init

[Qemu-devel] [RFC patch 0/6] vfio based pci pass-through for qemu/KVM on s390

2014-09-19 Thread frank . blaschka
This set of patches implements a vfio based solution for pci pass-through on the s390 platform. The kernel stuff is pretty much straight forward, but qemu needs more work. Most interesting patch is: vfio: make vfio run on s390 platform I hope Alex Alex can give me some guidance how to do the

[Qemu-devel] [RFC patch 5/6] s390: implement pci instruction

2014-09-19 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch implements the s390 pci instructions in qemu. This allows to attach qemu pci devices including vfio. This does not mean the devices are functional but at least detection and config/memory space access is working. Signed-off-by: Frank

[Qemu-devel] [RFC patch 2/6] iommu: add iommu for s390 platform

2014-09-19 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com Add a basic iommu for the s390 platform. The code is pretty simple since on s390 each PCI device has its own virtual io address space starting at the same vio address. For this a domain could hold only one pci device. Also there is no relation

[Qemu-devel] [RFC patch 6/6] vfio: make vfio run on s390 platform

2014-09-19 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com Following changes are made because of platform differences: 1) s390 does not support mmap'ing of PCI BARs so we have to go via slow path 2) no intx support 3) no classic MSIX interrupts. The pci hw understands the concept of requesting MSIX irqs

Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 12:43, Pavel Dovgaluk ha scritto: I've tested this patch with replay. I enabled VM reset (which was previously disabled for replay) while loading the VM state and discovered the following problem. vapic_enable function in kvmapic.c retrieves cpu number with the

[Qemu-devel] [RFC patch 4/6] s390: Add PCI bus support

2014-09-19 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch implements a pci bus for s390x together with some infrastructure to generate and handle hotplug events. It also provides device configuration/unconfiguration via sclp instruction interception. Signed-off-by: Frank Blaschka

Re: [Qemu-devel] [PATCH 1/2] pc-dimm: No numa option shouldn't break hotplug memory feature

2014-09-19 Thread Igor Mammedov
On Wed, 17 Sep 2014 16:32:20 +0800 Hu Tao hu...@cn.fujitsu.com wrote: On Tue, Sep 16, 2014 at 06:39:15PM +0800, zhanghailiang wrote: If we do not configure numa option, memory hotplug should work as well. It should not depend on numa option. Steps to reproduce: (1) Start VM: qemu-kvm

Re: [Qemu-devel] [PATCH 1/2] pc-dimm: No numa option shouldn't break hotplug memory feature

2014-09-19 Thread Igor Mammedov
On Tue, 16 Sep 2014 18:39:15 +0800 zhanghailiang zhang.zhanghaili...@huawei.com wrote: If we do not configure numa option, memory hotplug should work as well. It should not depend on numa option. Steps to reproduce: (1) Start VM: qemu-kvm -m 1024,slots=4,maxmem=8G (2) Hotplug memory It

Re: [Qemu-devel] [PATCH v3 0/3] block: Always compile virtio-blk dataplane

2014-09-19 Thread Stefan Hajnoczi
On Wed, Sep 10, 2014 at 02:17:48PM +0800, Fam Zheng wrote: v3: Fix -ENOBUFS. v2: Import virtio_vring.h. Fam Zheng (3): virtio: Import virtio_vring.h vring: Better error handling if num is too large block: Always compile virtio-blk dataplane configure |

Re: [Qemu-devel] [PATCH 00/15] AHCI test helper refactors

2014-09-19 Thread Stefan Hajnoczi
On Fri, Sep 19, 2014 at 12:53:22PM +0200, Markus Armbruster wrote: John Snow js...@redhat.com writes: The original version of the AHCI test base which is now staged for being merged, processes the ahci_identify test in a monolithic fashion. In authoring new tests, it became necessary

Re: [Qemu-devel] [PATCH 1/2] serial: reset state at startup

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 11:17, Chen, Tiejun ha scritto: On 2014/9/19 16:54, Paolo Bonzini wrote: When a serial port is started, its initial state is all zero. Make it consistent with reset state instead. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/char/serial.c | 1 + 1 file changed,

Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix

2014-09-19 Thread Pavel Dovgaluk
From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Il 19/09/2014 12:43, Pavel Dovgaluk ha scritto: I've tested this patch with replay. I enabled VM reset (which was previously disabled for replay) while loading the VM state and discovered the following

Re: [Qemu-devel] [PATCH 0/6] pc: bring ACPI table size below to 2.0 levels, try fixing -initrd for good

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 09:36, Gerd Hoffmann ha scritto: Hi, However, there is another problem. As the ACPI tables grow, we need to move the address at which linuxboot.bin loads the initrd. This address is placed close to the end of memory, but it is QEMU that tells linuxboot.bin where exactly

Re: [Qemu-devel] [PATCH] virtio-balloon: Fix ballooning not working correctly when hotplug memory

2014-09-19 Thread Igor Mammedov
On Mon, 15 Sep 2014 20:29:38 +0800 zhanghailiang zhang.zhanghaili...@huawei.com wrote: When do memory balloon, it references the ram_size as the real ram size of VM, But here ram_size is not include the hotplugged memory, and the result will be confused. Steps to reproduce: (1)Start VM:

Re: [Qemu-devel] [Spice-devel] screen freezed for 2-3 minutes on spice connect on xen windows 7 domU's with qxl after save/restore

2014-09-19 Thread Fabio Fantoni
Il 12/09/2014 16:46, Fabio Fantoni ha scritto: Il 08/07/2014 12:34, Fabio Fantoni ha scritto: Il 08/07/2014 12:06, Fabio Fantoni ha scritto: Il 08/07/2014 10:53, David Jaša ha scritto: Hi, On Út, 2014-07-08 at 10:13 +0200, Fabio Fantoni wrote: On xen 4.5 (tried with qemu 2.0.0/2.1-rc0, spice

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

2014-09-19 Thread Stefan Hajnoczi
On Wed, Sep 17, 2014 at 01:31:06PM +0200, Kevin Wolf wrote: The device_name of a BlockDriverState is currently checked because it is always used as a QemuOpts ID and qemu_opts_create() checks whether such IDs are wellformed. node-name is supposed to share the same namespace, but it isn't

[Qemu-devel] [PULL 00/01] Adding new syscalls to seccomp whitelist

2014-09-19 Thread Eduardo Otubo
The following changes since commit 10e11f4d2bf171f99c6b13883a510acfbc5dd585: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2014-09-18 20:02:01 +0100) are available in the git repository at: git://github.com/otubo/qemu.git tags/goto-upstream for you to fetch

[Qemu-devel] [PULL 01/01] seccomp: whitelist syscalls fallocate(), fadvise64(), inotify_init1() and inotify_add_watch()

2014-09-19 Thread Eduardo Otubo
From: Philipp Gesang philipp.ges...@intra2net.com fallocate() is needed for snapshotting. If it isn’t whitelisted $ qemu-img create -f qcow2 x.qcow 1G Formatting 'x.qcow', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off $ qemu-kvm -display none

Re: [Qemu-devel] [PATCH] Fix cross compilation (nm command)

2014-09-19 Thread Paolo Bonzini
Il 18/09/2014 22:07, Peter Maydell ha scritto: On 18 September 2014 12:55, Stefan Weil s...@weilnetz.de wrote: Commit c261d774fb9093d00e0938a19f502fb220f62718 added one more binutils tool: nm also needs a cross prefix. Signed-off-by: Stefan Weil s...@weilnetz.de Heh, completely missed that

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

2014-09-19 Thread Igor Mammedov
On Thu, 18 Sep 2014 16:09:32 +0800 zhugh zhugh.f...@cn.fujitsu.com wrote: 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

Re: [Qemu-devel] [PATCH 08/14] ppc: introduce gen_op_mfcr/gen_op_mtcr

2014-09-19 Thread Paolo Bonzini
Il 18/09/2014 23:38, Richard Henderson ha scritto: On 09/15/2014 08:03 AM, Paolo Bonzini wrote: +static inline void gen_op_mfcr(TCGv_i32 dest, int first_cr, int shift) +{ +tcg_gen_shli_i32(dest, cpu_crf[first_cr 2], shift); +} + +static inline void gen_op_mtcr(int first_cr, TCGv_i32

Re: [Qemu-devel] [PATCH 4/4] block: avoid creating oversized writes in multiwrite_merge

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 00:56, Peter Lieven ha scritto: So I think if we treat it just as a hint for multiwrite, we can avoid writing code to split oversized requests. They always worked so far, we can certainly wait until we have a real bug fix. I would not treat this as a hint. I would use it in

Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 07:53, Fam Zheng ha scritto: Any ideas? The obvious, but hardish one is to switch to epoll (one epoll fd per AioContext, plus one for iohandler.c). This would require converting iohandler.c to a GSource. Paolo

Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 14:50, Pavel Dovgaluk ha scritto: vapic_paddr depends on cpu_number. cpu_number cannot be retrieved when do_vapic_enable executes. Thus we cannot reconstruct vapic_paddr in that function. cpu_number will always be zero, because do_vapic_enable is only executed for smp_cpus == 1.

  1   2   3   >