From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Juan Quintela" <quintela@redhat.com>,
"Andrew Jeffery" <andrew@aj.id.au>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Laurent Vivier" <laurent@vivier.eu>,
"Andrew Baumann" <Andrew.Baumann@microsoft.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>, "Joel Stanley" <joel@jms.id.au>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Subbaraya Sundeep" <sundeep.lkml@gmail.com>,
"Artyom Tarasenko" <atar4qemu@gmail.com>,
"Cédric Le Goater" <clg@kaod.org>
Subject: Re: [RFC PATCH v2 01/20] migration/vmstate: Restrict vmstate_dummy to user-mode
Date: Wed, 20 Jan 2021 11:03:14 +0000 [thread overview]
Message-ID: <20210120110314.GD2930@work-vm> (raw)
In-Reply-To: <004525a7-e8bb-9316-6ad5-ba5765471639@amsat.org>
* Philippe Mathieu-Daudé (f4bug@amsat.org) wrote:
> On 1/19/21 2:50 PM, Peter Maydell wrote:
> > On Sun, 17 Jan 2021 at 19:24, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> >>
> >> 'vmstate_dummy' is special and only used for user-mode. Rename
> >> it to something more specific.
> >> It was introduced restricted to user-mode in commit c71c3e99b8
> >> ("Add a vmstate_dummy struct for CONFIG_USER_ONLY") but this
> >> restriction was later removed in commit 6afc14e92ac ("migration:
> >> Fix warning caused by missing declaration of vmstate_dummy").
> >> Avoid the missing declaration warning by adding a stub for the
> >> symbol, and restore the #ifdef'ry.
> >
> > So what is the actual use of vmstate_dummy ? I had a grep
> > through and as far as I can see the points where vmstate_cpu_common
> > is used are all in softmmu-only code.
>
> No clue, maybe simply remnant from unfinished work?
Not sure either; but it looks like Paolo fixed some of it up in d9f24bf5724
a few months ago; prior to that cpu_exec_unrealizefn used it even on a
USER_ONLY build.
Dave
> > I tried this patch
> > and QEMU seems to compile OK:
> >
> > diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
> > index 140fa32a5e3..a827417a4d8 100644
> > --- a/include/hw/core/cpu.h
> > +++ b/include/hw/core/cpu.h
> > @@ -1131,8 +1131,6 @@ bool target_words_bigendian(void);
> >
> > #ifdef CONFIG_SOFTMMU
> > extern const VMStateDescription vmstate_cpu_common;
> > -#else
> > -#define vmstate_cpu_common vmstate_dummy
> > #endif
> >
> > #define VMSTATE_CPU() { \
>
> Great! Maybe even restricting VMSTATE_CPU() to softmmu-only:
>
> -- >8 --
> @@ -1131,9 +1131,6 @@ bool target_words_bigendian(void);
>
> #ifdef CONFIG_SOFTMMU
> extern const VMStateDescription vmstate_cpu_common;
> -#else
> -#define vmstate_cpu_common vmstate_dummy
> -#endif
>
> #define VMSTATE_CPU() {
> \
> .name = "parent_obj",
> \
> @@ -1142,6 +1139,7 @@ extern const VMStateDescription vmstate_cpu_common;
> .flags = VMS_STRUCT,
> \
> .offset = 0,
> \
> }
> +#endif
>
> #endif /* NEED_CPU_H */
> ---
>
> I'll wait if David/Juan have any comment, else respin based
> on your patch.
>
> Thanks,
>
> Phil.
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2021-01-20 11:04 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-17 19:24 [RFC PATCH v2 00/20] hw: Mark the device with no migratable fields Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 01/20] migration/vmstate: Restrict vmstate_dummy to user-mode Philippe Mathieu-Daudé
2021-01-18 11:48 ` Dr. David Alan Gilbert
2021-01-19 13:50 ` Peter Maydell
2021-01-19 16:37 ` Philippe Mathieu-Daudé
2021-01-20 11:03 ` Dr. David Alan Gilbert [this message]
2021-01-17 19:24 ` [RFC PATCH v2 02/20] hw/core/qdev: Add vmstate_qdev_no_state_to_migrate Philippe Mathieu-Daudé
2021-01-19 9:31 ` Dr. David Alan Gilbert
2021-01-19 13:31 ` Peter Maydell
2021-01-17 19:24 ` [RFC PATCH v2 03/20] hw/arm/armv7m: Mark the device with no migratable fields Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 04/20] hw/arm/aspeed_soc: " Philippe Mathieu-Daudé
2021-01-26 7:09 ` Cédric Le Goater
2021-01-17 19:24 ` [RFC PATCH v2 05/20] hw/arm/bcm283x: Mark devices " Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 06/20] hw/arm/msf2-soc: Mark the device " Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 07/20] hw/core/split-irq: " Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 08/20] hw/cpu/a9mpcore: " Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 09/20] hw/cpu/cluster: " Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 10/20] hw/usb/hcd-ohci: " Philippe Mathieu-Daudé
2021-01-18 20:10 ` Dr. David Alan Gilbert
2021-01-17 19:24 ` [RFC PATCH v2 11/20] hw/intc/arm_gicv2m: " Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 12/20] hw/misc/armsse-cpuid: " Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 13/20] hw/misc/iotkit-sysinfo: " Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 14/20] hw/misc/unimp: " Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 15/20] hw/nubus/mac-nubus-bridge: " Philippe Mathieu-Daudé
2021-01-18 12:04 ` Laurent Vivier
2021-01-17 19:24 ` [RFC PATCH v2 16/20] hw/sparc64/sun4u: Mark devices " Philippe Mathieu-Daudé
2021-01-17 20:37 ` Artyom Tarasenko
2021-01-17 19:24 ` [RFC PATCH v2 17/20] hw/pci-host/gpex: Mark device " Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 18/20] hw/core/qdev: Display warning for devices missing migration state Philippe Mathieu-Daudé
2021-01-17 19:24 ` [RFC PATCH v2 19/20] stubs/vmstate: Add VMSTATE_END_OF_LIST to vmstate_user_mode_cpu_dummy Philippe Mathieu-Daudé
2021-01-20 10:56 ` Dr. David Alan Gilbert
2021-01-17 19:24 ` [RFC PATCH v2 20/20] migration/vmstate: Simplify vmstate for user-mode CPU 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=20210120110314.GD2930@work-vm \
--to=dgilbert@redhat.com \
--cc=Andrew.Baumann@microsoft.com \
--cc=andrew@aj.id.au \
--cc=atar4qemu@gmail.com \
--cc=berrange@redhat.com \
--cc=clg@kaod.org \
--cc=ehabkost@redhat.com \
--cc=f4bug@amsat.org \
--cc=joel@jms.id.au \
--cc=kraxel@redhat.com \
--cc=laurent@vivier.eu \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=sundeep.lkml@gmail.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: link
Be 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).