Re: [Qemu-devel] [sheepdog] [PATCH v2 0/9] sheepdog: reconnect server after connection failure

2013-07-25 Thread Liu Yuan
On Thu, Jul 25, 2013 at 02:53:57PM +0900, MORITA Kazutaka wrote: At Thu, 25 Jul 2013 13:25:33 +0800, Liu Yuan wrote: Hello Kazutaka, I have two patches fixing the problems I found on my testing and they are complementary patches. Please consider sending them on top of your patch

Re: [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess

2013-07-25 Thread Jan Kiszka
On 2013-07-25 07:47, Benjamin Herrenschmidt wrote: On Thu, 2013-07-25 at 15:26 +1000, Benjamin Herrenschmidt wrote: On Mon, 2013-07-22 at 10:34 -0500, Anthony Liguori wrote: Really nice series. I'd prefer we simply got rid of the endianness flag entirely but this is a good step.

Re: [Qemu-devel] [PATCH v2 07/11] block: hold hard reference for backup/mirror target

2013-07-25 Thread Fam Zheng
On Tue, 07/23 11:52, Stefan Hajnoczi wrote: On Wed, Jul 17, 2013 at 05:42:12PM +0800, Fam Zheng wrote: Signed-off-by: Fam Zheng f...@redhat.com --- block/backup.c | 3 ++- block/mirror.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) Should we update the blockjob.c

Re: [Qemu-devel] commit 08521e2 breaks SLOF usb boot

2013-07-25 Thread Nikunj A Dadhania
Paolo Bonzini pbonz...@redhat.com writes: Il 14/06/2013 12:32, Nikunj A Dadhania ha scritto: Nikunj A Dadhania nik...@linux.vnet.ibm.com writes: commit 08521e28c7e6e8cc1f53424a0f845f58d2ed9546 Author: Paolo Bonzini pbonz...@redhat.com Date: Fri May 24 12:54:01 2013 +0200 memory: add

Re: [Qemu-devel] [Qemu-trivial] [PATCH] linux-user: correct argument number for sys_mremap and sys_splice

2013-07-25 Thread Michael Tokarev
23.07.2013 21:33, Peter Maydell wrote: On 23 July 2013 18:18, Michael Tokarev m...@tls.msk.ru wrote: 23.07.2013 21:00, Petar Jovanovic wrote: From: Petar Jovanovic petar.jovano...@imgtec.com sys_mremap missed 5th argument (new_address), which caused examples that remap to a specific address

Re: [Qemu-devel] [Qemu-trivial] [PATCH] misc: Fix new typos in comments and strings

2013-07-25 Thread Michael Tokarev
24.07.2013 21:48, Stefan Weil wrote: All these typos were found by codespell. sould - should emperical - empirical intialization - initialization successfuly - successfully gaurantee - guarantee Fix also another error (before before) in the same context. Thanks, applied to the trivial

[Qemu-devel] windows guests: bad mouse responsiveness with gtk

2013-07-25 Thread Michael S. Tsirkin
I've recently tried experimenting with the gtk qemu frontend. Unfortunately with gtk, mouse seems very unresponsive: sometimes I move it and the pointer won't move, or it jumps around, or refuses to go to some parts of the screen. No issues if I supply -sdl. I don't know much about how mouse

[Qemu-devel] [PATCH 1/1] cpu: Correct cpu-hotplug failure

2013-07-25 Thread Chen Fan
When useing x86_64-softmmu --enable-kvm boot qemu, cpu-add command fails to add a vcpu, there show (KVM: setting VAPIC address failed). The reason is that we use an uninitialized cpu-kvm-fd to ioctl. so we move realizing apic to the back of qemu_init_vcpu. Signed-off-by: Chen Fan

Re: [Qemu-devel] [PATCH 04/16] qapi: make visit_type_size fallback to type_int

2013-07-25 Thread Hu Tao
On Tue, Jul 23, 2013 at 06:23:00PM +0200, Igor Mammedov wrote: From: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com Currently visit_type_size checks if the visitor's type_size function pointer is NULL. If not, it calls it, otherwise it calls v-type_uint64(). But neither of these

Re: [Qemu-devel] [PATCH 1/1] cpu: Correct cpu-hotplug failure

2013-07-25 Thread chenfan
On Thu, 2013-07-25 at 14:27 +0800, Chen Fan wrote: When useing x86_64-softmmu --enable-kvm boot qemu, cpu-add command fails to add a vcpu, there show (KVM: setting VAPIC address failed). The reason is that we use an uninitialized cpu-kvm-fd to ioctl. so we move realizing apic to the back

Re: [Qemu-devel] [PATCH 06/16] dimm: implement dimm device abstraction

