[{"id":1774457,"web_url":"http://patchwork.ozlabs.org/comment/1774457/","msgid":"<4540074c-f523-41f4-3ce7-8b6514060fa4@suse.de>","list_archive_url":null,"date":"2017-09-25T07:14:21","subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","submitter":{"id":9542,"url":"http://patchwork.ozlabs.org/api/people/9542/","name":"Andreas Färber","email":"afaerber@suse.de"},"content":"Am 25.09.2017 um 08:37 schrieb Peter Xu:\n> We have object_get_objects_root() to keep user created objects, however\n> no place for objects that will be used internally.  Create such a\n> container for internal objects.\n> \n> CC: Andreas Färber <afaerber@suse.de>\n> CC: Markus Armbruster <armbru@redhat.com>\n> CC: Paolo Bonzini <pbonzini@redhat.com>\n> Suggested-by: Daniel P. Berrange <berrange@redhat.com>\n> Signed-off-by: Peter Xu <peterx@redhat.com>\n> ---\n>  include/qom/object.h | 10 ++++++++++\n>  qom/object.c         |  5 +++++\n>  2 files changed, 15 insertions(+)\n> \n> diff --git a/include/qom/object.h b/include/qom/object.h\n> index f3e5cff..f567052 100644\n> --- a/include/qom/object.h\n> +++ b/include/qom/object.h\n> @@ -1214,6 +1214,16 @@ Object *object_get_root(void);\n>  Object *object_get_objects_root(void);\n>  \n>  /**\n> + * object_get_internal_root:\n> + *\n> + * Get the container object that holds internally used object\n> + * instances. This is the object at path \"/internal-objects\"\n> + *\n> + * Returns: the internal object container\n> + */\n> +Object *object_get_internal_root(void);\n> +\n> +/**\n>   * object_get_canonical_path_component:\n>   *\n>   * Returns: The final component in the object's canonical path.  The canonical\n> diff --git a/qom/object.c b/qom/object.c\n> index 3e18537..857cee7 100644\n> --- a/qom/object.c\n> +++ b/qom/object.c\n> @@ -1370,6 +1370,11 @@ Object *object_get_objects_root(void)\n>      return container_get(object_get_root(), \"/objects\");\n>  }\n>  \n> +Object *object_get_internal_root(void)\n> +{\n> +    return container_get(object_get_root(), \"/internal-objects\");\n\nWhatever you expose in the QOM tree is no longer internal. Other name?\n\nRegards,\nAndreas\n\n> +}\n> +\n>  static void object_get_child_property(Object *obj, Visitor *v,\n>                                        const char *name, void *opaque,\n>                                        Error **errp)\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y0wMj3Rcpz9tXM\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 17:15:13 +1000 (AEST)","from localhost ([::1]:40980 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwNbj-0006C9-Iv\n\tfor incoming@patchwork.ozlabs.org; Mon, 25 Sep 2017 03:15:11 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:59788)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <afaerber@suse.de>) id 1dwNb4-00069i-93\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 03:14:31 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <afaerber@suse.de>) id 1dwNb1-0005FL-0J\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 03:14:30 -0400","from mx2.suse.de ([195.135.220.15]:58741 helo=mx1.suse.de)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <afaerber@suse.de>) id 1dwNb0-0005D1-QO\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 03:14:26 -0400","from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254])\n\tby mx1.suse.de (Postfix) with ESMTP id B8AF6AAB2;\n\tMon, 25 Sep 2017 07:14:22 +0000 (UTC)"],"X-Virus-Scanned":"by amavisd-new at test-mx.suse.de","To":"Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org","References":"<1506321449-24013-1-git-send-email-peterx@redhat.com>\n\t<1506321449-24013-2-git-send-email-peterx@redhat.com>","From":"=?utf-8?q?Andreas_F=C3=A4rber?= <afaerber@suse.de>","Organization":"SUSE Linux GmbH","Message-ID":"<4540074c-f523-41f4-3ce7-8b6514060fa4@suse.de>","Date":"Mon, 25 Sep 2017 09:14:21 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<1506321449-24013-2-git-send-email-peterx@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no\n\ttimestamps) [generic] [fuzzy]","X-Received-From":"195.135.220.15","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Fam Zheng <famz@redhat.com>, Markus Armbruster <armbru@redhat.com>,\n\t\"Dr . David Alan Gilbert\" <dgilbert@redhat.com>,\n\tStefan Hajnoczi <shajnocz@redhat.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1774475,"web_url":"http://patchwork.ozlabs.org/comment/1774475/","msgid":"<20170925073002.GC398@lemon.lan>","list_archive_url":null,"date":"2017-09-25T07:30:02","subject":"Re: [Qemu-devel] [PATCH v2 3/4] iothread: export iothread_stop()","submitter":{"id":24872,"url":"http://patchwork.ozlabs.org/api/people/24872/","name":"Fam Zheng","email":"famz@redhat.com"},"content":"On Mon, 09/25 14:37, Peter Xu wrote:\n> So that internal iothread users can explicitly stop one iothread without\n> destroying it.\n> \n> Since at it, fix iothread_stop() to allow it to be called multiple\n> times.  Before this patch we may call iothread_stop() more than once on\n> single iothread, while that may not be correct since qemu_thread_join()\n> is not allowed to run twice.  From manual of pthread_join():\n> \n>   Joining with a thread that has previously been joined results in\n>   undefined behavior.\n> \n> Signed-off-by: Peter Xu <peterx@redhat.com>\n\nReviewed-by: Fam Zheng <famz@redhat.com>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=famz@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y0wjr4wwBz9t67\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 17:30:43 +1000 (AEST)","from localhost ([::1]:41085 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwNqj-0003Qi-Bc\n\tfor incoming@patchwork.ozlabs.org; Mon, 25 Sep 2017 03:30:41 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:35575)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dwNqL-0003QZ-Lg\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 03:30:23 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <famz@redhat.com>) id 1dwNqG-0000D6-Mp\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 03:30:17 -0400","from mx1.redhat.com ([209.132.183.28]:54152)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <famz@redhat.com>) id 1dwNqG-0000CI-Hp\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 03:30:12 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 556CF4A6EF\n\tfor <qemu-devel@nongnu.org>; Mon, 25 Sep 2017 07:30:11 +0000 (UTC)","from localhost (ovpn-12-91.pek2.redhat.com [10.72.12.91])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 9493D78341;\n\tMon, 25 Sep 2017 07:30:03 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 556CF4A6EF","Date":"Mon, 25 Sep 2017 15:30:02 +0800","From":"Fam Zheng <famz@redhat.com>","To":"Peter Xu <peterx@redhat.com>","Message-ID":"<20170925073002.GC398@lemon.lan>","References":"<1506321449-24013-1-git-send-email-peterx@redhat.com>\n\t<1506321449-24013-4-git-send-email-peterx@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1506321449-24013-4-git-send-email-peterx@redhat.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]);\n\tMon, 25 Sep 2017 07:30:11 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2 3/4] iothread: export iothread_stop()","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org,\n\tStefan Hajnoczi <shajnocz@redhat.com>,\n\t\"Dr . David Alan Gilbert\" <dgilbert@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1774499,"web_url":"http://patchwork.ozlabs.org/comment/1774499/","msgid":"<20170925081426.GE19505@pxdev.xzpeter.org>","list_archive_url":null,"date":"2017-09-25T08:14:26","subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","submitter":{"id":67717,"url":"http://patchwork.ozlabs.org/api/people/67717/","name":"Peter Xu","email":"peterx@redhat.com"},"content":"On Mon, Sep 25, 2017 at 09:14:21AM +0200, Andreas Färber wrote:\n> Am 25.09.2017 um 08:37 schrieb Peter Xu:\n> > We have object_get_objects_root() to keep user created objects, however\n> > no place for objects that will be used internally.  Create such a\n> > container for internal objects.\n> > \n> > CC: Andreas Färber <afaerber@suse.de>\n> > CC: Markus Armbruster <armbru@redhat.com>\n> > CC: Paolo Bonzini <pbonzini@redhat.com>\n> > Suggested-by: Daniel P. Berrange <berrange@redhat.com>\n> > Signed-off-by: Peter Xu <peterx@redhat.com>\n> > ---\n> >  include/qom/object.h | 10 ++++++++++\n> >  qom/object.c         |  5 +++++\n> >  2 files changed, 15 insertions(+)\n> > \n> > diff --git a/include/qom/object.h b/include/qom/object.h\n> > index f3e5cff..f567052 100644\n> > --- a/include/qom/object.h\n> > +++ b/include/qom/object.h\n> > @@ -1214,6 +1214,16 @@ Object *object_get_root(void);\n> >  Object *object_get_objects_root(void);\n> >  \n> >  /**\n> > + * object_get_internal_root:\n> > + *\n> > + * Get the container object that holds internally used object\n> > + * instances. This is the object at path \"/internal-objects\"\n> > + *\n> > + * Returns: the internal object container\n> > + */\n> > +Object *object_get_internal_root(void);\n> > +\n> > +/**\n> >   * object_get_canonical_path_component:\n> >   *\n> >   * Returns: The final component in the object's canonical path.  The canonical\n> > diff --git a/qom/object.c b/qom/object.c\n> > index 3e18537..857cee7 100644\n> > --- a/qom/object.c\n> > +++ b/qom/object.c\n> > @@ -1370,6 +1370,11 @@ Object *object_get_objects_root(void)\n> >      return container_get(object_get_root(), \"/objects\");\n> >  }\n> >  \n> > +Object *object_get_internal_root(void)\n> > +{\n> > +    return container_get(object_get_root(), \"/internal-objects\");\n> \n> Whatever you expose in the QOM tree is no longer internal. Other name?\n\nHi, Andreas,\n\nIf you mean \"info qom-tree\" here, can we still treat it as internal?\nSince after all it's not exposed in QMP (while IMHO QMP is the\nofficial protocol for QEMU clients).  And IIUC some HMP commands do\ndump some internal structs for debugging purpose (like: \"info\nramblock\").\n\nOr, do you have any suggestion?\n\n(I did think about something like \"hidden-objects\", but I believe they\n are not hidden as well if we think they are not internal...)\n\nThanks,\n\n> \n> Regards,\n> Andreas\n> \n> > +}\n> > +\n> >  static void object_get_child_property(Object *obj, Visitor *v,\n> >                                        const char *name, void *opaque,\n> >                                        Error **errp)\n> > \n> \n> \n> -- \n> SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany\n> GF: Felix Imendörffer, Jane Smithard, Graham Norton\n> HRB 21284 (AG Nürnberg)","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=peterx@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y0xhr1nrWz9s7G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 18:15:08 +1000 (AEST)","from localhost ([::1]:41218 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwOXi-000281-AD\n\tfor incoming@patchwork.ozlabs.org; Mon, 25 Sep 2017 04:15:06 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:43880)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <peterx@redhat.com>) id 1dwOXE-00026z-Nu\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 04:14:37 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <peterx@redhat.com>) id 1dwOXC-0001fb-1C\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 04:14:36 -0400","from mx1.redhat.com ([209.132.183.28]:43870)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <peterx@redhat.com>) id 1dwOXB-0001fH-OO\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 04:14:33 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id DFA565D68C;\n\tMon, 25 Sep 2017 08:14:32 +0000 (UTC)","from pxdev.xzpeter.org (dhcp-15-224.nay.redhat.com [10.66.15.224])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 752E7619A8;\n\tMon, 25 Sep 2017 08:14:28 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com DFA565D68C","Date":"Mon, 25 Sep 2017 16:14:26 +0800","From":"Peter Xu <peterx@redhat.com>","To":"Andreas =?utf-8?q?F=C3=A4rber?= <afaerber@suse.de>","Message-ID":"<20170925081426.GE19505@pxdev.xzpeter.org>","References":"<1506321449-24013-1-git-send-email-peterx@redhat.com>\n\t<1506321449-24013-2-git-send-email-peterx@redhat.com>\n\t<4540074c-f523-41f4-3ce7-8b6514060fa4@suse.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<4540074c-f523-41f4-3ce7-8b6514060fa4@suse.de>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.39]);\n\tMon, 25 Sep 2017 08:14:33 +0000 (UTC)","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Fam Zheng <famz@redhat.com>, Markus Armbruster <armbru@redhat.com>,\n\tqemu-devel@nongnu.org, Stefan Hajnoczi <shajnocz@redhat.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>,\n\t\"Dr . David Alan Gilbert\" <dgilbert@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1774520,"web_url":"http://patchwork.ozlabs.org/comment/1774520/","msgid":"<20170925083458.luy7kjv6x56lptvi@postretch>","list_archive_url":null,"date":"2017-09-25T08:34:58","subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","submitter":{"id":71571,"url":"http://patchwork.ozlabs.org/api/people/71571/","name":"Manos Pitsidianakis","email":"el13635@mail.ntua.gr"},"content":"On Mon, Sep 25, 2017 at 04:14:26PM +0800, Peter Xu wrote:\n>On Mon, Sep 25, 2017 at 09:14:21AM +0200, Andreas Färber wrote:\n>> Am 25.09.2017 um 08:37 schrieb Peter Xu:\n>> > We have object_get_objects_root() to keep user created objects, however\n>> > no place for objects that will be used internally.  Create such a\n>> > container for internal objects.\n>> >\n>> > CC: Andreas Färber <afaerber@suse.de>\n>> > CC: Markus Armbruster <armbru@redhat.com>\n>> > CC: Paolo Bonzini <pbonzini@redhat.com>\n>> > Suggested-by: Daniel P. Berrange <berrange@redhat.com>\n>> > Signed-off-by: Peter Xu <peterx@redhat.com>\n>> > ---\n>> >  include/qom/object.h | 10 ++++++++++\n>> >  qom/object.c         |  5 +++++\n>> >  2 files changed, 15 insertions(+)\n>> >\n>> > diff --git a/include/qom/object.h b/include/qom/object.h\n>> > index f3e5cff..f567052 100644\n>> > --- a/include/qom/object.h\n>> > +++ b/include/qom/object.h\n>> > @@ -1214,6 +1214,16 @@ Object *object_get_root(void);\n>> >  Object *object_get_objects_root(void);\n>> >\n>> >  /**\n>> > + * object_get_internal_root:\n>> > + *\n>> > + * Get the container object that holds internally used object\n>> > + * instances. This is the object at path \"/internal-objects\"\n>> > + *\n>> > + * Returns: the internal object container\n>> > + */\n>> > +Object *object_get_internal_root(void);\n>> > +\n>> > +/**\n>> >   * object_get_canonical_path_component:\n>> >   *\n>> >   * Returns: The final component in the object's canonical path.  The canonical\n>> > diff --git a/qom/object.c b/qom/object.c\n>> > index 3e18537..857cee7 100644\n>> > --- a/qom/object.c\n>> > +++ b/qom/object.c\n>> > @@ -1370,6 +1370,11 @@ Object *object_get_objects_root(void)\n>> >      return container_get(object_get_root(), \"/objects\");\n>> >  }\n>> >\n>> > +Object *object_get_internal_root(void)\n>> > +{\n>> > +    return container_get(object_get_root(), \"/internal-objects\");\n>>\n>> Whatever you expose in the QOM tree is no longer internal. Other name?\n>\n>Hi, Andreas,\n>\n>If you mean \"info qom-tree\" here, can we still treat it as internal?\n>Since after all it's not exposed in QMP (while IMHO QMP is the\n>official protocol for QEMU clients).  And IIUC some HMP commands do\n>dump some internal structs for debugging purpose (like: \"info\n>ramblock\").\n>\n>Or, do you have any suggestion?\n>\n>(I did think about something like \"hidden-objects\", but I believe they\n> are not hidden as well if we think they are not internal...)\n>\n>Thanks,\n>\n>>\n>> Regards,\n>> Andreas\n\nIf there's no need for internal IOThreads to be together with user \ncreated ones, a simple queue will be enough (include/qemu/queue.h).","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y0y8k2cbvz9t62\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 18:35:50 +1000 (AEST)","from localhost ([::1]:41286 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwOrk-0007Gh-G9\n\tfor incoming@patchwork.ozlabs.org; Mon, 25 Sep 2017 04:35:48 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:47788)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <el13635@mail.ntua.gr>) id 1dwOrI-0007Fk-Uk\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 04:35:21 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <el13635@mail.ntua.gr>) id 1dwOrE-0001i7-Pl\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 04:35:20 -0400","from smtp1.ntua.gr ([2001:648:2000:de::183]:36248)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <el13635@mail.ntua.gr>) id 1dwOrE-0001cN-EW\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 04:35:16 -0400","from mail.ntua.gr (carp0.noc.ntua.gr [147.102.222.60])\n\t(authenticated bits=0)\n\tby smtp1.ntua.gr (8.15.2/8.15.2) with ESMTPSA id v8P8YxKi093322\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=NOT); Mon, 25 Sep 2017 11:34:59 +0300 (EEST)\n\t(envelope-from el13635@mail.ntua.gr)"],"X-Authentication-Warning":"smtp1.ntua.gr: Host carp0.noc.ntua.gr\n\t[147.102.222.60] claimed to be mail.ntua.gr","Date":"Mon, 25 Sep 2017 11:34:58 +0300","From":"Manos Pitsidianakis <el13635@mail.ntua.gr>","To":"Peter Xu <peterx@redhat.com>","Message-ID":"<20170925083458.luy7kjv6x56lptvi@postretch>","Mail-Followup-To":"Manos Pitsidianakis <el13635@mail.ntua.gr>, Peter Xu\n\t<peterx@redhat.com>, Andreas =?utf-8?q?F=C3=A4rber?=\n\t<afaerber@suse.de>, Fam Zheng <famz@redhat.com>,\n\tMarkus Armbruster <armbru@redhat.com>, \n\tqemu-devel@nongnu.org, Stefan Hajnoczi <shajnocz@redhat.com>, \n\tPaolo Bonzini <pbonzini@redhat.com>, \"Dr . David Alan\n\tGilbert\" <dgilbert@redhat.com>","References":"<1506321449-24013-1-git-send-email-peterx@redhat.com>\n\t<1506321449-24013-2-git-send-email-peterx@redhat.com>\n\t<4540074c-f523-41f4-3ce7-8b6514060fa4@suse.de>\n\t<20170925081426.GE19505@pxdev.xzpeter.org>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha512;\n\tprotocol=\"application/pgp-signature\"; boundary=\"7ht2aswe3wnqpunq\"","Content-Disposition":"inline","In-Reply-To":"<20170925081426.GE19505@pxdev.xzpeter.org>","User-Agent":"NeoMutt/20170609-57-1e93be (1.8.3)","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2001:648:2000:de::183","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org, Markus Armbruster\n\t<armbru@redhat.com>, Stefan Hajnoczi <shajnocz@redhat.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>, Andreas =?utf-8?q?F=C3=A4rber?=\n\t<afaerber@suse.de>, \t\"Dr . David Alan Gilbert\" <dgilbert@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1774542,"web_url":"http://patchwork.ozlabs.org/comment/1774542/","msgid":"<f8b295e1-e2c5-fdce-d4ea-2161490ca08b@suse.de>","list_archive_url":null,"date":"2017-09-25T09:00:33","subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","submitter":{"id":9542,"url":"http://patchwork.ozlabs.org/api/people/9542/","name":"Andreas Färber","email":"afaerber@suse.de"},"content":"Hi,\n\nAm 25.09.2017 um 10:14 schrieb Peter Xu:\n> On Mon, Sep 25, 2017 at 09:14:21AM +0200, Andreas Färber wrote:\n>> Am 25.09.2017 um 08:37 schrieb Peter Xu:\n>>> We have object_get_objects_root() to keep user created objects, however\n>>> no place for objects that will be used internally.  Create such a\n>>> container for internal objects.\n>>>\n>>> CC: Andreas Färber <afaerber@suse.de>\n>>> CC: Markus Armbruster <armbru@redhat.com>\n>>> CC: Paolo Bonzini <pbonzini@redhat.com>\n>>> Suggested-by: Daniel P. Berrange <berrange@redhat.com>\n>>> Signed-off-by: Peter Xu <peterx@redhat.com>\n>>> ---\n>>>  include/qom/object.h | 10 ++++++++++\n>>>  qom/object.c         |  5 +++++\n>>>  2 files changed, 15 insertions(+)\n>>>\n>>> diff --git a/include/qom/object.h b/include/qom/object.h\n>>> index f3e5cff..f567052 100644\n>>> --- a/include/qom/object.h\n>>> +++ b/include/qom/object.h\n>>> @@ -1214,6 +1214,16 @@ Object *object_get_root(void);\n>>>  Object *object_get_objects_root(void);\n>>>  \n>>>  /**\n>>> + * object_get_internal_root:\n>>> + *\n>>> + * Get the container object that holds internally used object\n>>> + * instances. This is the object at path \"/internal-objects\"\n>>> + *\n>>> + * Returns: the internal object container\n>>> + */\n>>> +Object *object_get_internal_root(void);\n>>> +\n>>> +/**\n>>>   * object_get_canonical_path_component:\n>>>   *\n>>>   * Returns: The final component in the object's canonical path.  The canonical\n>>> diff --git a/qom/object.c b/qom/object.c\n>>> index 3e18537..857cee7 100644\n>>> --- a/qom/object.c\n>>> +++ b/qom/object.c\n>>> @@ -1370,6 +1370,11 @@ Object *object_get_objects_root(void)\n>>>      return container_get(object_get_root(), \"/objects\");\n>>>  }\n>>>  \n>>> +Object *object_get_internal_root(void)\n>>> +{\n>>> +    return container_get(object_get_root(), \"/internal-objects\");\n>>\n>> Whatever you expose in the QOM tree is no longer internal. Other name?\n> \n> Hi, Andreas,\n> \n> If you mean \"info qom-tree\" here, can we still treat it as internal?\n> Since after all it's not exposed in QMP (while IMHO QMP is the\n> official protocol for QEMU clients).  And IIUC some HMP commands do\n> dump some internal structs for debugging purpose (like: \"info\n> ramblock\").\n> \n> Or, do you have any suggestion?\n> \n> (I did think about something like \"hidden-objects\", but I believe they\n>  are not hidden as well if we think they are not internal...)\n\nI'm on travels and only seeing this 1/4 without context - according to\nManos apparently something about IOThreads.\n\nThe reason that certain container groups such as \"/machine/peripheral\"\nexist was more of a legacy reason for migration from qdev, so yes I am\ncritical of \"/hidden-objects\" as well. If the objects are not related to\nan existing device, you could just place them somewhere outside\n\"/machine\", e.g. directly in the root node or in a container specific to\nthat use case (/io? /threads?), rather than a new generic bucket of\nwhatever name. Any objects not under /machine should be close to what\nyou consider internal.\n\nNote that \"info qom-tree\" is not the only way to query the objects,\nthere's some Python QMP scripts as well.\n\nRegards,\nAndreas","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y0yk2460Tz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 19:01:14 +1000 (AEST)","from localhost ([::1]:41375 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwPGK-0001fH-NG\n\tfor incoming@patchwork.ozlabs.org; Mon, 25 Sep 2017 05:01:12 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:55303)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <afaerber@suse.de>) id 1dwPFm-0001bv-NW\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 05:00:39 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <afaerber@suse.de>) id 1dwPFj-00044v-Mz\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 05:00:38 -0400","from mx2.suse.de ([195.135.220.15]:42386 helo=mx1.suse.de)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <afaerber@suse.de>) id 1dwPFj-00043x-Dd\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 05:00:35 -0400","from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254])\n\tby mx1.suse.de (Postfix) with ESMTP id 98D96AB9D;\n\tMon, 25 Sep 2017 09:00:33 +0000 (UTC)"],"X-Virus-Scanned":"by amavisd-new at test-mx.suse.de","To":"Peter Xu <peterx@redhat.com>","References":"<1506321449-24013-1-git-send-email-peterx@redhat.com>\n\t<1506321449-24013-2-git-send-email-peterx@redhat.com>\n\t<4540074c-f523-41f4-3ce7-8b6514060fa4@suse.de>\n\t<20170925081426.GE19505@pxdev.xzpeter.org>","From":"=?utf-8?q?Andreas_F=C3=A4rber?= <afaerber@suse.de>","Organization":"SUSE Linux GmbH","Message-ID":"<f8b295e1-e2c5-fdce-d4ea-2161490ca08b@suse.de>","Date":"Mon, 25 Sep 2017 11:00:33 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170925081426.GE19505@pxdev.xzpeter.org>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no\n\ttimestamps) [generic] [fuzzy]","X-Received-From":"195.135.220.15","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Fam Zheng <famz@redhat.com>, Markus Armbruster <armbru@redhat.com>,\n\tqemu-devel@nongnu.org, Stefan Hajnoczi <shajnocz@redhat.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>,\n\t\"Dr . David Alan Gilbert\" <dgilbert@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1774544,"web_url":"http://patchwork.ozlabs.org/comment/1774544/","msgid":"<20170925090109.GE20236@redhat.com>","list_archive_url":null,"date":"2017-09-25T09:01:09","subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","submitter":{"id":2694,"url":"http://patchwork.ozlabs.org/api/people/2694/","name":"Daniel P. Berrangé","email":"berrange@redhat.com"},"content":"On Mon, Sep 25, 2017 at 09:14:21AM +0200, Andreas Färber wrote:\n> Am 25.09.2017 um 08:37 schrieb Peter Xu:\n> > We have object_get_objects_root() to keep user created objects, however\n> > no place for objects that will be used internally.  Create such a\n> > container for internal objects.\n> > \n> > CC: Andreas Färber <afaerber@suse.de>\n> > CC: Markus Armbruster <armbru@redhat.com>\n> > CC: Paolo Bonzini <pbonzini@redhat.com>\n> > Suggested-by: Daniel P. Berrange <berrange@redhat.com>\n> > Signed-off-by: Peter Xu <peterx@redhat.com>\n> > ---\n> >  include/qom/object.h | 10 ++++++++++\n> >  qom/object.c         |  5 +++++\n> >  2 files changed, 15 insertions(+)\n> > \n> > diff --git a/include/qom/object.h b/include/qom/object.h\n> > index f3e5cff..f567052 100644\n> > --- a/include/qom/object.h\n> > +++ b/include/qom/object.h\n> > @@ -1214,6 +1214,16 @@ Object *object_get_root(void);\n> >  Object *object_get_objects_root(void);\n> >  \n> >  /**\n> > + * object_get_internal_root:\n> > + *\n> > + * Get the container object that holds internally used object\n> > + * instances. This is the object at path \"/internal-objects\"\n> > + *\n> > + * Returns: the internal object container\n> > + */\n> > +Object *object_get_internal_root(void);\n> > +\n> > +/**\n> >   * object_get_canonical_path_component:\n> >   *\n> >   * Returns: The final component in the object's canonical path.  The canonical\n> > diff --git a/qom/object.c b/qom/object.c\n> > index 3e18537..857cee7 100644\n> > --- a/qom/object.c\n> > +++ b/qom/object.c\n> > @@ -1370,6 +1370,11 @@ Object *object_get_objects_root(void)\n> >      return container_get(object_get_root(), \"/objects\");\n> >  }\n> >  \n> > +Object *object_get_internal_root(void)\n> > +{\n> > +    return container_get(object_get_root(), \"/internal-objects\");\n> \n> Whatever you expose in the QOM tree is no longer internal. Other name?\n\nI guess the key concept trying to be expressed is that this will hold\nobjects created internally by QEMU code, in response to other configuration\ninput, as distinct from objects created externally by the user via -object.\n\nRegards,\nDaniel","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=berrange@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y0ykz2v5gz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 19:02:03 +1000 (AEST)","from localhost ([::1]:41380 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwPH7-0002JJ-FF\n\tfor incoming@patchwork.ozlabs.org; Mon, 25 Sep 2017 05:02:01 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:55491)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <berrange@redhat.com>) id 1dwPGW-0002Fx-IL\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 05:01:25 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <berrange@redhat.com>) id 1dwPGT-0004SO-Vd\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 05:01:24 -0400","from mx1.redhat.com ([209.132.183.28]:60578)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <berrange@redhat.com>) id 1dwPGT-0004Rs-ND\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 05:01:21 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 83AA085547;\n\tMon, 25 Sep 2017 09:01:20 +0000 (UTC)","from redhat.com (unknown [10.33.36.46])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 627556017A;\n\tMon, 25 Sep 2017 09:01:12 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 83AA085547","Date":"Mon, 25 Sep 2017 10:01:09 +0100","From":"\"Daniel P. Berrange\" <berrange@redhat.com>","To":"Andreas =?utf-8?q?F=C3=A4rber?= <afaerber@suse.de>","Message-ID":"<20170925090109.GE20236@redhat.com>","References":"<1506321449-24013-1-git-send-email-peterx@redhat.com>\n\t<1506321449-24013-2-git-send-email-peterx@redhat.com>\n\t<4540074c-f523-41f4-3ce7-8b6514060fa4@suse.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<4540074c-f523-41f4-3ce7-8b6514060fa4@suse.de>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]);\n\tMon, 25 Sep 2017 09:01:20 +0000 (UTC)","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Reply-To":"\"Daniel P. Berrange\" <berrange@redhat.com>","Cc":"Fam Zheng <famz@redhat.com>, Markus Armbruster <armbru@redhat.com>,\n\tqemu-devel@nongnu.org, Peter Xu <peterx@redhat.com>,\n\t\"Dr . David Alan Gilbert\" <dgilbert@redhat.com>,\n\tStefan Hajnoczi <shajnocz@redhat.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1774590,"web_url":"http://patchwork.ozlabs.org/comment/1774590/","msgid":"<20170925095523.GF14140@stefanha-x1.localdomain>","list_archive_url":null,"date":"2017-09-25T09:55:23","subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","submitter":{"id":2747,"url":"http://patchwork.ozlabs.org/api/people/2747/","name":"Stefan Hajnoczi","email":"stefanha@gmail.com"},"content":"On Mon, Sep 25, 2017 at 11:34:58AM +0300, Manos Pitsidianakis wrote:\n> On Mon, Sep 25, 2017 at 04:14:26PM +0800, Peter Xu wrote:\n> > On Mon, Sep 25, 2017 at 09:14:21AM +0200, Andreas Färber wrote:\n> > > Am 25.09.2017 um 08:37 schrieb Peter Xu:\n> > > > We have object_get_objects_root() to keep user created objects, however\n> > > > no place for objects that will be used internally.  Create such a\n> > > > container for internal objects.\n> > > >\n> > > > CC: Andreas Färber <afaerber@suse.de>\n> > > > CC: Markus Armbruster <armbru@redhat.com>\n> > > > CC: Paolo Bonzini <pbonzini@redhat.com>\n> > > > Suggested-by: Daniel P. Berrange <berrange@redhat.com>\n> > > > Signed-off-by: Peter Xu <peterx@redhat.com>\n> > > > ---\n> > > >  include/qom/object.h | 10 ++++++++++\n> > > >  qom/object.c         |  5 +++++\n> > > >  2 files changed, 15 insertions(+)\n> > > >\n> > > > diff --git a/include/qom/object.h b/include/qom/object.h\n> > > > index f3e5cff..f567052 100644\n> > > > --- a/include/qom/object.h\n> > > > +++ b/include/qom/object.h\n> > > > @@ -1214,6 +1214,16 @@ Object *object_get_root(void);\n> > > >  Object *object_get_objects_root(void);\n> > > >\n> > > >  /**\n> > > > + * object_get_internal_root:\n> > > > + *\n> > > > + * Get the container object that holds internally used object\n> > > > + * instances. This is the object at path \"/internal-objects\"\n> > > > + *\n> > > > + * Returns: the internal object container\n> > > > + */\n> > > > +Object *object_get_internal_root(void);\n> > > > +\n> > > > +/**\n> > > >   * object_get_canonical_path_component:\n> > > >   *\n> > > >   * Returns: The final component in the object's canonical path.  The canonical\n> > > > diff --git a/qom/object.c b/qom/object.c\n> > > > index 3e18537..857cee7 100644\n> > > > --- a/qom/object.c\n> > > > +++ b/qom/object.c\n> > > > @@ -1370,6 +1370,11 @@ Object *object_get_objects_root(void)\n> > > >      return container_get(object_get_root(), \"/objects\");\n> > > >  }\n> > > >\n> > > > +Object *object_get_internal_root(void)\n> > > > +{\n> > > > +    return container_get(object_get_root(), \"/internal-objects\");\n> > > \n> > > Whatever you expose in the QOM tree is no longer internal. Other name?\n> > \n> > Hi, Andreas,\n> > \n> > If you mean \"info qom-tree\" here, can we still treat it as internal?\n> > Since after all it's not exposed in QMP (while IMHO QMP is the\n> > official protocol for QEMU clients).  And IIUC some HMP commands do\n> > dump some internal structs for debugging purpose (like: \"info\n> > ramblock\").\n> > \n> > Or, do you have any suggestion?\n> > \n> > (I did think about something like \"hidden-objects\", but I believe they\n> > are not hidden as well if we think they are not internal...)\n> > \n> > Thanks,\n> > \n> > > \n> > > Regards,\n> > > Andreas\n> \n> If there's no need for internal IOThreads to be together with user created\n> ones, a simple queue will be enough (include/qemu/queue.h).\n\nTwo solutions:\n\n1. Manos' suggestion is Object->parent == NULL.  Simply don't add the\n   Object to a parent.\n\n2. Create an internal root that isn't accessible via QMP.\n   Object *internal_root = object_new(\"container).\n\nStefan","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"nCMyA5Ad\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y0zxP29Z9z9t62\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 19:56:08 +1000 (AEST)","from localhost ([::1]:41536 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwQ7P-0002c0-Fz\n\tfor incoming@patchwork.ozlabs.org; Mon, 25 Sep 2017 05:56:03 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:40069)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <stefanha@gmail.com>) id 1dwQ6u-0002br-P4\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 05:55:34 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <stefanha@gmail.com>) id 1dwQ6p-0007a3-64\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 05:55:32 -0400","from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:33832)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <stefanha@gmail.com>) id 1dwQ6o-0007Za-W2\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 05:55:27 -0400","by mail-wm0-x242.google.com with SMTP id i131so6701491wma.1\n\tfor <qemu-devel@nongnu.org>; Mon, 25 Sep 2017 02:55:26 -0700 (PDT)","from localhost ([51.15.41.238]) by smtp.gmail.com with ESMTPSA id\n\t29sm9966549wrz.77.2017.09.25.02.55.24\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 25 Sep 2017 02:55:24 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=PhmMMdrNRcYebMC9rBu2FTsCcv+tdJR9Ytl2TJZxFBA=;\n\tb=nCMyA5AdGeiFkkGu5G/w/551b/KAUv0ZcYTvZz/VuWn6Cx1UpI3mTkCc7yn1Cbui10\n\tMRl3FxiOzUe8OmFVzH7t+s5l81zuLVETnzsBxCygFSZA4UfRWuDeK3SxUBztgG2h/q/u\n\tgFYJSkxIv7HNhCd+D9CQkC74RhpE/VvlExudx22/BjzAjpr/P4/ZpER1XP43hwYlY8CA\n\tsgTeSpvhbwc6cUezHYs4qoh4SIz1WyS+PABe+S5cMilhklqvQZBANzFuwfYVUYOtznyS\n\tNlI5aoc2Inz/oxCKTXvDtn+Nj2EpAqJ9NSafkbs1RcXlCTF0W8oBGyBD+62R13BUl1SH\n\tMV4Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=PhmMMdrNRcYebMC9rBu2FTsCcv+tdJR9Ytl2TJZxFBA=;\n\tb=cX1kK3AJjy/eikNH41+BTU78yyC0YEXf8ZQc3FKVdsfTER79q7iCtIWKYoWfp7SvGK\n\tuHXU/CAyItt3wuWjhcSbrJo5lCQkHKllMcWAIOCnO8VZSz3mGG0MRpDVqp7GGByRfX/F\n\trWTGve7JlYhgMahKcVPVgBkiLoX/ObeS9Znb1wY8Qfa8/J19OHF7VSspBcUfOLV+cmR+\n\tlwtAW3udxRs215GAulkCsIJ/5Q5gfjhbbUPICiGA/HEcJT5l16jibgNaDAbU0WKaheQq\n\tUnBPR+m5SPxkJC0mcmsfV+LJOEtmLibXBwBZNqWRwa+NxodPmsPzvTiGWWKd45lCbROy\n\twhtQ==","X-Gm-Message-State":"AHPjjUgnCpb9XPpDt8VFrcUauCiUI3vTfPcfHfejJ5rSKwwPc4gscFeD\n\tvfmryQdWdkDU7JYhbjahvvw=","X-Google-Smtp-Source":"AOwi7QAcCPmdOLL/bmEdiAqjFSdWw7ldKxdtMsn6NidB3WJJ146jQIN0GAkfXorX3Eyd0I1dU1PPbQ==","X-Received":"by 10.28.52.132 with SMTP id b126mr9648190wma.144.1506333325837; \n\tMon, 25 Sep 2017 02:55:25 -0700 (PDT)","Date":"Mon, 25 Sep 2017 10:55:23 +0100","From":"Stefan Hajnoczi <stefanha@gmail.com>","To":"Manos Pitsidianakis <el13635@mail.ntua.gr>, Peter Xu <peterx@redhat.com>,\n\tAndreas =?iso-8859-1?q?F=E4rber?= <afaerber@suse.de>,\n\tFam Zheng <famz@redhat.com>, Markus Armbruster <armbru@redhat.com>, \n\tqemu-devel@nongnu.org, Stefan Hajnoczi <shajnocz@redhat.com>, \n\tPaolo Bonzini <pbonzini@redhat.com>, \"Dr . David Alan Gilbert\"\n\t<dgilbert@redhat.com>","Message-ID":"<20170925095523.GF14140@stefanha-x1.localdomain>","References":"<1506321449-24013-1-git-send-email-peterx@redhat.com>\n\t<1506321449-24013-2-git-send-email-peterx@redhat.com>\n\t<4540074c-f523-41f4-3ce7-8b6514060fa4@suse.de>\n\t<20170925081426.GE19505@pxdev.xzpeter.org>\n\t<20170925083458.luy7kjv6x56lptvi@postretch>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20170925083458.luy7kjv6x56lptvi@postretch>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c09::242","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1774591,"web_url":"http://patchwork.ozlabs.org/comment/1774591/","msgid":"<20170925095651.GG14140@stefanha-x1.localdomain>","list_archive_url":null,"date":"2017-09-25T09:56:51","subject":"Re: [Qemu-devel] [PATCH v2 3/4] iothread: export iothread_stop()","submitter":{"id":2747,"url":"http://patchwork.ozlabs.org/api/people/2747/","name":"Stefan Hajnoczi","email":"stefanha@gmail.com"},"content":"On Mon, Sep 25, 2017 at 02:37:28PM +0800, Peter Xu wrote:\n> So that internal iothread users can explicitly stop one iothread without\n> destroying it.\n> \n> Since at it, fix iothread_stop() to allow it to be called multiple\n> times.  Before this patch we may call iothread_stop() more than once on\n> single iothread, while that may not be correct since qemu_thread_join()\n> is not allowed to run twice.  From manual of pthread_join():\n> \n>   Joining with a thread that has previously been joined results in\n>   undefined behavior.\n> \n> Signed-off-by: Peter Xu <peterx@redhat.com>\n> ---\n>  include/sysemu/iothread.h |  1 +\n>  iothread.c                | 24 ++++++++++++++++--------\n>  2 files changed, 17 insertions(+), 8 deletions(-)\n\nReviewed-by: Stefan Hajnoczi <stefanha@redhat.com>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"T1G8DFP3\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y0zz40vbHz9t62\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 19:57:36 +1000 (AEST)","from localhost ([::1]:41541 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwQ8s-0003u5-5n\n\tfor incoming@patchwork.ozlabs.org; Mon, 25 Sep 2017 05:57:34 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:40487)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <stefanha@gmail.com>) id 1dwQ8J-0003tG-7H\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 05:56:59 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <stefanha@gmail.com>) id 1dwQ8E-00088D-Vu\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 05:56:59 -0400","from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:33300)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <stefanha@gmail.com>) id 1dwQ8E-000872-QE\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 05:56:54 -0400","by mail-wm0-x244.google.com with SMTP id m127so6721134wmm.0\n\tfor <qemu-devel@nongnu.org>; Mon, 25 Sep 2017 02:56:54 -0700 (PDT)","from localhost ([51.15.41.238]) by smtp.gmail.com with ESMTPSA id\n\tq188sm4998374wmb.43.2017.09.25.02.56.52\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 25 Sep 2017 02:56:52 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=/HQg/bGhulcZFdy5M35yetRFfEcu5y4p+iKHwIUZM+Y=;\n\tb=T1G8DFP3Peca1XO6WoWZ+wgd2YTOIvDTEcvgTGuhYa7TiNHv5EIR1qyVrgi/1Gd2Ym\n\t/hi4liEDmuG21VFC/LIFDOOCUfgRxOst2Yd2fgcqiKaoTFk7Z6Mjc2nvjv/KkvYsKXjy\n\tlSde24X4ngZ8PpwF8g6L/RPXYu2L1GbOugldfGgVpuvSrLh3JOJYp7lrkIA9CjiNOVp/\n\t2hL5UQpqBPHTBxdCm4zgz8RsN+z2i5/eFNSOZhzL2cKTEpawuwMYPl7dPMSUmpRzE3x2\n\tboAuJNklrsisbRNGn8QNlleV7/xrn8kyI117NgwMyk8PjOenBufhPziRqiwyoGA4fJnk\n\tOCOg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=/HQg/bGhulcZFdy5M35yetRFfEcu5y4p+iKHwIUZM+Y=;\n\tb=mEylM6nIQhgjlxzpyTUwcmrI6tjPkcdF6DP5rl1KWu/nlhwH7CjJLfvMjGmg7xnTU+\n\tA+jLrWkDfDJiQI/JoB3s406zJAozo4hNkKP0HvqsjIinBxFhIOyXyrrO7b6zgle6Mqsp\n\tHT///j/01Jj+GgUu3zEstF/zC8fa1xAGY2+7nOxNqJisNeQZ5MWAkPxA6vk+35roQv2e\n\tsJBGf4yYKBWXrW9B9ShQuQyB/rW9tX/Xnr73TreM5nrxmvp9f9lv64fjEbc2e7VYk+s6\n\tvXlMt3m2yXlghDH0ZYA4F5/oDAFP8KVIBieriY2RFkeVdXDhmHiMcbi+roH7tpVBlpG4\n\tQ8ng==","X-Gm-Message-State":"AHPjjUisIZneqhuMpdfCk522mHijcrlKBB3GMk+J8BAFIJBrsS48YOJp\n\tfI0BY9LM9CfjzPeFfmvmrqU=","X-Google-Smtp-Source":"AOwi7QDTq9squ5H0s4nO7IzcW+UXqBYE/oSnv4EyGyTXHg5zocvWP5dAz5sRRDSbP+2e3kTGo+yY6Q==","X-Received":"by 10.28.223.87 with SMTP id w84mr10895633wmg.148.1506333413715; \n\tMon, 25 Sep 2017 02:56:53 -0700 (PDT)","Date":"Mon, 25 Sep 2017 10:56:51 +0100","From":"Stefan Hajnoczi <stefanha@gmail.com>","To":"Peter Xu <peterx@redhat.com>","Message-ID":"<20170925095651.GG14140@stefanha-x1.localdomain>","References":"<1506321449-24013-1-git-send-email-peterx@redhat.com>\n\t<1506321449-24013-4-git-send-email-peterx@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1506321449-24013-4-git-send-email-peterx@redhat.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c09::244","Subject":"Re: [Qemu-devel] [PATCH v2 3/4] iothread: export iothread_stop()","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Stefan Hajnoczi <shajnocz@redhat.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>, \n\tFam Zheng <famz@redhat.com>, qemu-devel@nongnu.org,\n\t\"Dr . David Alan Gilbert\" <dgilbert@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1774597,"web_url":"http://patchwork.ozlabs.org/comment/1774597/","msgid":"<20170925100048.GH14140@stefanha-x1.localdomain>","list_archive_url":null,"date":"2017-09-25T10:00:48","subject":"Re: [Qemu-devel] [PATCH v2 4/4] iothread: delay the context release\n\tto finalize","submitter":{"id":2747,"url":"http://patchwork.ozlabs.org/api/people/2747/","name":"Stefan Hajnoczi","email":"stefanha@gmail.com"},"content":"On Mon, Sep 25, 2017 at 02:37:29PM +0800, Peter Xu wrote:\n> When gcontext is used with iothread, the context will be destroyed\n> during iothread_stop().  That's not good since sometimes we would like\n> to keep the resources until iothread is destroyed, but we may want to\n> stop the thread before that point.\n> \n> Delay the destruction of gcontext to iothread finalize.  Then we can do:\n> \n>   iothread_stop(thread);\n>   some_cleanup_on_resources();\n>   iothread_destroy(thread);\n> \n> We may need this patch if we want to run chardev IOs in iothreads and\n> hopefully clean them up correctly.  For more specific information,\n> please see 2b316774f6 (\"qemu-char: do not operate on sources from\n> finalize callbacks\").\n> \n> Signed-off-by: Peter Xu <peterx@redhat.com>\n> ---\n>  iothread.c | 6 ++++--\n>  1 file changed, 4 insertions(+), 2 deletions(-)\n\nReviewed-by: Stefan Hajnoczi <stefanha@redhat.com>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"gJjy7aS1\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y103y1ngYz9tX3\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 20:01:49 +1000 (AEST)","from localhost ([::1]:41556 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwQCw-00066H-GC\n\tfor incoming@patchwork.ozlabs.org; Mon, 25 Sep 2017 06:01:46 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:41385)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <stefanha@gmail.com>) id 1dwQCa-00064m-C9\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 06:01:26 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <stefanha@gmail.com>) id 1dwQC3-0001ki-NW\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 06:01:24 -0400","from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:36532)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <stefanha@gmail.com>) id 1dwQC3-0001k3-6c\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 06:00:51 -0400","by mail-wr0-x242.google.com with SMTP id g50so1676293wra.3\n\tfor <qemu-devel@nongnu.org>; Mon, 25 Sep 2017 03:00:51 -0700 (PDT)","from localhost ([51.15.41.238]) by smtp.gmail.com with ESMTPSA id\n\tk9sm6392338wrk.27.2017.09.25.03.00.48\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 25 Sep 2017 03:00:49 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=XFSSi5URWzvUAqJgQb+5qJ7GCciO0VnjE0Jkwo8M9yY=;\n\tb=gJjy7aS15NCGxRA2gwcU1jBwa4Qg3ZsvW8bW6K1Lkl2YF5jqIszPvnbo4Wt56TUn5d\n\tSwPEsqpDB1JoWQ4+/RrCzDtiv38IRguTybVMvFAgf3OekUiFsGviqFMXyUi9cN8xjQ01\n\tvifk/d9ZVZkReNNYBfA1/+y//EQP9zTEN1W79cfrD0sMkW6CdMboFHLpacat1NJQ/pu+\n\tyBxSE43YvnDzXB1zC5NIC6FOsriDhRtUVi+MbH0zjv6kEg/NNhx/8nmyeIGsD1LzrPcC\n\tOr99tNmHoshhgkys+gVxP5B4nKYL4RxRtIL8klqg+a5gm7SoLSWk9ArIw2h5CQ6GyVMf\n\tPP9g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=XFSSi5URWzvUAqJgQb+5qJ7GCciO0VnjE0Jkwo8M9yY=;\n\tb=R0Jj5h2PgaYYDSPmr4Hyi0xxJQM6tQoBOInBvmaNM5EhAdM6Ffv3T/0xs88EsVvTms\n\t6fwu0Ti5d+0uQKooae/DlIox3sVik8psrIv9PwooF5HJqdnLl9FTfnYGOZes94qCwCTJ\n\tI5bkJMZP0eMHiJpuFIz1visyFBYAkG8u9aUXY2fwxHlvcIvPvS0QGdG1nGa6s8HWOR62\n\t35gO/s9mvYHsQB7JQCAxQVDXRQZxn6zSB1n3NaYB8vd4naJUiCqbyKrvHD1CxXVEDFUz\n\tZw7XFKUS3RlsH+UvkLh3Yu6dNVHlLkKV21zmIYVOZI/pHbM+h5pAuff6QIW0Q2Gkpk2F\n\tVhtQ==","X-Gm-Message-State":"AHPjjUggGpApOds9K8BNYLJ5P75WVyORkl6SwvbRBd9arI2ygNYhRK3L\n\t6U9quN6G8TvVM9s4c4yRWWs=","X-Google-Smtp-Source":"AOwi7QCL6tH7jhJUbSb61Blpl3HlKyJkdaieBHEhtLylnfRf4T+Te7czeIivCNgK/i797IbxNBIODA==","X-Received":"by 10.223.164.74 with SMTP id e10mr6029152wra.19.1506333649981; \n\tMon, 25 Sep 2017 03:00:49 -0700 (PDT)","Date":"Mon, 25 Sep 2017 11:00:48 +0100","From":"Stefan Hajnoczi <stefanha@gmail.com>","To":"Peter Xu <peterx@redhat.com>","Message-ID":"<20170925100048.GH14140@stefanha-x1.localdomain>","References":"<1506321449-24013-1-git-send-email-peterx@redhat.com>\n\t<1506321449-24013-5-git-send-email-peterx@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1506321449-24013-5-git-send-email-peterx@redhat.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2a00:1450:400c:c0c::242","Subject":"Re: [Qemu-devel] [PATCH v2 4/4] iothread: delay the context release\n\tto finalize","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Stefan Hajnoczi <shajnocz@redhat.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>, \n\tFam Zheng <famz@redhat.com>, qemu-devel@nongnu.org,\n\t\"Dr . David Alan Gilbert\" <dgilbert@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1775110,"web_url":"http://patchwork.ozlabs.org/comment/1775110/","msgid":"<20170926031815.GL19505@pxdev.xzpeter.org>","list_archive_url":null,"date":"2017-09-26T03:18:15","subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","submitter":{"id":67717,"url":"http://patchwork.ozlabs.org/api/people/67717/","name":"Peter Xu","email":"peterx@redhat.com"},"content":"On Mon, Sep 25, 2017 at 11:00:33AM +0200, Andreas Färber wrote:\n> Hi,\n> \n> Am 25.09.2017 um 10:14 schrieb Peter Xu:\n> > On Mon, Sep 25, 2017 at 09:14:21AM +0200, Andreas Färber wrote:\n> >> Am 25.09.2017 um 08:37 schrieb Peter Xu:\n> >>> We have object_get_objects_root() to keep user created objects, however\n> >>> no place for objects that will be used internally.  Create such a\n> >>> container for internal objects.\n> >>>\n> >>> CC: Andreas Färber <afaerber@suse.de>\n> >>> CC: Markus Armbruster <armbru@redhat.com>\n> >>> CC: Paolo Bonzini <pbonzini@redhat.com>\n> >>> Suggested-by: Daniel P. Berrange <berrange@redhat.com>\n> >>> Signed-off-by: Peter Xu <peterx@redhat.com>\n> >>> ---\n> >>>  include/qom/object.h | 10 ++++++++++\n> >>>  qom/object.c         |  5 +++++\n> >>>  2 files changed, 15 insertions(+)\n> >>>\n> >>> diff --git a/include/qom/object.h b/include/qom/object.h\n> >>> index f3e5cff..f567052 100644\n> >>> --- a/include/qom/object.h\n> >>> +++ b/include/qom/object.h\n> >>> @@ -1214,6 +1214,16 @@ Object *object_get_root(void);\n> >>>  Object *object_get_objects_root(void);\n> >>>  \n> >>>  /**\n> >>> + * object_get_internal_root:\n> >>> + *\n> >>> + * Get the container object that holds internally used object\n> >>> + * instances. This is the object at path \"/internal-objects\"\n> >>> + *\n> >>> + * Returns: the internal object container\n> >>> + */\n> >>> +Object *object_get_internal_root(void);\n> >>> +\n> >>> +/**\n> >>>   * object_get_canonical_path_component:\n> >>>   *\n> >>>   * Returns: The final component in the object's canonical path.  The canonical\n> >>> diff --git a/qom/object.c b/qom/object.c\n> >>> index 3e18537..857cee7 100644\n> >>> --- a/qom/object.c\n> >>> +++ b/qom/object.c\n> >>> @@ -1370,6 +1370,11 @@ Object *object_get_objects_root(void)\n> >>>      return container_get(object_get_root(), \"/objects\");\n> >>>  }\n> >>>  \n> >>> +Object *object_get_internal_root(void)\n> >>> +{\n> >>> +    return container_get(object_get_root(), \"/internal-objects\");\n> >>\n> >> Whatever you expose in the QOM tree is no longer internal. Other name?\n> > \n> > Hi, Andreas,\n> > \n> > If you mean \"info qom-tree\" here, can we still treat it as internal?\n> > Since after all it's not exposed in QMP (while IMHO QMP is the\n> > official protocol for QEMU clients).  And IIUC some HMP commands do\n> > dump some internal structs for debugging purpose (like: \"info\n> > ramblock\").\n> > \n> > Or, do you have any suggestion?\n> > \n> > (I did think about something like \"hidden-objects\", but I believe they\n> >  are not hidden as well if we think they are not internal...)\n> \n> I'm on travels and only seeing this 1/4 without context - according to\n> Manos apparently something about IOThreads.\n> \n> The reason that certain container groups such as \"/machine/peripheral\"\n> exist was more of a legacy reason for migration from qdev, so yes I am\n> critical of \"/hidden-objects\" as well. If the objects are not related to\n> an existing device, you could just place them somewhere outside\n> \"/machine\", e.g. directly in the root node or in a container specific to\n> that use case (/io? /threads?), rather than a new generic bucket of\n> whatever name. Any objects not under /machine should be close to what\n> you consider internal.\n> \n> Note that \"info qom-tree\" is not the only way to query the objects,\n> there's some Python QMP scripts as well.\n\nI see.  I'll take away Stefan's suggestion to create a standalone\ncontainer for internal objects, so that it will be totally hidden.\n\nI didn't choose to allow parent == NULL to avoid breaking or modifying\nQOM interfaces.\n\nPreparing another post.  Thanks all!\n\n> \n> Regards,\n> Andreas\n> \n> -- \n> SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany\n> GF: Felix Imendörffer, Jane Smithard, Graham Norton\n> HRB 21284 (AG Nürnberg)","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=peterx@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1R4Y2bQkz9t3F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 13:18:50 +1000 (AEST)","from localhost ([::1]:45364 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwgOW-000161-1f\n\tfor incoming@patchwork.ozlabs.org; Mon, 25 Sep 2017 23:18:48 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:59714)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <peterx@redhat.com>) id 1dwgOB-00015l-22\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 23:18:28 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <peterx@redhat.com>) id 1dwgO7-0006R0-SM\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 23:18:27 -0400","from mx1.redhat.com ([209.132.183.28]:45500)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <peterx@redhat.com>) id 1dwgO7-0006Qo-Kn\n\tfor qemu-devel@nongnu.org; Mon, 25 Sep 2017 23:18:23 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 564E6C0587F2;\n\tTue, 26 Sep 2017 03:18:22 +0000 (UTC)","from pxdev.xzpeter.org (dhcp-15-224.nay.redhat.com [10.66.15.224])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 6B02669A65;\n\tTue, 26 Sep 2017 03:18:17 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 564E6C0587F2","Date":"Tue, 26 Sep 2017 11:18:15 +0800","From":"Peter Xu <peterx@redhat.com>","To":"Andreas =?utf-8?q?F=C3=A4rber?= <afaerber@suse.de>","Message-ID":"<20170926031815.GL19505@pxdev.xzpeter.org>","References":"<1506321449-24013-1-git-send-email-peterx@redhat.com>\n\t<1506321449-24013-2-git-send-email-peterx@redhat.com>\n\t<4540074c-f523-41f4-3ce7-8b6514060fa4@suse.de>\n\t<20170925081426.GE19505@pxdev.xzpeter.org>\n\t<f8b295e1-e2c5-fdce-d4ea-2161490ca08b@suse.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<f8b295e1-e2c5-fdce-d4ea-2161490ca08b@suse.de>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.32]);\n\tTue, 26 Sep 2017 03:18:22 +0000 (UTC)","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for\n\tinternal objs","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Fam Zheng <famz@redhat.com>, Manos Pitsidianakis <el13635@mail.ntua.gr>, \n\tMarkus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org,\n\tStefan Hajnoczi <shajnocz@redhat.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>, \n\t\"Dr . David Alan Gilbert\" <dgilbert@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]