From: Eduardo Habkost <ehabkost@redhat.com> To: qemu-devel@nongnu.org Cc: Thomas Huth <thuth@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Markus Armbruster <armbru@redhat.com>, Like Xu <like.xu@linux.intel.com>, Paolo Bonzini <pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 0/4] Remove some qdev_get_machine() calls from CONFIG_USER_ONLY Date: Thu, 25 Apr 2019 17:00:47 -0300 [thread overview] Message-ID: <20190425200051.19906-1-ehabkost@redhat.com> (raw) This series moves some qdev code outside qdev.o, so it can be compiled only in CONFIG_SOFTMMU. The code being moved includes two qdev_get_machine() calls, so this will make it easier to move qdev_get_machine() to CONFIG_SOFTMMU later. After this series, there's one remaining qdev_get_machine() call that seems more difficult to remove: static void device_set_realized(Object *obj, bool value, Error **errp) { /* [...] */ if (!obj->parent) { gchar *name = g_strdup_printf("device[%d]", unattached_count++); object_property_add_child(container_get(qdev_get_machine(), "/unattached"), name, obj, &error_abort); unattached_parent = true; g_free(name); } /* [...] */ } This one is tricky because on system emulation mode it needs "/machine" to already exist, but in user-only mode it needs to implicitly create a "/machine" container. Eduardo Habkost (4): machine: Move gpio code to hw/core/gpio.c move qdev hotplug code to qdev-hotplug.c qdev: Don't compile hotplug code in user-mode emulation qdev-hotplug: Don't check type of qdev_get_machine() hw/core/bus.c | 11 -- hw/core/gpio.c | 206 ++++++++++++++++++++++++++++++++ hw/core/qdev-hotplug-stubs.c | 44 +++++++ hw/core/qdev-hotplug.c | 64 ++++++++++ hw/core/qdev.c | 219 ----------------------------------- hw/core/Makefile.objs | 5 +- tests/Makefile.include | 3 +- 7 files changed, 320 insertions(+), 232 deletions(-) create mode 100644 hw/core/gpio.c create mode 100644 hw/core/qdev-hotplug-stubs.c create mode 100644 hw/core/qdev-hotplug.c -- 2.18.0.rc1.1.g3f1ff2140
WARNING: multiple messages have this Message-ID (diff)
From: Eduardo Habkost <ehabkost@redhat.com> To: qemu-devel@nongnu.org Cc: Peter Maydell <peter.maydell@linaro.org>, Thomas Huth <thuth@redhat.com>, Markus Armbruster <armbru@redhat.com>, Like Xu <like.xu@linux.intel.com>, Paolo Bonzini <pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 0/4] Remove some qdev_get_machine() calls from CONFIG_USER_ONLY Date: Thu, 25 Apr 2019 17:00:47 -0300 [thread overview] Message-ID: <20190425200051.19906-1-ehabkost@redhat.com> (raw) Message-ID: <20190425200047.CiGB-x_1Hm1OKbLO5jtPvn5PaYt4DBFYzK6-RpW_GPM@z> (raw) This series moves some qdev code outside qdev.o, so it can be compiled only in CONFIG_SOFTMMU. The code being moved includes two qdev_get_machine() calls, so this will make it easier to move qdev_get_machine() to CONFIG_SOFTMMU later. After this series, there's one remaining qdev_get_machine() call that seems more difficult to remove: static void device_set_realized(Object *obj, bool value, Error **errp) { /* [...] */ if (!obj->parent) { gchar *name = g_strdup_printf("device[%d]", unattached_count++); object_property_add_child(container_get(qdev_get_machine(), "/unattached"), name, obj, &error_abort); unattached_parent = true; g_free(name); } /* [...] */ } This one is tricky because on system emulation mode it needs "/machine" to already exist, but in user-only mode it needs to implicitly create a "/machine" container. Eduardo Habkost (4): machine: Move gpio code to hw/core/gpio.c move qdev hotplug code to qdev-hotplug.c qdev: Don't compile hotplug code in user-mode emulation qdev-hotplug: Don't check type of qdev_get_machine() hw/core/bus.c | 11 -- hw/core/gpio.c | 206 ++++++++++++++++++++++++++++++++ hw/core/qdev-hotplug-stubs.c | 44 +++++++ hw/core/qdev-hotplug.c | 64 ++++++++++ hw/core/qdev.c | 219 ----------------------------------- hw/core/Makefile.objs | 5 +- tests/Makefile.include | 3 +- 7 files changed, 320 insertions(+), 232 deletions(-) create mode 100644 hw/core/gpio.c create mode 100644 hw/core/qdev-hotplug-stubs.c create mode 100644 hw/core/qdev-hotplug.c -- 2.18.0.rc1.1.g3f1ff2140
next reply other threads:[~2019-04-25 20:01 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-25 20:00 Eduardo Habkost [this message] 2019-04-25 20:00 ` [Qemu-devel] [PATCH 0/4] Remove some qdev_get_machine() calls from CONFIG_USER_ONLY Eduardo Habkost 2019-04-25 20:00 ` [Qemu-devel] [PATCH 1/4] machine: Move gpio code to hw/core/gpio.c Eduardo Habkost 2019-04-25 20:00 ` Eduardo Habkost 2021-11-01 16:24 ` Philippe Mathieu-Daudé 2019-04-25 20:00 ` [Qemu-devel] [PATCH 2/4] move qdev hotplug code to qdev-hotplug.c Eduardo Habkost 2019-04-25 20:00 ` Eduardo Habkost 2019-04-25 20:00 ` [Qemu-devel] [PATCH 3/4] qdev: Don't compile hotplug code in user-mode emulation Eduardo Habkost 2019-04-25 20:00 ` Eduardo Habkost 2019-04-26 8:27 ` Paolo Bonzini 2019-04-26 8:27 ` Paolo Bonzini 2019-04-26 11:21 ` Eduardo Habkost 2019-04-26 11:21 ` Eduardo Habkost 2019-04-25 20:00 ` [Qemu-devel] [PATCH 4/4] qdev-hotplug: Don't check type of qdev_get_machine() Eduardo Habkost 2019-04-25 20:00 ` Eduardo Habkost 2021-11-01 18:03 ` Philippe Mathieu-Daudé 2019-04-25 20:09 ` [Qemu-devel] [PATCH 0/4] Remove some qdev_get_machine() calls from CONFIG_USER_ONLY no-reply 2019-04-25 20:09 ` no-reply 2019-04-26 8:55 ` Like Xu 2019-04-26 8:55 ` Like Xu 2019-05-02 20:24 ` Eduardo Habkost 2019-05-02 20:24 ` Eduardo Habkost 2019-05-06 14:34 ` Markus Armbruster 2021-11-01 18:27 ` Philippe Mathieu-Daudé
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190425200051.19906-1-ehabkost@redhat.com \ --to=ehabkost@redhat.com \ --cc=armbru@redhat.com \ --cc=like.xu@linux.intel.com \ --cc=pbonzini@redhat.com \ --cc=peter.maydell@linaro.org \ --cc=qemu-devel@nongnu.org \ --cc=thuth@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).