2013-07-25 Thread Hu Tao
On Tue, Jul 23, 2013 at 06:23:02PM +0200, Igor Mammedov wrote: From: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com ... + +/** + * DimmBus: DimmDevice + * @start: starting physical address, where @DimmDevice is mapped. + * @size: amount of memory mapped at @start. + * @node:

Re: [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess

2013-07-25 Thread Alexey Kardashevskiy
On 07/25/2013 04:04 PM, Jan Kiszka wrote: On 2013-07-25 07:47, Benjamin Herrenschmidt wrote: On Thu, 2013-07-25 at 15:26 +1000, Benjamin Herrenschmidt wrote: On Mon, 2013-07-22 at 10:34 -0500, Anthony Liguori wrote: Really nice series. I'd prefer we simply got rid of the endianness flag

Re: [Qemu-devel] [PATCH v2 01/11] block: replace in_use with refcnt_soft and refcnt_hard

2013-07-25 Thread Stefan Hajnoczi
On Wed, Jul 24, 2013 at 03:44:38PM +0800, Fam Zheng wrote: On Wed, 07/24 09:35, Stefan Hajnoczi wrote: On Wed, Jul 24, 2013 at 08:39:53AM +0800, Fam Zheng wrote: On Tue, 07/23 15:34, Stefan Hajnoczi wrote: On Tue, Jul 23, 2013 at 06:32:25PM +0800, Fam Zheng wrote: On Tue, 07/23

Re: [Qemu-devel] [PATCH v2 07/11] block: hold hard reference for backup/mirror target

2013-07-25 Thread Stefan Hajnoczi
On Thu, Jul 25, 2013 at 02:08:42PM +0800, Fam Zheng wrote: On Tue, 07/23 11:52, Stefan Hajnoczi wrote: On Wed, Jul 17, 2013 at 05:42:12PM +0800, Fam Zheng wrote: Signed-off-by: Fam Zheng f...@redhat.com --- block/backup.c | 3 ++- block/mirror.c | 4 ++-- 2 files changed, 4

Re: [Qemu-devel] [PATCH 0/4] export internal snapshot by qemu-nbd

2013-07-25 Thread Stefan Hajnoczi
On Thu, Jul 25, 2013 at 10:30:49AM +0800, Wenchao Xia wrote: Besides the argument, I think it helps to probe snapshot without qemu-img convert, hope to get comments for the code. Hi Wenchao, Which patch are you referring to? Stefan

[Qemu-devel] [PATCH v3 02/10] iov: handle EOF in iov_send_recv

2013-07-25 Thread MORITA Kazutaka
Without this patch, iov_send_recv() never returns when do_send_recv() returns zero. Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- util/iov.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/util/iov.c b/util/iov.c index

[Qemu-devel] [PATCH v3 10/10] sheepdog: check simultaneous create in resend_aioreq

2013-07-25 Thread MORITA Kazutaka
After reconnection happens, all the inflight requests are moved to the failed request list. As a result, sd_co_rw_vector() can send another create request before resend_aioreq() resends a create request from the failed list. This patch adds a helper function check_simultaneous_create() and

[Qemu-devel] [PATCH v3 01/10] ignore SIGPIPE in qemu-img and qemu-io

2013-07-25 Thread MORITA Kazutaka
This prevents the tools from being stopped when they write data to a closed connection in the other side. Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- qemu-img.c | 4 qemu-io.c | 4 2 files changed, 8 insertions(+)

[Qemu-devel] [PATCH v3 06/10] coroutine: add co_aio_sleep_ns() to allow sleep in block drivers

2013-07-25 Thread MORITA Kazutaka
This helper function behaves similarly to co_sleep_ns(), but the sleeping coroutine will be resumed when using qemu_aio_wait(). Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- include/block/coroutine.h | 8 qemu-coroutine-sleep.c| 47

[Qemu-devel] [PATCH v3 08/10] sheepdog: make add_aio_request and send_aioreq void functions

2013-07-25 Thread MORITA Kazutaka
These functions no longer return errors. We can make them void functions and simplify the codes. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- block/sheepdog.c | 66 +++- 1 file changed, 17 insertions(+), 49 deletions(-)

[Qemu-devel] [PATCH v3 04/10] sheepdog: handle vdi objects in resend_aio_req

2013-07-25 Thread MORITA Kazutaka
The current resend_aio_req() doesn't work when the request is against vdi objects. This fixes the problem. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- block/sheepdog.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PATCH v3 00/10] sheepdog: reconnect server after connection failure

2013-07-25 Thread MORITA Kazutaka
Currently, if a sheepdog server exits, all the connecting VMs need to be restarted. This series implements a feature to reconnect the server, and enables us to do online sheepdog upgrade and avoid restarting VMs when sheepdog servers crash unexpectedly. v3: - Check return values of

[Qemu-devel] [PATCH v3 03/10] sheepdog: check return values of qemu_co_recv/send correctly

2013-07-25 Thread MORITA Kazutaka
If qemu_co_recv/send doesn't return the specified length, it means that an error happened. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- block/sheepdog.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c

[Qemu-devel] [PATCH v3 05/10] sheepdog: reload inode outside of resend_aioreq

2013-07-25 Thread MORITA Kazutaka
This prepares for using resend_aioreq() after reconnecting to the sheepdog server. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- block/sheepdog.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/block/sheepdog.c

[Qemu-devel] [PATCH v3 07/10] sheepdog: try to reconnect to sheepdog after network error

2013-07-25 Thread MORITA Kazutaka
This introduces a failed request queue and links all the inflight requests to the list after network error happens. After QEMU reconnects to the sheepdog server successfully, the sheepdog block driver will retry all the requests in the failed queue. Signed-off-by: MORITA Kazutaka

[Qemu-devel] [PATCH v3 09/10] sheepdog: cancel aio requests if possible

2013-07-25 Thread MORITA Kazutaka
This patch tries to cancel aio requests in pending queue and failed queue. When the sheepdog driver cannot cancel the requests, it waits for them to be completed. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- block/sheepdog.c | 70

Re: [Qemu-devel] [PATCH 1/1] cpu: Correct cpu-hotplug failure

2013-07-25 Thread Andreas Färber
Hi, Am 25.07.2013 08:27, schrieb Chen Fan: When useing x86_64-softmmu --enable-kvm boot qemu, cpu-add command fails to add a vcpu, there show (KVM: setting VAPIC address failed). The reason is that we use an uninitialized cpu-kvm-fd to ioctl. so we move realizing apic to the back of

Re: [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess

2013-07-25 Thread Paolo Bonzini
Il 25/07/2013 07:47, Benjamin Herrenschmidt ha scritto: On Thu, 2013-07-25 at 15:26 +1000, Benjamin Herrenschmidt wrote: On Mon, 2013-07-22 at 10:34 -0500, Anthony Liguori wrote: Really nice series. I'd prefer we simply got rid of the endianness flag entirely but this is a good step.

Re: [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess

2013-07-25 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 25/07/2013 08:04, Jan Kiszka ha scritto: On 2013-07-25 07:47, Benjamin Herrenschmidt wrote: On Thu, 2013-07-25 at 15:26 +1000, Benjamin Herrenschmidt wrote: On Mon, 2013-07-22 at 10:34 -0500, Anthony Liguori wrote: Really nice series. I'd

Re: [Qemu-devel] [PATCH v3 03/10] sheepdog: check return values of qemu_co_recv/send correctly

2013-07-25 Thread Liu Yuan
On Thu, Jul 25, 2013 at 05:31:58PM +0900, MORITA Kazutaka wrote: If qemu_co_recv/send doesn't return the specified length, it means that an error happened. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- block/sheepdog.c | 16 1 file changed, 8

Re: [Qemu-devel] [PATCH v2 3/8] virtio: Add support for guest setting of queue size

2013-07-25 Thread Peter Maydell
On 25 July 2013 06:38, Michael S. Tsirkin m...@redhat.com wrote: On Fri, Jul 12, 2013 at 09:36:57PM +0100, Peter Maydell wrote: The MMIO virtio transport spec allows the guest to tell the host how large the queue size is. Add virtio_queue_set_num() function which implements this in the QEMU

Re: [Qemu-devel] [sheepdog] [PATCH v3 03/10] sheepdog: check return values of qemu_co_recv/send correctly

2013-07-25 Thread MORITA Kazutaka
At Thu, 25 Jul 2013 16:46:36 +0800, Liu Yuan wrote: On Thu, Jul 25, 2013 at 05:31:58PM +0900, MORITA Kazutaka wrote: If qemu_co_recv/send doesn't return the specified length, it means that an error happened. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp ---

Re: [Qemu-devel] [PATCH v3 03/10] sheepdog: check return values of qemu_co_recv/send correctly

2013-07-25 Thread Liu Yuan
On Thu, Jul 25, 2013 at 04:46:36PM +0800, Liu Yuan wrote: On Thu, Jul 25, 2013 at 05:31:58PM +0900, MORITA Kazutaka wrote: If qemu_co_recv/send doesn't return the specified length, it means that an error happened. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp ---

Re: [Qemu-devel] [PATCH] [RFC] aio/timers: Drop alarm timers; introduce QEMUClock to AioContext; run timers in aio_poll

2013-07-25 Thread Stefan Hajnoczi
On Fri, Jul 19, 2013 at 06:26:23PM +0100, Alex Bligh wrote: [ This is a patch for RFC purposes only. It is compile tested on Linux x86_64 only and passes make check (or rather did before make check started dying in the boot order test - different bug). I'd like to know whether I'm going in

Re: [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess

2013-07-25 Thread Benjamin Herrenschmidt
On Thu, 2013-07-25 at 10:40 +0200, Paolo Bonzini wrote: In any case, let me reinforce point 6 above. The patches were not reverted because nobody posted the patches to do so. Until someone does so, it is basically Anthony's call. If he trusts people to fix the whole thing, he has no reason

[Qemu-devel] [PATCH 4/8] block: make bdrv_delete() static

2013-07-25 Thread Fam Zheng
Manage BlockDriverState lifecycle with refcnt, so bdrv_delete() is no longer public and should be called by bdrv_unref() if refcnt is decreased to 0. This is an identical change because effectively, there's no multiple reference of BDS now: no caller of bdrv_ref() yet, only bdrv_new() sets

[Qemu-devel] [PATCH 1/8] vvfat: use bdrv_new() to allocate BlockDriverState

2013-07-25 Thread Fam Zheng
we need bdrv_new() to properly initialize BDS, don't allocate memory manually. Signed-off-by: Fam Zheng f...@redhat.com --- block/vvfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vvfat.c b/block/vvfat.c index cd3b8ed..a827d91 100644 --- a/block/vvfat.c +++

Re: [Qemu-devel] [PATCH] [RFC] aio/timers: Drop alarm timers; introduce QEMUClock to AioContext; run timers in aio_poll

2013-07-25 Thread Stefan Hajnoczi
On Fri, Jul 19, 2013 at 06:26:23PM +0100, Alex Bligh wrote: [ This is a patch for RFC purposes only. It is compile tested on Linux x86_64 only and passes make check (or rather did before make check started dying in the boot order test - different bug). I'd like to know whether I'm going in

[Qemu-devel] [PATCH 6/8] migration: omit drive ref as we have bdrv_ref now

2013-07-25 Thread Fam Zheng
block-migration.c does not actually use DriveInfo anywhere. Hence it's safe to drive ref code, we really only care about referencing BDS. Signed-off-by: Fam Zheng f...@redhat.com --- block-migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block-migration.c

[Qemu-devel] [PATCH 5/8] block: use BlockDriverState refcnt for device attach/detach

2013-07-25 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index dfa4be0..ce4d94b 100644 --- a/block.c +++ b/block.c @@ -1620,11 +1620,13 @@ int bdrv_attach_dev(BlockDriverState *bs, void *dev) return

Re: [Qemu-devel] [PATCH v3 09/10] sheepdog: cancel aio requests if possible

2013-07-25 Thread Liu Yuan
On Thu, Jul 25, 2013 at 05:32:04PM +0900, MORITA Kazutaka wrote: This patch tries to cancel aio requests in pending queue and failed queue. When the sheepdog driver cannot cancel the requests, it waits for them to be completed. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp

[Qemu-devel] [PATCH 7/8] xen_disk: simplify blk_disconnect with refcnt

2013-07-25 Thread Fam Zheng
We call bdrv_attach_dev when initializing whether or not bs is created locally, so call bdrv_detach_dev and let the refcnt handle the lifecycle. Signed-off-by: Fam Zheng f...@redhat.com --- hw/block/xen_disk.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH 8/8] nbd: use BlockDriverState refcnt

2013-07-25 Thread Fam Zheng
Previously, nbd calls drive_get_ref() on the drive of bs. A BDS doesn't always have associated dinfo, which nbd doesn't care either. We already have BDS ref count, so use it to make it safe for a BDS w/o blockdev. Signed-off-by: Fam Zheng f...@redhat.com --- blockdev-nbd.c | 10 +- nbd.c

Re: [Qemu-devel] [PATCHv2] [RFC 1/7] aio / timers: Remove alarm timers

2013-07-25 Thread Stefan Hajnoczi
On Sat, Jul 20, 2013 at 07:06:37PM +0100, Alex Bligh wrote: Remove alarm timers from qemu-timers.c in anticipation of using timeouts for g_poll / p_poll instead. Signed-off-by: Alex Bligh a...@alex.org.uk --- include/qemu/timer.h |2 - main-loop.c |4 - qemu-timer.c

Re: [Qemu-devel] [PATCHv2] [RFC 1/7] aio / timers: Remove alarm timers

2013-07-25 Thread Paolo Bonzini
Il 25/07/2013 11:10, Stefan Hajnoczi ha scritto: On Sat, Jul 20, 2013 at 07:06:37PM +0100, Alex Bligh wrote: Remove alarm timers from qemu-timers.c in anticipation of using timeouts for g_poll / p_poll instead. Signed-off-by: Alex Bligh a...@alex.org.uk --- include/qemu/timer.h |2 -

Re: [Qemu-devel] [PATCH v2 3/8] virtio: Add support for guest setting of queue size

2013-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2013 at 09:50:21AM +0100, Peter Maydell wrote: On 25 July 2013 06:38, Michael S. Tsirkin m...@redhat.com wrote: On Fri, Jul 12, 2013 at 09:36:57PM +0100, Peter Maydell wrote: The MMIO virtio transport spec allows the guest to tell the host how large the queue size is. Add

Re: [Qemu-devel] [PATCH v3 07/10] sheepdog: try to reconnect to sheepdog after network error

2013-07-25 Thread Liu Yuan
On Thu, Jul 25, 2013 at 05:32:02PM +0900, MORITA Kazutaka wrote: This introduces a failed request queue and links all the inflight requests to the list after network error happens. After QEMU reconnects to the sheepdog server successfully, the sheepdog block driver will retry all the requests

Re: [Qemu-devel] [PATCH 1/1] cpu: Correct cpu-hotplug failure

2013-07-25 Thread chenfan
On Thu, 2013-07-25 at 10:39 +0200, Andreas Färber wrote: Hi, Am 25.07.2013 08:27, schrieb Chen Fan: When useing x86_64-softmmu --enable-kvm boot qemu, cpu-add command fails to add a vcpu, there show (KVM: setting VAPIC address failed). The reason is that we use an uninitialized

Re: [Qemu-devel] [libvirt] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-25 Thread Andreas Färber
Am 24.07.2013 20:25, schrieb Eduardo Habkost: In addition to the -cpu host KVM initialization problem, this is an additional problem with the current interfaces provided by QEMU: 1) libvirt needs to query data that depend on chosen machine-type and CPU model 2) Some machine-type behavior

Re: [Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-25 Thread Stefan Hajnoczi
On Sat, Jul 20, 2013 at 07:06:38PM +0100, Alex Bligh wrote: Add utility functions to qemu-timer.c for nanosecond timing. Ensure we keep track of all QEMUClocks on a list. Add qemu_clock_deadline_ns and qemu_clock_deadline_all_ns to calculate deadlines to nanosecond accuracy. Add utility

[Qemu-devel] [PATCH 3/8] block: implement reference count for BlockDriverState

2013-07-25 Thread Fam Zheng
Introduce bdrv_ref/bdrv_unref to manage the lifecycle of BlockDriverState. They are unused for now but will used to replace bdrv_delete() later. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 22 ++ include/block/block.h | 2 ++

Re: [Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-25 Thread Stefan Hajnoczi
On Sat, Jul 20, 2013 at 07:06:38PM +0100, Alex Bligh wrote: +gint qemu_g_poll_ns(GPollFD *fds, guint nfds, int64_t timeout); You didn't define the function in this patch.

[Qemu-devel] [PATCH 2/8] iscsi: use bdrv_new() instead of stack structure

2013-07-25 Thread Fam Zheng
BlockDriverState structure needs bdrv_new() to initialize refcnt, don't allocate a local structure variable and memset to 0, becasue with coming refcnt implementation, bdrv_unref will crash if bs-refcnt not initialized to 1. Signed-off-by: Fam Zheng f...@redhat.com --- block/iscsi.c | 14

[Qemu-devel] [PATCH 0/8] Implement reference count for BlockDriverState

2013-07-25 Thread Fam Zheng
BlockDriverState lifecycle management is needed by future features such as image fleecing and blockdev-add. This series adds reference count to BlockDriverState. The first two patches clean up two odd BlockDriverState use cases, so all code uses bdrv_new() to create BlockDriverState instance.

Re: [Qemu-devel] [PATCH v3 11/14] piix: APIs for pc guest info

2013-07-25 Thread Michael S. Tsirkin
On Wed, Jul 24, 2013 at 07:02:13PM +0300, Michael S. Tsirkin wrote: This adds APIs that will be used to fill in guest info table, implemented using QOM, to various piix components. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/acpi/piix4.c | 29

Re: [Qemu-devel] [PATCHv2] [RFC 6/7] aio / timers: Switch to ppoll, run AioContext timers in aio_poll/aio_dispatch

2013-07-25 Thread Stefan Hajnoczi
On Sat, Jul 20, 2013 at 07:06:42PM +0100, Alex Bligh wrote: @@ -245,11 +249,13 @@ bool aio_poll(AioContext *ctx, bool blocking) node-pfd.revents = pfd-revents; } } -if (aio_dispatch(ctx)) { -progress = true; -} +} + +

Re: [Qemu-devel] [PATCH v2 3/8] virtio: Add support for guest setting of queue size

2013-07-25 Thread Peter Maydell
On 25 July 2013 10:03, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Jul 25, 2013 at 09:50:21AM +0100, Peter Maydell wrote: On 25 July 2013 06:38, Michael S. Tsirkin m...@redhat.com wrote: On Fri, Jul 12, 2013 at 09:36:57PM +0100, Peter Maydell wrote: The MMIO virtio transport spec

Re: [Qemu-devel] [PATCHv2] [RFC 1/7] aio / timers: Remove alarm timers

2013-07-25 Thread Alex Bligh
--On 25 July 2013 11:11:22 +0200 Paolo Bonzini pbonz...@redhat.com wrote: If this function is supposed to work when called from another thread (e.g. vcpu thread), then you need to call qemu_notify_event(). For AioContext clocks that should be aio_notify() with the relevant AioContext, but we

Re: [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess

2013-07-25 Thread Peter Maydell
On 25 July 2013 10:00, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: That's fine, I know you can fix stuff :-) I'm just really annoyed that upstream qemu remained broken for so long (and still is) while the whole thing derailed into a mostly pointless discussion on endianness and

Re: [Qemu-devel] [PATCHv2] [RFC 1/7] aio / timers: Remove alarm timers

2013-07-25 Thread Paolo Bonzini
Il 25/07/2013 11:37, Alex Bligh ha scritto: Stefan, This should be one of the last patches so qemu.git remains bisectable. Only remove the alarm timer once the event loops are already using the timeout argument. OK @@ -245,11 +82,7 @@ static QEMUClock *qemu_new_clock(int type) void

Re: [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess

2013-07-25 Thread Paolo Bonzini
Il 25/07/2013 11:38, Peter Maydell ha scritto: On 25 July 2013 10:00, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: That's fine, I know you can fix stuff :-) I'm just really annoyed that upstream qemu remained broken for so long (and still is) while the whole thing derailed into a

Re: [Qemu-devel] [libvirt] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-25 Thread Daniel P. Berrange
On Wed, Jul 24, 2013 at 03:25:19PM -0300, Eduardo Habkost wrote: On Tue, Jul 23, 2013 at 07:32:46PM +0200, Jiri Denemark wrote: On Tue, Jul 23, 2013 at 19:28:38 +0200, Jiri Denemark wrote: On Tue, Jul 23, 2013 at 17:32:42 +0100, Daniel Berrange wrote: On Tue, Jul 23, 2013 at 06:11:33PM

Re: [Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-25 Thread Alex Bligh
Stefan, --On 25 July 2013 11:19:29 +0200 Stefan Hajnoczi stefa...@gmail.com wrote: On Sat, Jul 20, 2013 at 07:06:38PM +0100, Alex Bligh wrote: Add utility functions to qemu-timer.c for nanosecond timing. Ensure we keep track of all QEMUClocks on a list. Add qemu_clock_deadline_ns and

Re: [Qemu-devel] [PATCHv2] [RFC 2/7] aio / timers: qemu-timer.c utility functions and add list of clocks

2013-07-25 Thread Alex Bligh
--On 25 July 2013 11:21:33 +0200 Stefan Hajnoczi stefa...@gmail.com wrote: On Sat, Jul 20, 2013 at 07:06:38PM +0100, Alex Bligh wrote: +gint qemu_g_poll_ns(GPollFD *fds, guint nfds, int64_t timeout); You didn't define the function in this patch. Will fix -- Alex Bligh

Re: [Qemu-devel] [PATCHv2] [RFC 1/7] aio / timers: Remove alarm timers

2013-07-25 Thread Alex Bligh
Stefan, This should be one of the last patches so qemu.git remains bisectable. Only remove the alarm timer once the event loops are already using the timeout argument. OK @@ -245,11 +82,7 @@ static QEMUClock *qemu_new_clock(int type) void qemu_clock_enable(QEMUClock *clock, bool enabled)

[Qemu-devel] [PATCH v2] cpu: Correct cpu-hotplug failure

2013-07-25 Thread Chen Fan
v1-v2: Change cpu_apic_realize to post_vcpu_init. When useing x86_64-softmmu --enable-kvm boot qemu, cpu-add command fails to add a vcpu, there show (KVM: setting VAPIC address failed). The reason is that we use an uninitialized cpu-kvm-fd to ioctl. so we move realizing apic to the back of

Re: [Qemu-devel] [PATCHv2] [RFC 0/7] aio / timers: Add AioContext timers and use ppoll

2013-07-25 Thread Stefan Hajnoczi
On Sat, Jul 20, 2013 at 07:06:36PM +0100, Alex Bligh wrote: This patch series adds support for timers attached to an AioContext clock which get called within aio_poll. In doing so it removes alarm timers and moves to use ppoll where possible. This patch set 'sort of' passes make check (see

Re: [Qemu-devel] [PATCH 1/1] cpu: Correct cpu-hotplug failure

2013-07-25 Thread Igor Mammedov
On Thu, 25 Jul 2013 10:39:54 +0200 Andreas Färber afaer...@suse.de wrote: Hi, Am 25.07.2013 08:27, schrieb Chen Fan: When useing x86_64-softmmu --enable-kvm boot qemu, cpu-add command fails to add a vcpu, there show (KVM: setting VAPIC address failed). The reason is that we use an

Re: [Qemu-devel] [PATCH v2] cpu: Correct cpu-hotplug failure

2013-07-25 Thread Igor Mammedov
On Thu, 25 Jul 2013 17:49:11 +0800 Chen Fan chen.fan.f...@cn.fujitsu.com wrote: v1-v2: Change cpu_apic_realize to post_vcpu_init. When useing x86_64-softmmu --enable-kvm boot qemu, cpu-add command fails to add a vcpu, ^^^ using there show (KVM: setting VAPIC address failed). The

Re: [Qemu-devel] [ [PATCH]] nVMX: Initialize IA32_FEATURE_CONTROL MSR in reset and migration

2013-07-25 Thread Gleb Natapov
On Sun, Jul 07, 2013 at 11:13:37PM +0800, Arthur Chunqi Li wrote: The recent KVM patch adds IA32_FEATURE_CONTROL support. QEMU needs to clear this MSR when reset vCPU and keep the value of it when migration. This patch add this feature. Signed-off-by: Arthur Chunqi Li yzt...@gmail.com

[Qemu-devel] [PATCH] KVM: always use MADV_DONTFORK

2013-07-25 Thread Andrea Arcangeli
MADV_DONTFORK prevents fork to fail with -ENOMEM if the default overcommit heuristics decides there's too much anonymous virtual memory allocated. If the KVM secondary MMU is synchronized with MMU notifiers or not, doesn't make a difference in that regard. Secondly it's always more efficient to

Re: [Qemu-devel] [PATCH] kvm: migrate vPMU state

2013-07-25 Thread Gleb Natapov
On Wed, Jul 24, 2013 at 05:01:15PM +0200, Andreas Färber wrote: Am 24.07.2013 16:37, schrieb Paolo Bonzini: This requires kernel 3.10 but it is otherwise quite simple to do. The kernel pays attention to MSRs writes that are host initiated, and disables all side effects of the PMU registers

Re: [Qemu-devel] [PATCH] KVM: always use MADV_DONTFORK

2013-07-25 Thread Peter Maydell
On 25 July 2013 11:11, Andrea Arcangeli aarca...@redhat.com wrote: diff --git a/exec.c b/exec.c index c99a883..d3bb58d 100644 --- a/exec.c +++ b/exec.c @@ -1162,6 +1162,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host, qemu_ram_setup_dump(new_block-host, size);

Re: [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess

2013-07-25 Thread Benjamin Herrenschmidt
On Thu, 2013-07-25 at 10:38 +0100, Peter Maydell wrote: On 25 July 2013 10:00, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: That's fine, I know you can fix stuff :-) I'm just really annoyed that upstream qemu remained broken for so long (and still is) while the whole thing

Re: [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess

2013-07-25 Thread Benjamin Herrenschmidt
On Thu, 2013-07-25 at 11:40 +0200, Paolo Bonzini wrote: I think that for the minor architectures we just have to make sure that we do yell loudly when things are broken, because the nature of things is that people won't notice. Maybe we should have a qemu-urgent list to parallel

Re: [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess

2013-07-25 Thread Paolo Bonzini
Il 25/07/2013 12:23, Benjamin Herrenschmidt ha scritto: On Thu, 2013-07-25 at 10:38 +0100, Peter Maydell wrote: On 25 July 2013 10:00, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: That's fine, I know you can fix stuff :-) I'm just really annoyed that upstream qemu remained broken

Re: [Qemu-devel] [PATCH] kvm: migrate vPMU state

2013-07-25 Thread Paolo Bonzini
Il 25/07/2013 12:14, Gleb Natapov ha scritto: On Wed, Jul 24, 2013 at 05:01:15PM +0200, Andreas Färber wrote: Am 24.07.2013 16:37, schrieb Paolo Bonzini: This requires kernel 3.10 but it is otherwise quite simple to do. The kernel pays attention to MSRs writes that are host initiated, and

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Gerd Hoffmann
On 07/24/13 18:02, Michael S. Tsirkin wrote: Add API to find pvpanic device and get its io port. Will be used to fill in guest info structure. +uint16_t pvpanic_port(void) +{ +Object *o = object_resolve_path_type(, TYPE_ISA_PVPANIC_DEVICE, NULL); +PVPanicState *s; +if (!o) { +

Re: [Qemu-devel] [PATCH] KVM: always use MADV_DONTFORK

2013-07-25 Thread Andrea Arcangeli
On Thu, Jul 25, 2013 at 11:16:44AM +0100, Peter Maydell wrote: On 25 July 2013 11:11, Andrea Arcangeli aarca...@redhat.com wrote: diff --git a/exec.c b/exec.c index c99a883..d3bb58d 100644 --- a/exec.c +++ b/exec.c @@ -1162,6 +1162,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2013 at 12:29:52PM +0200, Gerd Hoffmann wrote: On 07/24/13 18:02, Michael S. Tsirkin wrote: Add API to find pvpanic device and get its io port. Will be used to fill in guest info structure. +uint16_t pvpanic_port(void) +{ +Object *o = object_resolve_path_type(,

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2013 at 01:55:26PM +0300, Michael S. Tsirkin wrote: On Thu, Jul 25, 2013 at 12:29:52PM +0200, Gerd Hoffmann wrote: On 07/24/13 18:02, Michael S. Tsirkin wrote: Add API to find pvpanic device and get its io port. Will be used to fill in guest info structure. +uint16_t

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Gerd Hoffmann
Hi, I can change the implementation but I don't think it's a good idea to copy property names around: it's too fragile, compiler won't warn us if we change the name or value semantics, I'm not worried. Changing the strings will break the command line interface too (qemu -device

[Qemu-devel] [PATCH] xhci: handle USB_RET_IOERROR

2013-07-25 Thread Gerd Hoffmann
https://bugzilla.redhat.com/show_bug.cgi?id=980377 Cc: qemu-sta...@nongnu.org Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/hcd-xhci.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 45a3a07..4450be0 100644 --- a/hw/usb/hcd-xhci.c

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2013 at 01:05:12PM +0200, Gerd Hoffmann wrote: Hi, I can change the implementation but I don't think it's a good idea to copy property names around: it's too fragile, compiler won't warn us if we change the name or value semantics, I'm not worried. Changing the

Re: [Qemu-devel] [PATCH V6 1/3] Implement sync modes for drive-backup.

2013-07-25 Thread Kevin Wolf
Am 25.07.2013 um 00:01 hat Ian Main geschrieben: On Wed, Jul 24, 2013 at 02:32:53PM -0600, Eric Blake wrote: On 07/24/2013 04:55 AM, Kevin Wolf wrote: Unconditionally overriding format for NEW_IMAGE_MODE_EXISTING is definitely wrong. It's the user's choice which COW format to use for

Re: [Qemu-devel] VM can not boot after commit 235e898

2013-07-25 Thread Gleb Natapov
On Wed, Jul 24, 2013 at 10:25:49PM +0200, Alexander Graf wrote: On 07/24/2013 06:53 PM, Gleb Natapov wrote: On Wed, Jul 24, 2013 at 06:26:41PM +0200, Alexander Graf wrote: before. Are you saying configuring BIOS memslot differently solves the problem? Git bisect pointed to the commit

Re: [Qemu-devel] [PATCH 04/16] qapi: make visit_type_size fallback to type_int

2013-07-25 Thread Igor Mammedov
On Thu, 25 Jul 2013 14:41:36 +0800 Hu Tao hu...@cn.fujitsu.com wrote: On Tue, Jul 23, 2013 at 06:23:00PM +0200, Igor Mammedov wrote: From: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com Currently visit_type_size checks if the visitor's type_size function pointer is NULL. If

Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff

2013-07-25 Thread Stefan Hajnoczi
On Tue, Jul 23, 2013 at 10:51:06AM +0800, liu ping fan wrote: On Mon, Jul 22, 2013 at 2:28 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2013-07-22 06:38, liu ping fan wrote: On Sun, Jul 21, 2013 at 5:53 PM, Alex Bligh a...@alex.org.uk wrote: Liu, --On 21 July 2013 16:42:57 +0800

Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff

2013-07-25 Thread Stefan Hajnoczi
On Mon, Jul 22, 2013 at 06:18:03PM +0800, liu ping fan wrote: On Mon, Jul 22, 2013 at 5:40 PM, Alex Bligh a...@alex.org.uk wrote: Liu, --On 22 July 2013 12:38:02 +0800 liu ping fan qemul...@gmail.com wrote: I read your second series, and try to summary the main different between us.

Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff

2013-07-25 Thread Jan Kiszka
On 2013-07-25 13:44, Stefan Hajnoczi wrote: On Tue, Jul 23, 2013 at 10:51:06AM +0800, liu ping fan wrote: On Mon, Jul 22, 2013 at 2:28 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2013-07-22 06:38, liu ping fan wrote: On Sun, Jul 21, 2013 at 5:53 PM, Alex Bligh a...@alex.org.uk wrote: Liu,

Re: [Qemu-devel] [PATCH v3 12/14] pvpanic: add API to access io port

2013-07-25 Thread Gerd Hoffmann
On 07/25/13 13:22, Michael S. Tsirkin wrote: On Thu, Jul 25, 2013 at 01:05:12PM +0200, Gerd Hoffmann wrote: Hi, I can change the implementation but I don't think it's a good idea to copy property names around: it's too fragile, compiler won't warn us if we change the name or value

Re: [Qemu-devel] [PATCH v3 01/14] hw/i386/pc.c: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/apic.h

2013-07-25 Thread Gerd Hoffmann
On 07/24/13 18:01, Michael S. Tsirkin wrote: Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Laszlo Ersek ler...@redhat.com --- hw/i386/pc.c | 2 -- include/hw/i386/apic.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Gerd Hoffmann

Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff

2013-07-25 Thread Stefan Hajnoczi
On Sun, Jul 21, 2013 at 04:42:57PM +0800, Liu Ping Fan wrote: Currently, the timers run on iothread within BQL, so virtio-block dataplane can not use throttle, as Stefan Hajnoczi pointed out in his patches to port dataplane onto block layer.(Thanks, Stefan) To enable this feature, I plan to

Re: [Qemu-devel] [PATCH V3 for-1.6 0/5] Leaky bucket throttling and features

2013-07-25 Thread Fam Zheng
On Tue, 07/23 18:29, Benoît Canet wrote: The first patch fixes the throttling which was broken by a previous commit. The next patch replace the existing throttling algorithm by the well described leaky bucket algorithm. Third patch implement bursting by adding *_threshold parameters to

Re: [Qemu-devel] [PATCH v3 03/14] acpi: add rules to compile ASL source

2013-07-25 Thread Gerd Hoffmann
On 07/24/13 18:01, Michael S. Tsirkin wrote: Detect presence of IASL compiler and use it to process ASL source. If not there, use pre-compiled files in-tree. Add script to update the in-tree files. Note: distros are known to silently update iasl so detect correct iasl flags for the

Re: [Qemu-devel] [PATCH v3 05/14] loader: use file path size from fw_cfg.h

2013-07-25 Thread Gerd Hoffmann
On 07/24/13 18:01, Michael S. Tsirkin wrote: Avoid a bit of code duplication, make max file path constant reusable. Reviewed-by: Gerd Hoffmann kra...@redhat.com cheers, Gerd

Re: [Qemu-devel] [PATCH v3 06/14] i386: add bios linker/loader

2013-07-25 Thread Gerd Hoffmann
On 07/24/13 18:01, Michael S. Tsirkin wrote: This adds a dynamic bios linker/loader. This will be used by acpi table generation code to: - load each table in the appropriate memory segment - link tables to each other - fix up checksums after said linking Reviewed-by: Gerd

Re: [Qemu-devel] [PATCH v2 09/17] block: introduce bdrv_get_block_status API

2013-07-25 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 19/07/2013 15:43, Eric Blake ha scritto: On 07/16/2013 10:29 AM, Paolo Bonzini wrote: For now, bdrv_get_block_status is just another name for bdrv_is_allocated. The next patches will add more flags. This also touches all block drivers with a

Re: [Qemu-devel] [PATCH V3 for-1.6 0/5] Leaky bucket throttling and features

2013-07-25 Thread Benoît Canet
Le Thursday 25 Jul 2013 à 20:08:22 (+0800), Fam Zheng a écrit : My ignorant question: Besides the fix, how is io throttling improved from previously, what are the advantages of leaky bucket algorithm? The advantage is simplicity and the ability to allow controlled bursts. The disavantage is it

Re: [Qemu-devel] [PATCH v3 07/14] loader: support for unmapped ROM blobs

2013-07-25 Thread Gerd Hoffmann
On 07/24/13 18:01, Michael S. Tsirkin wrote: QTAILQ_FOREACH(rom, roms, next) { +if (rom-mr) { +continue; +} if (rom-fw_file) { continue; } if (rom-data == NULL) { continue; } -

  1   2   3   4   >