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 endiann

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 T

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 > > > --- > > > block/backup.c | 3 ++- > > > block/mirror.c | 4 ++-- > > > 2 files changed, 4 in

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 Signed-off-by: MORITA Kazutaka --- util/iov.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/util/iov.c b/util/iov.c index cc6e837..f705586 100644 --- a/util/iov.c +++ b/uti

[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 checks

[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 Signed-off-by: MORITA Kazutaka --- qemu-img.c | 4 qemu-io.c | 4 2 files changed, 8 insertions(+) diff --git a/qemu-img.c b/qemu-img.c index c55ca5c.

[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 --- include/block/coroutine.h | 8 qemu-coroutine-sleep.c| 47 +++ 2 files chan

[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 --- block/sheepdog.c | 66 +++- 1 file changed, 17 insertions(+), 49 deletions(-) diff --git a/block/sheepdog.c b/

[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 --- block/sheepdog.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index c6e

[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_co_recv/

[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 --- block/sheepdog.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 6a41ad9..c6e9b89 100644 --

[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 --- block/sheepdog.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index fae17ac..7b2281

[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 --- block/shee

[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 --- block/sheepdog.c | 70 +++- 1 file changed, 5

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 goo

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 se

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 > --- > block/sheepdog.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) >

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 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 common virt

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 > > --- > > block/sheepdog.c | 16 ++

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 > > --- > > block/sheepdog.c | 16

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 re

[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 bs->ref

[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 --- 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 +++ b/block/vvfat.c @@ -29

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 --- block-migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block-migration.c b/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 --- 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 -EBUSY; }

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 > --- > block/sheepdog.c |

[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 --- hw/block/xen_disk.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/block/xen_disk.c b/hw/blo

[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 --- blockdev-nbd.c | 10 +- nbd.c | 5 +

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 > --- > include/qemu/timer.h |2 - > main-loop.c |4 - > qemu-timer.c | 50

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 >> --- >> include/qemu/timer.h |2 - >> ma

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 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_qu

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 reque

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 unini

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 b

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

[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 --- block.c | 22 ++ include/block/block.h | 2 ++ include/block/block_int.h | 1 +

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 --- block/iscsi.c | 14 +++--- 1 file

[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. The

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 > --- > hw/acpi/piix4.c | 29 +++-- > hw/

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 wrote: > On Thu, Jul 25, 2013 at 09:50:21AM +0100, Peter Maydell wrote: >> On 25 July 2013 06:38, Michael S. Tsirkin wrote: >> > On Fri, Jul 12, 2013 at 09:36:57PM +0100, Peter Maydell wrote: >> >> The MMIO virtio transport spec allows the guest to tell t

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 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 don't need that yet

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 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 > nobody (including Alexey)

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 t

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 > 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 d

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:

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 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 qemu_clock_deadline_all_n

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 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 qemu

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

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 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 uni

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 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 reason is that we use

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 Applied, thanks.

[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 av

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 regi

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

2013-07-25 Thread Peter Maydell
On 25 July 2013 11:11, Andrea Arcangeli 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); > qemu_ma

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

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 qem

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 >> wrote: >>> That's fine, I know you can fix stuff :-) I'm just really annoyed that >>> upstream qemu remained broken for so long (an

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,

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 (

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

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

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

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 pvpanic

[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 --- 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 +++ b/hw/usb/hcd-xhc

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. Chang

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

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 co

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 wrote: > On Tue, Jul 23, 2013 at 06:23:00PM +0200, Igor Mammedov wrote: > > From: Vasilis Liaskovitis > > > > 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_

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 wrote: > > On 2013-07-22 06:38, liu ping fan wrote: > >> On Sun, Jul 21, 2013 at 5:53 PM, Alex Bligh wrote: > >>> Liu, > >>> > >>> > >>> --On 21 July 2013 16:42:57 +0800 Liu Ping Fan wrote

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 wrote: > > Liu, > > > > > > --On 22 July 2013 12:38:02 +0800 liu ping fan wrote: > > > >> I read your second series, and try to summary the main different between > >> us. Please correct me

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 wrote: >>> On 2013-07-22 06:38, liu ping fan wrote: On Sun, Jul 21, 2013 at 5:53 PM, Alex Bligh wrote: > Liu, > > > --On

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

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 > Signed-off-by: Laszlo Ersek > --- > hw/i386/pc.c | 2 -- > include/hw/i386/apic.h | 2 ++ > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Gerd Hoffmann cheers, Gerd

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 pla

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 t

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 ins

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 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 H

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

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 i

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; > } > -

Re: [Qemu-devel] [PATCH v3 08/14] loader: allow adding ROMs in done callbacks

2013-07-25 Thread Gerd Hoffmann
On 07/24/13 18:02, Michael S. Tsirkin wrote: > Don't abort if machine done callbacks add ROMs. Reviewed-by: Gerd Hoffmann cheers, Gerd

Re: [Qemu-devel] [PATCH v2 14/17] raw-posix: return get_block_status data and flags

2013-07-25 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 19/07/2013 21:48, Eric Blake ha scritto: >>> start = sector_num * BDRV_SECTOR_SIZE; +ret = >>> BDRV_BLOCK_DATA | BDRV_BLOCK_OFFSET_VALID | start; > off_t is a signed type; if you are compiling on a platform with > 32-bit off_t, is it possible th

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

2013-07-25 Thread Alex Bligh
--On 25 July 2013 14:05:30 +0200 Stefan Hajnoczi wrote: Alex Bligh's series gives each AioContext its own rt_clock. This avoids the need for synchronization in the simple case. If we require timer access between threads then we really need to synchronize. You pointed out in another email 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 02:03:33PM +0200, Gerd Hoffmann wrote: > 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 arou

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

2013-07-25 Thread Michael S. Tsirkin
On Thu, Jul 25, 2013 at 02:14:40PM +0200, Gerd Hoffmann wrote: > On 07/24/13 18:01, Michael S. Tsirkin wrote: > > QTAILQ_FOREACH(rom, &roms, next) { > > +if (rom->mr) { > > +continue; > > +} > > if (rom->fw_file) { > > continue; > > }

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 wrote: > On Thu, Jul 25, 2013 at 09:50:21AM +0100, Peter Maydell wrote: >> On 25 July 2013 06:38, Michael S. Tsirkin wrote: >> > Probably needs to go back to default value on reset? >> >> Tricky, since the default value is "whatever was passed to >> virti

Re: [Qemu-devel] [PATCH v3 09/14] i386: define pc guest info

2013-07-25 Thread Gerd Hoffmann
On 07/24/13 18:02, Michael S. Tsirkin wrote: > This defines a structure that will be used to fill in guest info table. > This structure will be filled in in follow-up patches, using QOM. Fill > in NUMA node info is not available in QOM so it is filled in directly. Reviewed-by: Gerd Hoffmann che

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

2013-07-25 Thread Jan Kiszka
On 2013-07-25 14:21, Alex Bligh wrote: > > > --On 25 July 2013 14:05:30 +0200 Stefan Hajnoczi > wrote: > >> Alex Bligh's series gives each AioContext its own rt_clock. This avoids >> the need for synchronization in the simple case. If we require timer >> access between threads then we really

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

2013-07-25 Thread Gerd Hoffmann
On 07/24/13 18:02, Michael S. Tsirkin wrote: > This adds APIs that will be used to fill in > guest info table, implemented using QOM, > to various ich9 components. Uses QOM to lookup the device state without needing nasty hooks in machine creation. Then goes copy info directly from device state a

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

2013-07-25 Thread Gerd Hoffmann
On 07/24/13 18:02, Michael S. Tsirkin wrote: > This adds APIs that will be used to fill in guest info table, > implemented using QOM, to various piix components. Like ich9. Reviewed-by: Gerd Hoffmann cheers, Gerd

Re: [Qemu-devel] [PATCH v3 13/14] hpet: add API to find it

2013-07-25 Thread Gerd Hoffmann
On 07/24/13 18:02, Michael S. Tsirkin wrote: > +bool hpet_find(void) given this returns just a bool hpet_present() would be a better name I think. cheers, Gerd

  1   2   3   4   >