* [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 @ 2016-06-16 17:06 Eduardo Habkost 2016-06-16 17:06 ` [Qemu-devel] [PULL 1/2] qdev: Use GList for global properties Eduardo Habkost ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Eduardo Habkost @ 2016-06-16 17:06 UTC (permalink / raw) To: qemu-devel, Peter Maydell; +Cc: Paolo Bonzini, Marcel Apfelbaum Very few changes in the machine tree recently, but I don't want to hold the patches for too long. The following changes since commit a66370b08d53837eb233cad090b3c2638084cc44: Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.7-4' into staging (2016-06-16 10:53:33 +0100) are available in the git repository at: git://github.com/ehabkost/qemu.git tags/machine-pull-request for you to fetch changes up to f4ad4c1d10f6c1cfd1f2f8b1194e94dbdbc2d3b9: vnc: Wrap vnc initialization code with CONFIG_VNC (2016-06-16 11:37:44 -0300) ---------------------------------------------------------------- Machine queue, 2016-06-16 ---------------------------------------------------------------- Chao Peng (1): vnc: Wrap vnc initialization code with CONFIG_VNC Eduardo Habkost (1): qdev: Use GList for global properties hw/core/qdev-properties.c | 15 ++++++++------- include/hw/qdev-core.h | 1 - vl.c | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) -- 2.5.5 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 1/2] qdev: Use GList for global properties 2016-06-16 17:06 [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 Eduardo Habkost @ 2016-06-16 17:06 ` Eduardo Habkost 2016-06-16 17:06 ` [Qemu-devel] [PULL 2/2] vnc: Wrap vnc initialization code with CONFIG_VNC Eduardo Habkost 2016-06-17 10:19 ` [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 Peter Maydell 2 siblings, 0 replies; 6+ messages in thread From: Eduardo Habkost @ 2016-06-16 17:06 UTC (permalink / raw) To: qemu-devel, Peter Maydell; +Cc: Paolo Bonzini, Marcel Apfelbaum If the same GlobalProperty struct is registered twice, the list entry gets corrupted, making tqe_next points to itself, and qdev_prop_set_globals() gets stuck in a loop. The bug can be easily reproduced by running: $ qemu-system-x86_64 -rtc-td-hack -rtc-td-hack Change global_props to use GList instead of queue.h, making the code simpler and able to deal with properties being registered twice. Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- hw/core/qdev-properties.c | 15 ++++++++------- include/hw/qdev-core.h | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 737d29c..e3b2184 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -1020,12 +1020,11 @@ void qdev_prop_set_ptr(DeviceState *dev, const char *name, void *value) *ptr = value; } -static QTAILQ_HEAD(, GlobalProperty) global_props = - QTAILQ_HEAD_INITIALIZER(global_props); +static GList *global_props; void qdev_prop_register_global(GlobalProperty *prop) { - QTAILQ_INSERT_TAIL(&global_props, prop, next); + global_props = g_list_append(global_props, prop); } void qdev_prop_register_global_list(GlobalProperty *props) @@ -1039,10 +1038,11 @@ void qdev_prop_register_global_list(GlobalProperty *props) int qdev_prop_check_globals(void) { - GlobalProperty *prop; + GList *l; int ret = 0; - QTAILQ_FOREACH(prop, &global_props, next) { + for (l = global_props; l; l = l->next) { + GlobalProperty *prop = l->data; ObjectClass *oc; DeviceClass *dc; if (prop->used) { @@ -1073,9 +1073,10 @@ int qdev_prop_check_globals(void) static void qdev_prop_set_globals_for_type(DeviceState *dev, const char *typename) { - GlobalProperty *prop; + GList *l; - QTAILQ_FOREACH(prop, &global_props, next) { + for (l = global_props; l; l = l->next) { + GlobalProperty *prop = l->data; Error *err = NULL; if (strcmp(typename, prop->driver) != 0) { diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 1ce02b2..24aa0a7 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -266,7 +266,6 @@ typedef struct GlobalProperty { const char *value; bool user_provided; bool used; - QTAILQ_ENTRY(GlobalProperty) next; } GlobalProperty; /*** Board API. This should go away once we have a machine config file. ***/ -- 2.5.5 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 2/2] vnc: Wrap vnc initialization code with CONFIG_VNC 2016-06-16 17:06 [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 Eduardo Habkost 2016-06-16 17:06 ` [Qemu-devel] [PULL 1/2] qdev: Use GList for global properties Eduardo Habkost @ 2016-06-16 17:06 ` Eduardo Habkost 2016-06-17 10:19 ` [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 Peter Maydell 2 siblings, 0 replies; 6+ messages in thread From: Eduardo Habkost @ 2016-06-16 17:06 UTC (permalink / raw) To: qemu-devel, Peter Maydell; +Cc: Paolo Bonzini, Marcel Apfelbaum, Chao Peng From: Chao Peng <chao.p.peng@linux.intel.com> commit f8c75b2486 (vnc: Initialization stubs) removed CONFIG_VNC in vl.c code. However qemu_find_opts("vnc") is NULL when vnc is configured out. Crash will happen in qemu_opts_foreach() before stub vnc_init_func() is called. This patch add it back. Cc: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com> --- vl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vl.c b/vl.c index 45eff56..2088491 100644 --- a/vl.c +++ b/vl.c @@ -4557,8 +4557,10 @@ int main(int argc, char **argv, char **envp) os_setup_signal_handling(); /* init remote displays */ +#ifdef CONFIG_VNC qemu_opts_foreach(qemu_find_opts("vnc"), vnc_init_func, NULL, NULL); +#endif if (show_vnc_port) { char *ret = vnc_display_local_addr("default"); printf("VNC server running on '%s'\n", ret); -- 2.5.5 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 2016-06-16 17:06 [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 Eduardo Habkost 2016-06-16 17:06 ` [Qemu-devel] [PULL 1/2] qdev: Use GList for global properties Eduardo Habkost 2016-06-16 17:06 ` [Qemu-devel] [PULL 2/2] vnc: Wrap vnc initialization code with CONFIG_VNC Eduardo Habkost @ 2016-06-17 10:19 ` Peter Maydell 2016-06-17 13:47 ` Eduardo Habkost 2 siblings, 1 reply; 6+ messages in thread From: Peter Maydell @ 2016-06-17 10:19 UTC (permalink / raw) To: Eduardo Habkost; +Cc: QEMU Developers, Paolo Bonzini, Marcel Apfelbaum On 16 June 2016 at 18:06, Eduardo Habkost <ehabkost@redhat.com> wrote: > Very few changes in the machine tree recently, but I don't want > to hold the patches for too long. > > The following changes since commit a66370b08d53837eb233cad090b3c2638084cc44: > > Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.7-4' into staging (2016-06-16 10:53:33 +0100) > > are available in the git repository at: > > git://github.com/ehabkost/qemu.git tags/machine-pull-request > > for you to fetch changes up to f4ad4c1d10f6c1cfd1f2f8b1194e94dbdbc2d3b9: > > vnc: Wrap vnc initialization code with CONFIG_VNC (2016-06-16 11:37:44 -0300) > > ---------------------------------------------------------------- > Machine queue, 2016-06-16 > > ---------------------------------------------------------------- > > Chao Peng (1): > vnc: Wrap vnc initialization code with CONFIG_VNC > > Eduardo Habkost (1): > qdev: Use GList for global properties Hi; your signed-off-by tag as maintainer seems to be missing from one of these patches. Could you respin, please? thanks -- PMM ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 2016-06-17 10:19 ` [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 Peter Maydell @ 2016-06-17 13:47 ` Eduardo Habkost 2016-06-17 15:16 ` Peter Maydell 0 siblings, 1 reply; 6+ messages in thread From: Eduardo Habkost @ 2016-06-17 13:47 UTC (permalink / raw) To: Peter Maydell; +Cc: QEMU Developers, Paolo Bonzini, Marcel Apfelbaum On Fri, Jun 17, 2016 at 11:19:36AM +0100, Peter Maydell wrote: > Hi; your signed-off-by tag as maintainer seems to be missing from > one of these patches. Could you respin, please? Oops, sorry! Updated pull request below. If you prefer me to send it as a new full e-mail series, please let me know. The following changes since commit 4acc8fdfd315f7ee474bea28fcbcc4dca9717d13: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160617' into staging (2016-06-17 12:36:27 +0100) are available in the git repository at: git://github.com/ehabkost/qemu.git tags/machine-pull-request for you to fetch changes up to a663fbd9e2f65fae81018d81f231ad79510cf9fb: vnc: Wrap vnc initialization code with CONFIG_VNC (2016-06-17 10:42:21 -0300) ---------------------------------------------------------------- Machine queue, 2016-06-17 ---------------------------------------------------------------- Chao Peng (1): vnc: Wrap vnc initialization code with CONFIG_VNC Eduardo Habkost (1): qdev: Use GList for global properties hw/core/qdev-properties.c | 15 ++++++++------- include/hw/qdev-core.h | 1 - vl.c | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) -- 2.5.5 -- Eduardo ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 2016-06-17 13:47 ` Eduardo Habkost @ 2016-06-17 15:16 ` Peter Maydell 0 siblings, 0 replies; 6+ messages in thread From: Peter Maydell @ 2016-06-17 15:16 UTC (permalink / raw) To: Eduardo Habkost; +Cc: QEMU Developers, Paolo Bonzini, Marcel Apfelbaum On 17 June 2016 at 14:47, Eduardo Habkost <ehabkost@redhat.com> wrote: > On Fri, Jun 17, 2016 at 11:19:36AM +0100, Peter Maydell wrote: >> Hi; your signed-off-by tag as maintainer seems to be missing from >> one of these patches. Could you respin, please? > > Oops, sorry! Updated pull request below. If you prefer me to send > it as a new full e-mail series, please let me know. > > The following changes since commit 4acc8fdfd315f7ee474bea28fcbcc4dca9717d13: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160617' into staging (2016-06-17 12:36:27 +0100) > > are available in the git repository at: > > git://github.com/ehabkost/qemu.git tags/machine-pull-request > > for you to fetch changes up to a663fbd9e2f65fae81018d81f231ad79510cf9fb: > > vnc: Wrap vnc initialization code with CONFIG_VNC (2016-06-17 10:42:21 -0300) > > ---------------------------------------------------------------- > Machine queue, 2016-06-17 > > ---------------------------------------------------------------- Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-06-17 15:16 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-06-16 17:06 [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 Eduardo Habkost 2016-06-16 17:06 ` [Qemu-devel] [PULL 1/2] qdev: Use GList for global properties Eduardo Habkost 2016-06-16 17:06 ` [Qemu-devel] [PULL 2/2] vnc: Wrap vnc initialization code with CONFIG_VNC Eduardo Habkost 2016-06-17 10:19 ` [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16 Peter Maydell 2016-06-17 13:47 ` Eduardo Habkost 2016-06-17 15:16 ` Peter Maydell
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).