* [Qemu-devel] [PULL 0/5] Block patches @ 2017-10-03 19:12 Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 1/5] qom: provide root container for internal objs Stefan Hajnoczi ` (5 more replies) 0 siblings, 6 replies; 15+ messages in thread From: Stefan Hajnoczi @ 2017-10-03 19:12 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi The following changes since commit d147f7e815f97cb477e223586bcb80c316ae10ea: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-10-03 16:27:24 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for you to fetch changes up to f708a5e71cba0d784e307334c07ade5f56f827ab: aio: fix assert when remove poll during destroy (2017-10-03 14:36:19 -0400) ---------------------------------------------------------------- ---------------------------------------------------------------- Peter Xu (4): qom: provide root container for internal objs iothread: provide helpers for internal use iothread: export iothread_stop() iothread: delay the context release to finalize Stefan Hajnoczi (1): aio: fix assert when remove poll during destroy include/qom/object.h | 11 +++++++++++ include/sysemu/iothread.h | 9 +++++++++ iothread.c | 46 ++++++++++++++++++++++++++++++++++++---------- qom/object.c | 11 +++++++++++ util/aio-posix.c | 9 ++++++++- 5 files changed, 75 insertions(+), 11 deletions(-) -- 2.13.6 ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 1/5] qom: provide root container for internal objs 2017-10-03 19:12 [Qemu-devel] [PULL 0/5] Block patches Stefan Hajnoczi @ 2017-10-03 19:12 ` Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 2/5] iothread: provide helpers for internal use Stefan Hajnoczi ` (4 subsequent siblings) 5 siblings, 0 replies; 15+ messages in thread From: Stefan Hajnoczi @ 2017-10-03 19:12 UTC (permalink / raw) To: qemu-devel Cc: Peter Maydell, Peter Xu, Andreas Färber, Markus Armbruster, Paolo Bonzini, Stefan Hajnoczi From: Peter Xu <peterx@redhat.com> We have object_get_objects_root() to keep user created objects, however no place for objects that will be used internally. Create such a container for internal objects. CC: Andreas Färber <afaerber@suse.de> CC: Markus Armbruster <armbru@redhat.com> CC: Paolo Bonzini <pbonzini@redhat.com> Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 20170928025958.1420-2-peterx@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- include/qom/object.h | 11 +++++++++++ qom/object.c | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index f3e5cff37a..e0d9824415 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -1214,6 +1214,17 @@ Object *object_get_root(void); Object *object_get_objects_root(void); /** + * object_get_internal_root: + * + * Get the container object that holds internally used object + * instances. Any object which is put into this container must not be + * user visible, and it will not be exposed in the QOM tree. + * + * Returns: the internal object container + */ +Object *object_get_internal_root(void); + +/** * object_get_canonical_path_component: * * Returns: The final component in the object's canonical path. The canonical diff --git a/qom/object.c b/qom/object.c index 3e18537e9b..6a7bd9257b 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1370,6 +1370,17 @@ Object *object_get_objects_root(void) return container_get(object_get_root(), "/objects"); } +Object *object_get_internal_root(void) +{ + static Object *internal_root; + + if (!internal_root) { + internal_root = object_new("container"); + } + + return internal_root; +} + static void object_get_child_property(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) -- 2.13.6 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 2/5] iothread: provide helpers for internal use 2017-10-03 19:12 [Qemu-devel] [PULL 0/5] Block patches Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 1/5] qom: provide root container for internal objs Stefan Hajnoczi @ 2017-10-03 19:12 ` Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 3/5] iothread: export iothread_stop() Stefan Hajnoczi ` (3 subsequent siblings) 5 siblings, 0 replies; 15+ messages in thread From: Stefan Hajnoczi @ 2017-10-03 19:12 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Peter Xu, Stefan Hajnoczi From: Peter Xu <peterx@redhat.com> IOThread is a general framework that contains IO loop environment and a real thread behind. It's also good to be used internally inside qemu. Provide some helpers for it to create iothreads to be used internally. Put all the internal used iothreads into the internal object container. Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-id: 20170928025958.1420-3-peterx@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- include/sysemu/iothread.h | 8 ++++++++ iothread.c | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/include/sysemu/iothread.h b/include/sysemu/iothread.h index d2985b30ba..b07663f0a1 100644 --- a/include/sysemu/iothread.h +++ b/include/sysemu/iothread.h @@ -46,4 +46,12 @@ AioContext *iothread_get_aio_context(IOThread *iothread); void iothread_stop_all(void); GMainContext *iothread_get_g_main_context(IOThread *iothread); +/* + * Helpers used to allocate iothreads for internal use. These + * iothreads will not be seen by monitor clients when query using + * "query-iothreads". + */ +IOThread *iothread_create(const char *id, Error **errp); +void iothread_destroy(IOThread *iothread); + #endif /* IOTHREAD_H */ diff --git a/iothread.c b/iothread.c index 59d0850988..0672a9196f 100644 --- a/iothread.c +++ b/iothread.c @@ -354,3 +354,19 @@ GMainContext *iothread_get_g_main_context(IOThread *iothread) return iothread->worker_context; } + +IOThread *iothread_create(const char *id, Error **errp) +{ + Object *obj; + + obj = object_new_with_props(TYPE_IOTHREAD, + object_get_internal_root(), + id, errp, NULL); + + return IOTHREAD(obj); +} + +void iothread_destroy(IOThread *iothread) +{ + object_unparent(OBJECT(iothread)); +} -- 2.13.6 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 3/5] iothread: export iothread_stop() 2017-10-03 19:12 [Qemu-devel] [PULL 0/5] Block patches Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 1/5] qom: provide root container for internal objs Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 2/5] iothread: provide helpers for internal use Stefan Hajnoczi @ 2017-10-03 19:12 ` Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 4/5] iothread: delay the context release to finalize Stefan Hajnoczi ` (2 subsequent siblings) 5 siblings, 0 replies; 15+ messages in thread From: Stefan Hajnoczi @ 2017-10-03 19:12 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Peter Xu, Stefan Hajnoczi From: Peter Xu <peterx@redhat.com> So that internal iothread users can explicitly stop one iothread without destroying it. Since at it, fix iothread_stop() to allow it to be called multiple times. Before this patch we may call iothread_stop() more than once on single iothread, while that may not be correct since qemu_thread_join() is not allowed to run twice. From manual of pthread_join(): Joining with a thread that has previously been joined results in undefined behavior. Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-id: 20170928025958.1420-4-peterx@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- include/sysemu/iothread.h | 1 + iothread.c | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/include/sysemu/iothread.h b/include/sysemu/iothread.h index b07663f0a1..110329b2b4 100644 --- a/include/sysemu/iothread.h +++ b/include/sysemu/iothread.h @@ -52,6 +52,7 @@ GMainContext *iothread_get_g_main_context(IOThread *iothread); * "query-iothreads". */ IOThread *iothread_create(const char *id, Error **errp); +void iothread_stop(IOThread *iothread); void iothread_destroy(IOThread *iothread); #endif /* IOTHREAD_H */ diff --git a/iothread.c b/iothread.c index 0672a9196f..b3c092b2d7 100644 --- a/iothread.c +++ b/iothread.c @@ -80,13 +80,10 @@ static void *iothread_run(void *opaque) return NULL; } -static int iothread_stop(Object *object, void *opaque) +void iothread_stop(IOThread *iothread) { - IOThread *iothread; - - iothread = (IOThread *)object_dynamic_cast(object, TYPE_IOTHREAD); - if (!iothread || !iothread->ctx || iothread->stopping) { - return 0; + if (!iothread->ctx || iothread->stopping) { + return; } iothread->stopping = true; aio_notify(iothread->ctx); @@ -94,6 +91,17 @@ static int iothread_stop(Object *object, void *opaque) g_main_loop_quit(iothread->main_loop); } qemu_thread_join(&iothread->thread); +} + +static int iothread_stop_iter(Object *object, void *opaque) +{ + IOThread *iothread; + + iothread = (IOThread *)object_dynamic_cast(object, TYPE_IOTHREAD); + if (!iothread) { + return 0; + } + iothread_stop(iothread); return 0; } @@ -108,7 +116,7 @@ static void iothread_instance_finalize(Object *obj) { IOThread *iothread = IOTHREAD(obj); - iothread_stop(obj, NULL); + iothread_stop(iothread); qemu_cond_destroy(&iothread->init_done_cond); qemu_mutex_destroy(&iothread->init_done_lock); if (!iothread->ctx) { @@ -328,7 +336,7 @@ void iothread_stop_all(void) aio_context_release(ctx); } - object_child_foreach(container, iothread_stop, NULL); + object_child_foreach(container, iothread_stop_iter, NULL); } static gpointer iothread_g_main_context_init(gpointer opaque) -- 2.13.6 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 4/5] iothread: delay the context release to finalize 2017-10-03 19:12 [Qemu-devel] [PULL 0/5] Block patches Stefan Hajnoczi ` (2 preceding siblings ...) 2017-10-03 19:12 ` [Qemu-devel] [PULL 3/5] iothread: export iothread_stop() Stefan Hajnoczi @ 2017-10-03 19:12 ` Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 5/5] aio: fix assert when remove poll during destroy Stefan Hajnoczi 2017-10-05 12:27 ` [Qemu-devel] [PULL 0/5] Block patches Peter Maydell 5 siblings, 0 replies; 15+ messages in thread From: Stefan Hajnoczi @ 2017-10-03 19:12 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Peter Xu, Stefan Hajnoczi From: Peter Xu <peterx@redhat.com> When gcontext is used with iothread, the context will be destroyed during iothread_stop(). That's not good since sometimes we would like to keep the resources until iothread is destroyed, but we may want to stop the thread before that point. Delay the destruction of gcontext to iothread finalize. Then we can do: iothread_stop(thread); some_cleanup_on_resources(); iothread_destroy(thread); We may need this patch if we want to run chardev IOs in iothreads and hopefully clean them up correctly. For more specific information, please see 2b316774f6 ("qemu-char: do not operate on sources from finalize callbacks"). Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-id: 20170928025958.1420-5-peterx@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- iothread.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iothread.c b/iothread.c index b3c092b2d7..27a4288578 100644 --- a/iothread.c +++ b/iothread.c @@ -71,8 +71,6 @@ static void *iothread_run(void *opaque) g_main_loop_unref(loop); g_main_context_pop_thread_default(iothread->worker_context); - g_main_context_unref(iothread->worker_context); - iothread->worker_context = NULL; } } @@ -117,6 +115,10 @@ static void iothread_instance_finalize(Object *obj) IOThread *iothread = IOTHREAD(obj); iothread_stop(iothread); + if (iothread->worker_context) { + g_main_context_unref(iothread->worker_context); + iothread->worker_context = NULL; + } qemu_cond_destroy(&iothread->init_done_cond); qemu_mutex_destroy(&iothread->init_done_lock); if (!iothread->ctx) { -- 2.13.6 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 5/5] aio: fix assert when remove poll during destroy 2017-10-03 19:12 [Qemu-devel] [PULL 0/5] Block patches Stefan Hajnoczi ` (3 preceding siblings ...) 2017-10-03 19:12 ` [Qemu-devel] [PULL 4/5] iothread: delay the context release to finalize Stefan Hajnoczi @ 2017-10-03 19:12 ` Stefan Hajnoczi 2017-10-05 12:27 ` [Qemu-devel] [PULL 0/5] Block patches Peter Maydell 5 siblings, 0 replies; 15+ messages in thread From: Stefan Hajnoczi @ 2017-10-03 19:12 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi, Peter Xu After iothread is enabled internally inside QEMU with GMainContext, we may encounter this warning when destroying the iothread: (qemu-system-x86_64:19925): GLib-CRITICAL **: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed The problem is that g_source_remove_poll() does not allow to remove one source from array if the source is detached from its owner context. (peterx: which IMHO does not make much sense) Fix it on QEMU side by avoid calling g_source_remove_poll() if we know the object is during destruction, and we won't leak anything after all since the array will be gone soon cleanly even with that fd. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-id: 20170928025958.1420-6-peterx@redhat.com [peterx: write the commit message] Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- util/aio-posix.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/util/aio-posix.c b/util/aio-posix.c index 2d51239ec6..5946ac09f0 100644 --- a/util/aio-posix.c +++ b/util/aio-posix.c @@ -223,7 +223,14 @@ void aio_set_fd_handler(AioContext *ctx, return; } - g_source_remove_poll(&ctx->source, &node->pfd); + /* If the GSource is in the process of being destroyed then + * g_source_remove_poll() causes an assertion failure. Skip + * removal in that case, because glib cleans up its state during + * destruction anyway. + */ + if (!g_source_is_destroyed(&ctx->source)) { + g_source_remove_poll(&ctx->source, &node->pfd); + } /* If the lock is held, just mark the node as deleted */ if (qemu_lockcnt_count(&ctx->list_lock)) { -- 2.13.6 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Block patches 2017-10-03 19:12 [Qemu-devel] [PULL 0/5] Block patches Stefan Hajnoczi ` (4 preceding siblings ...) 2017-10-03 19:12 ` [Qemu-devel] [PULL 5/5] aio: fix assert when remove poll during destroy Stefan Hajnoczi @ 2017-10-05 12:27 ` Peter Maydell 5 siblings, 0 replies; 15+ messages in thread From: Peter Maydell @ 2017-10-05 12:27 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: QEMU Developers On 3 October 2017 at 20:12, Stefan Hajnoczi <stefanha@redhat.com> wrote: > The following changes since commit d147f7e815f97cb477e223586bcb80c316ae10ea: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-10-03 16:27:24 +0100) > > are available in the git repository at: > > git://github.com/stefanha/qemu.git tags/block-pull-request > > for you to fetch changes up to f708a5e71cba0d784e307334c07ade5f56f827ab: > > aio: fix assert when remove poll during destroy (2017-10-03 14:36:19 -0400) > > ---------------------------------------------------------------- > Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 0/5] Block patches @ 2017-02-01 5:34 Jeff Cody 2017-02-02 15:14 ` Peter Maydell 0 siblings, 1 reply; 15+ messages in thread From: Jeff Cody @ 2017-02-01 5:34 UTC (permalink / raw) To: qemu-block; +Cc: peter.maydell, jcody, qemu-devel, stefanha The following changes since commit a0def594286d9110a6035e02eef558cf3cf5d847: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-01-30 10:23:20 +0000) are available in the git repository at: https://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request for you to fetch changes up to acf6e5f0962c4be670d4a93ede77423512521876: sheepdog: reorganize check for overlapping requests (2017-02-01 00:17:20 -0500) ---------------------------------------------------------------- Block patches ---------------------------------------------------------------- Paolo Bonzini (5): sheepdog: remove unused cancellation support sheepdog: reorganize coroutine flow sheepdog: do not use BlockAIOCB sheepdog: simplify inflight_aio_head management sheepdog: reorganize check for overlapping requests block/sheepdog.c | 289 ++++++++++++++++--------------------------------------- 1 file changed, 84 insertions(+), 205 deletions(-) -- 2.9.3 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Block patches 2017-02-01 5:34 Jeff Cody @ 2017-02-02 15:14 ` Peter Maydell 0 siblings, 0 replies; 15+ messages in thread From: Peter Maydell @ 2017-02-02 15:14 UTC (permalink / raw) To: Jeff Cody; +Cc: Qemu-block, QEMU Developers, Stefan Hajnoczi On 1 February 2017 at 05:34, Jeff Cody <jcody@redhat.com> wrote: > The following changes since commit a0def594286d9110a6035e02eef558cf3cf5d847: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-01-30 10:23:20 +0000) > > are available in the git repository at: > > https://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request > > for you to fetch changes up to acf6e5f0962c4be670d4a93ede77423512521876: > > sheepdog: reorganize check for overlapping requests (2017-02-01 00:17:20 -0500) > > ---------------------------------------------------------------- > Block patches > ---------------------------------------------------------------- > > Paolo Bonzini (5): > sheepdog: remove unused cancellation support > sheepdog: reorganize coroutine flow > sheepdog: do not use BlockAIOCB > sheepdog: simplify inflight_aio_head management > sheepdog: reorganize check for overlapping requests Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 0/5] Block patches @ 2015-10-09 9:13 Stefan Hajnoczi 2015-10-09 11:17 ` Peter Maydell 0 siblings, 1 reply; 15+ messages in thread From: Stefan Hajnoczi @ 2015-10-09 9:13 UTC (permalink / raw) To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi The following changes since commit 1d27b91723c252d9a97151dc1959cfd89c5816cb: Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20151007.0' into staging (2015-10-08 16:50:34 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for you to fetch changes up to b22b254b8b61705517756060bd8e83edd30b9987: sdhci.c: Limit the maximum block size (2015-10-09 09:45:04 +0100) ---------------------------------------------------------------- ---------------------------------------------------------------- Alistair Francis (1): sdhci.c: Limit the maximum block size Kevin O'Connor (1): sdhci: Pass drive parameter to sdhci-pci via qdev property Paolo Bonzini (1): block: switch from g_slice allocator to malloc Pierre Morel (1): virtio dataplane: adapt dataplane for virtio Version 1 Stefan Hajnoczi (1): virtio-blk: use blk_io_plug/unplug for Linux AIO batching block/io.c | 4 +-- block/mirror.c | 4 +-- block/raw-posix.c | 8 ++--- block/raw-win32.c | 4 +-- hw/block/virtio-blk.c | 8 +++-- hw/sd/sd.c | 4 ++- hw/sd/sdhci.c | 42 +++++++++++++++++-------- hw/sd/sdhci.h | 2 ++ hw/virtio/dataplane/vring.c | 62 ++++++++++++++++++++++++++++++------- include/hw/virtio/dataplane/vring.h | 4 ++- 10 files changed, 103 insertions(+), 39 deletions(-) -- 2.4.3 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Block patches 2015-10-09 9:13 Stefan Hajnoczi @ 2015-10-09 11:17 ` Peter Maydell 2015-10-12 8:27 ` Stefan Hajnoczi 0 siblings, 1 reply; 15+ messages in thread From: Peter Maydell @ 2015-10-09 11:17 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: QEMU Developers On 9 October 2015 at 10:13, Stefan Hajnoczi <stefanha@redhat.com> wrote: > The following changes since commit 1d27b91723c252d9a97151dc1959cfd89c5816cb: > > Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20151007.0' into staging (2015-10-08 16:50:34 +0100) > > are available in the git repository at: > > git://github.com/stefanha/qemu.git tags/block-pull-request > > for you to fetch changes up to b22b254b8b61705517756060bd8e83edd30b9987: > > sdhci.c: Limit the maximum block size (2015-10-09 09:45:04 +0100) > > ---------------------------------------------------------------- > > ---------------------------------------------------------------- > > Alistair Francis (1): > sdhci.c: Limit the maximum block size > > Kevin O'Connor (1): > sdhci: Pass drive parameter to sdhci-pci via qdev property > > Paolo Bonzini (1): > block: switch from g_slice allocator to malloc > > Pierre Morel (1): > virtio dataplane: adapt dataplane for virtio Version 1 > > Stefan Hajnoczi (1): > virtio-blk: use blk_io_plug/unplug for Linux AIO batching Compiler warnings on OSX: /Users/pm215/src/qemu-for-merges/hw/virtio/dataplane/vring.c:84:23: warning: format specifies type 'unsigned long' but the argument has type 'hwaddr' (aka 'unsigned long long') [-Wformat] size, addr); ^~~~ /Users/pm215/src/qemu-for-merges/hw/virtio/dataplane/vring.c:84:29: warning: format specifies type 'unsigned long' but the argument has type 'hwaddr' (aka 'unsigned long long') [-Wformat] size, addr); ^~~~ /Users/pm215/src/qemu-for-merges/hw/virtio/dataplane/vring.c:97:23: warning: format specifies type 'unsigned long' but the argument has type 'hwaddr' (aka 'unsigned long long') [-Wformat] size, addr); ^~~~ /Users/pm215/src/qemu-for-merges/hw/virtio/dataplane/vring.c:97:29: warning: format specifies type 'unsigned long' but the argument has type 'hwaddr' (aka 'unsigned long long') [-Wformat] size, addr); ^~~~ /Users/pm215/src/qemu-for-merges/hw/virtio/dataplane/vring.c:110:23: warning: format specifies type 'unsigned long' but the argument has type 'hwaddr' (aka 'unsigned long long') [-Wformat] size, addr); ^~~~ /Users/pm215/src/qemu-for-merges/hw/virtio/dataplane/vring.c:110:29: warning: format specifies type 'unsigned long' but the argument has type 'hwaddr' (aka 'unsigned long long') [-Wformat] size, addr); ^~~~ 6 warnings generated. Same problem, w32 build: /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c: In function ‘vring_setup’: /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c:84: warning: format ‘%16lx’ expects type ‘long unsigned int’, but argument 2 has type ‘hwaddr’ /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c:84: warning: format ‘%16lx’ expects type ‘long unsigned int’, but argument 3 has type ‘hwaddr’ /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c:97: warning: format ‘%16lx’ expects type ‘long unsigned int’, but argument 2 has type ‘hwaddr’ /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c:97: warning: format ‘%16lx’ expects type ‘long unsigned int’, but argument 3 has type ‘hwaddr’ /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c:110: warning: format ‘%16lx’ expects type ‘long unsigned int’, but argument 2 has type ‘hwaddr’ /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c:110: warning: format ‘%16lx’ expects type ‘long unsigned int’, but argument 3 has type ‘hwaddr’ make[1]: *** [hw/virtio/dataplane/vring.o] Error 1 thanks -- PMM ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Block patches 2015-10-09 11:17 ` Peter Maydell @ 2015-10-12 8:27 ` Stefan Hajnoczi 0 siblings, 0 replies; 15+ messages in thread From: Stefan Hajnoczi @ 2015-10-12 8:27 UTC (permalink / raw) To: Peter Maydell; +Cc: Pierre Morel, QEMU Developers On Fri, Oct 09, 2015 at 12:17:54PM +0100, Peter Maydell wrote: > On 9 October 2015 at 10:13, Stefan Hajnoczi <stefanha@redhat.com> wrote: > > The following changes since commit 1d27b91723c252d9a97151dc1959cfd89c5816cb: > > > > Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20151007.0' into staging (2015-10-08 16:50:34 +0100) > > > > are available in the git repository at: > > > > git://github.com/stefanha/qemu.git tags/block-pull-request > > > > for you to fetch changes up to b22b254b8b61705517756060bd8e83edd30b9987: > > > > sdhci.c: Limit the maximum block size (2015-10-09 09:45:04 +0100) > > > > ---------------------------------------------------------------- > > > > ---------------------------------------------------------------- > > > > Alistair Francis (1): > > sdhci.c: Limit the maximum block size > > > > Kevin O'Connor (1): > > sdhci: Pass drive parameter to sdhci-pci via qdev property > > > > Paolo Bonzini (1): > > block: switch from g_slice allocator to malloc > > > > Pierre Morel (1): > > virtio dataplane: adapt dataplane for virtio Version 1 > > > > Stefan Hajnoczi (1): > > virtio-blk: use blk_io_plug/unplug for Linux AIO batching > > Compiler warnings on OSX: > > /Users/pm215/src/qemu-for-merges/hw/virtio/dataplane/vring.c:84:23: > warning: format specifies type 'unsigned long' but the argument has > type 'hwaddr' (aka 'unsigned long long') [-Wformat] > size, addr); > ^~~~ > /Users/pm215/src/qemu-for-merges/hw/virtio/dataplane/vring.c:84:29: > warning: format specifies type 'unsigned long' but the argument has > type 'hwaddr' (aka 'unsigned long long') [-Wformat] > size, addr); > ^~~~ > /Users/pm215/src/qemu-for-merges/hw/virtio/dataplane/vring.c:97:23: > warning: format specifies type 'unsigned long' but the argument has > type 'hwaddr' (aka 'unsigned long long') [-Wformat] > size, addr); > ^~~~ > /Users/pm215/src/qemu-for-merges/hw/virtio/dataplane/vring.c:97:29: > warning: format specifies type 'unsigned long' but the argument has > type 'hwaddr' (aka 'unsigned long long') [-Wformat] > size, addr); > ^~~~ > /Users/pm215/src/qemu-for-merges/hw/virtio/dataplane/vring.c:110:23: > warning: format specifies type 'unsigned long' but the argument has > type 'hwaddr' (aka 'unsigned long long') [-Wformat] > size, addr); > ^~~~ > /Users/pm215/src/qemu-for-merges/hw/virtio/dataplane/vring.c:110:29: > warning: format specifies type 'unsigned long' but the argument has > type 'hwaddr' (aka 'unsigned long long') [-Wformat] > size, addr); > ^~~~ > 6 warnings generated. > > > Same problem, w32 build: > /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c: In > function ‘vring_setup’: > /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c:84: > warning: format ‘%16lx’ expects > type ‘long unsigned int’, but argument 2 has type ‘hwaddr’ > /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c:84: > warning: format ‘%16lx’ expects > type ‘long unsigned int’, but argument 3 has type ‘hwaddr’ > /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c:97: > warning: format ‘%16lx’ expects > type ‘long unsigned int’, but argument 2 has type ‘hwaddr’ > /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c:97: > warning: format ‘%16lx’ expects > type ‘long unsigned int’, but argument 3 has type ‘hwaddr’ > /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c:110: > warning: format ‘%16lx’ expects > type ‘long unsigned int’, but argument 2 has type ‘hwaddr’ > /home/petmay01/linaro/qemu-for-merges/hw/virtio/dataplane/vring.c:110: > warning: format ‘%16lx’ expects > type ‘long unsigned int’, but argument 3 has type ‘hwaddr’ > make[1]: *** [hw/virtio/dataplane/vring.o] Error 1 Thanks for letting me know. Weird that I didn't see the warnings from my 32-bit Linux build. I am sending a v2 pull request with HWADDR_PRIx instead of the 16lx format specifier fixed in Pierre's patch. Stefan ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PULL 0/5] Block patches @ 2010-07-13 15:54 Kevin Wolf 2010-07-13 16:43 ` Brian Jackson 0 siblings, 1 reply; 15+ messages in thread From: Kevin Wolf @ 2010-07-13 15:54 UTC (permalink / raw) To: anthony; +Cc: kwolf, qemu-devel These are some more fixes that should go into 0.13. The following changes since commit f077caa99c21847152e706e222277b378cb0ec2f: Merge remote branch 'mst/for_anthony' into staging (2010-07-13 08:56:27 -0500) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Markus Armbruster (3): virtio-pci: Check for virtio_blk_init() failure virtio-blk: Fix virtio-blk-s390 to require drive ide scsi virtio-blk: Reject empty drives unless media is removable Shahar Havivi (1): Block migration fail, ignore error from bdrv_getlength Stefan Weil (1): qemu-img: Fix copy+paste bug in documentation block-migration.c | 2 +- hw/ide/core.c | 4 ++++ hw/scsi-disk.c | 5 +++++ hw/virtio-blk.c | 10 ++++++++++ hw/virtio-pci.c | 5 ++--- qemu-img-cmds.hx | 2 +- 6 files changed, 23 insertions(+), 5 deletions(-) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Block patches 2010-07-13 15:54 Kevin Wolf @ 2010-07-13 16:43 ` Brian Jackson 2010-07-13 16:47 ` Kevin Wolf 0 siblings, 1 reply; 15+ messages in thread From: Brian Jackson @ 2010-07-13 16:43 UTC (permalink / raw) To: qemu-devel; +Cc: Kevin Wolf On Tuesday, July 13, 2010 10:54:21 am Kevin Wolf wrote: > These are some more fixes that should go into 0.13. Any of these 0.12-stable material? > > The following changes since commit > f077caa99c21847152e706e222277b378cb0ec2f: > > Merge remote branch 'mst/for_anthony' into staging (2010-07-13 08:56:27 > -0500) > > are available in the git repository at: > > git://repo.or.cz/qemu/kevin.git for-anthony > > Markus Armbruster (3): > virtio-pci: Check for virtio_blk_init() failure > virtio-blk: Fix virtio-blk-s390 to require drive > ide scsi virtio-blk: Reject empty drives unless media is removable > > Shahar Havivi (1): > Block migration fail, ignore error from bdrv_getlength > > Stefan Weil (1): > qemu-img: Fix copy+paste bug in documentation > > block-migration.c | 2 +- > hw/ide/core.c | 4 ++++ > hw/scsi-disk.c | 5 +++++ > hw/virtio-blk.c | 10 ++++++++++ > hw/virtio-pci.c | 5 ++--- > qemu-img-cmds.hx | 2 +- > 6 files changed, 23 insertions(+), 5 deletions(-) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Block patches 2010-07-13 16:43 ` Brian Jackson @ 2010-07-13 16:47 ` Kevin Wolf 0 siblings, 0 replies; 15+ messages in thread From: Kevin Wolf @ 2010-07-13 16:47 UTC (permalink / raw) To: Brian Jackson; +Cc: qemu-devel Am 13.07.2010 18:43, schrieb Brian Jackson: > On Tuesday, July 13, 2010 10:54:21 am Kevin Wolf wrote: >> These are some more fixes that should go into 0.13. > > > Any of these 0.12-stable material? I'll try to have a closer look tomorrow. Probably not these, but I think there are some more patches in git master which could go into 0.12-stable. Kevin ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2017-10-05 12:27 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-10-03 19:12 [Qemu-devel] [PULL 0/5] Block patches Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 1/5] qom: provide root container for internal objs Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 2/5] iothread: provide helpers for internal use Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 3/5] iothread: export iothread_stop() Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 4/5] iothread: delay the context release to finalize Stefan Hajnoczi 2017-10-03 19:12 ` [Qemu-devel] [PULL 5/5] aio: fix assert when remove poll during destroy Stefan Hajnoczi 2017-10-05 12:27 ` [Qemu-devel] [PULL 0/5] Block patches Peter Maydell -- strict thread matches above, loose matches on Subject: below -- 2017-02-01 5:34 Jeff Cody 2017-02-02 15:14 ` Peter Maydell 2015-10-09 9:13 Stefan Hajnoczi 2015-10-09 11:17 ` Peter Maydell 2015-10-12 8:27 ` Stefan Hajnoczi 2010-07-13 15:54 Kevin Wolf 2010-07-13 16:43 ` Brian Jackson 2010-07-13 16:47 ` Kevin Wolf
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).