From: "Dr. David Alan Gilbert" <dgilbert@redhat.com> To: "Philippe Mathieu-Daudé" <philmd@redhat.com> Cc: qemu-devel@nongnu.org, Marcelo Tosatti <mtosatti@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, qemu-arm@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>, Juan Quintela <quintela@redhat.com>, kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Alistair Francis <alistair.francis@wdc.com>, qemu-ppc@nongnu.org, Richard Henderson <rth@twiddle.net>, David Gibson <david@gibson.dropbear.id.au> Subject: Re: [PATCH 06/15] migration/savevm: Replace current_machine by qdev_get_machine() Date: Thu, 9 Jan 2020 15:52:38 +0000 [thread overview] Message-ID: <20200109155238.GK6795@work-vm> (raw) In-Reply-To: <20200109152133.23649-7-philmd@redhat.com> * Philippe Mathieu-Daudé (philmd@redhat.com) wrote: > As we want to remove the global current_machine, > replace MACHINE_GET_CLASS(current_machine) by > MACHINE_GET_CLASS(qdev_get_machine()). > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > migration/savevm.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/migration/savevm.c b/migration/savevm.c > index 59efc1981d..0e8b6a4715 100644 > --- a/migration/savevm.c > +++ b/migration/savevm.c > @@ -292,7 +292,8 @@ static uint32_t get_validatable_capabilities_count(void) > static int configuration_pre_save(void *opaque) > { > SaveState *state = opaque; > - const char *current_name = MACHINE_GET_CLASS(current_machine)->name; > + MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); > + const char *current_name = mc->name; For migration: Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com> (Personally I'd keep it on one line, but that's just taste) > MigrationState *s = migrate_get_current(); > int i, j; > > @@ -362,7 +363,8 @@ static bool configuration_validate_capabilities(SaveState *state) > static int configuration_post_load(void *opaque, int version_id) > { > SaveState *state = opaque; > - const char *current_name = MACHINE_GET_CLASS(current_machine)->name; > + MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); > + const char *current_name = mc->name; > > if (strncmp(state->name, current_name, state->len) != 0) { > error_report("Machine type received is '%.*s' and local is '%s'", > @@ -615,9 +617,7 @@ static void dump_vmstate_vmsd(FILE *out_file, > > static void dump_machine_type(FILE *out_file) > { > - MachineClass *mc; > - > - mc = MACHINE_GET_CLASS(current_machine); > + MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); > > fprintf(out_file, " \"vmschkmachine\": {\n"); > fprintf(out_file, " \"Name\": \"%s\"\n", mc->name); > -- > 2.21.1 > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
WARNING: multiple messages have this Message-ID (diff)
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com> To: "Philippe Mathieu-Daudé" <philmd@redhat.com> Cc: Peter Maydell <peter.maydell@linaro.org>, Eduardo Habkost <ehabkost@redhat.com>, kvm@vger.kernel.org, Juan Quintela <quintela@redhat.com>, qemu-ppc@nongnu.org, Marcelo Tosatti <mtosatti@redhat.com>, qemu-devel@nongnu.org, qemu-arm@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Paolo Bonzini <pbonzini@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, Richard Henderson <rth@twiddle.net> Subject: Re: [PATCH 06/15] migration/savevm: Replace current_machine by qdev_get_machine() Date: Thu, 9 Jan 2020 15:52:38 +0000 [thread overview] Message-ID: <20200109155238.GK6795@work-vm> (raw) In-Reply-To: <20200109152133.23649-7-philmd@redhat.com> * Philippe Mathieu-Daudé (philmd@redhat.com) wrote: > As we want to remove the global current_machine, > replace MACHINE_GET_CLASS(current_machine) by > MACHINE_GET_CLASS(qdev_get_machine()). > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > migration/savevm.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/migration/savevm.c b/migration/savevm.c > index 59efc1981d..0e8b6a4715 100644 > --- a/migration/savevm.c > +++ b/migration/savevm.c > @@ -292,7 +292,8 @@ static uint32_t get_validatable_capabilities_count(void) > static int configuration_pre_save(void *opaque) > { > SaveState *state = opaque; > - const char *current_name = MACHINE_GET_CLASS(current_machine)->name; > + MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); > + const char *current_name = mc->name; For migration: Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com> (Personally I'd keep it on one line, but that's just taste) > MigrationState *s = migrate_get_current(); > int i, j; > > @@ -362,7 +363,8 @@ static bool configuration_validate_capabilities(SaveState *state) > static int configuration_post_load(void *opaque, int version_id) > { > SaveState *state = opaque; > - const char *current_name = MACHINE_GET_CLASS(current_machine)->name; > + MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); > + const char *current_name = mc->name; > > if (strncmp(state->name, current_name, state->len) != 0) { > error_report("Machine type received is '%.*s' and local is '%s'", > @@ -615,9 +617,7 @@ static void dump_vmstate_vmsd(FILE *out_file, > > static void dump_machine_type(FILE *out_file) > { > - MachineClass *mc; > - > - mc = MACHINE_GET_CLASS(current_machine); > + MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); > > fprintf(out_file, " \"vmschkmachine\": {\n"); > fprintf(out_file, " \"Name\": \"%s\"\n", mc->name); > -- > 2.21.1 > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2020-01-09 15:52 UTC|newest] Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-01-09 15:21 [PATCH 00/15] Replace current_machine by qdev_get_machine() Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-09 15:21 ` [PATCH 01/15] target/arm/kvm: Use CPUState::kvm_state in kvm_arm_pmu_supported() Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-10 9:59 ` Alistair Francis 2020-01-10 9:59 ` Alistair Francis 2020-01-09 15:21 ` [PATCH 02/15] hw/ppc/spapr_rtas: Use local MachineState variable Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-09 17:13 ` Greg Kurz 2020-01-09 17:13 ` Greg Kurz 2020-01-13 1:11 ` David Gibson 2020-01-13 1:11 ` David Gibson 2020-01-09 15:21 ` [PATCH 03/15] hw/ppc/spapr_rtas: Access MachineState via SpaprMachineState argument Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-09 17:13 ` Greg Kurz 2020-01-09 17:13 ` Greg Kurz 2020-01-13 1:11 ` David Gibson 2020-01-13 1:11 ` David Gibson 2020-01-09 15:21 ` [PATCH 04/15] hw/ppc/spapr_rtas: Restrict variables scope to single switch case Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-09 17:43 ` Greg Kurz 2020-01-09 17:43 ` Greg Kurz 2020-01-10 9:34 ` Philippe Mathieu-Daudé 2020-01-10 9:34 ` Philippe Mathieu-Daudé 2020-01-10 9:50 ` Greg Kurz 2020-01-10 9:50 ` Greg Kurz 2020-01-10 19:18 ` Eric Blake 2020-01-10 19:18 ` Eric Blake 2020-01-13 7:16 ` David Gibson 2020-01-13 7:16 ` David Gibson 2020-01-09 15:21 ` [PATCH 05/15] device-hotplug: Replace current_machine by qdev_get_machine() Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-12 9:42 ` Alistair Francis 2020-01-12 9:42 ` Alistair Francis 2020-01-09 15:21 ` [PATCH 06/15] migration/savevm: " Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-09 15:52 ` Dr. David Alan Gilbert [this message] 2020-01-09 15:52 ` Dr. David Alan Gilbert 2020-01-12 9:43 ` Alistair Francis 2020-01-12 9:43 ` Alistair Francis 2020-01-14 13:27 ` Juan Quintela 2020-01-14 13:27 ` Juan Quintela 2020-01-09 15:21 ` [PATCH 07/15] hw/core/machine-qmp-cmds: " Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-12 9:44 ` Alistair Francis 2020-01-12 9:44 ` Alistair Francis 2020-01-09 15:21 ` [PATCH 08/15] target/arm/monitor: " Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-12 9:47 ` Alistair Francis 2020-01-12 9:47 ` Alistair Francis 2020-01-09 15:21 ` [PATCH 09/15] device_tree: " Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-12 9:47 ` Alistair Francis 2020-01-12 9:47 ` Alistair Francis 2020-01-09 15:21 ` [PATCH 10/15] memory: " Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-12 9:48 ` Alistair Francis 2020-01-12 9:48 ` Alistair Francis 2020-01-12 13:45 ` Philippe Mathieu-Daudé 2020-01-12 13:45 ` Philippe Mathieu-Daudé 2020-01-14 2:02 ` Alistair Francis 2020-01-14 2:02 ` Alistair Francis 2020-01-09 15:21 ` [PATCH 11/15] exec: " Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-14 1:57 ` Alistair Francis 2020-01-14 1:57 ` Alistair Francis 2020-01-09 15:21 ` [PATCH 12/15] accel: Introduce the current_accel() method Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-14 1:59 ` Alistair Francis 2020-01-14 1:59 ` Alistair Francis 2020-01-09 15:21 ` [PATCH 13/15] accel: Replace current_machine->accelerator by " Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-14 1:58 ` Alistair Francis 2020-01-14 1:58 ` Alistair Francis 2020-01-09 15:21 ` [PATCH 14/15] accel/accel: Replace current_machine by qdev_get_machine() Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-14 1:59 ` Alistair Francis 2020-01-14 1:59 ` Alistair Francis 2020-01-09 15:21 ` [PATCH 15/15] vl: Make current_machine a local variable Philippe Mathieu-Daudé 2020-01-09 15:21 ` Philippe Mathieu-Daudé 2020-01-14 2:00 ` Alistair Francis 2020-01-14 2:00 ` Alistair Francis 2020-01-21 8:59 ` [PATCH 00/15] Replace current_machine by qdev_get_machine() Markus Armbruster 2020-01-21 8:59 ` Markus Armbruster
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=20200109155238.GK6795@work-vm \ --to=dgilbert@redhat.com \ --cc=alistair.francis@wdc.com \ --cc=david@gibson.dropbear.id.au \ --cc=ehabkost@redhat.com \ --cc=kvm@vger.kernel.org \ --cc=marcel.apfelbaum@gmail.com \ --cc=mtosatti@redhat.com \ --cc=pbonzini@redhat.com \ --cc=peter.maydell@linaro.org \ --cc=philmd@redhat.com \ --cc=qemu-arm@nongnu.org \ --cc=qemu-devel@nongnu.org \ --cc=qemu-ppc@nongnu.org \ --cc=quintela@redhat.com \ --cc=rth@twiddle.net \ /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 an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.