From: David Gibson <david@gibson.dropbear.id.au>
To: Daniel Henrique Barboza <danielhb413@gmail.com>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, clg@kaod.org
Subject: Re: [PATCH for-7.1 2/4] hw/ppc: use qdev to register physical DRC vmstates
Date: Wed, 23 Mar 2022 12:48:54 +1100 [thread overview]
Message-ID: <Yjp8hkhiiVDrUTIa@yekko> (raw)
In-Reply-To: <20220322183854.196063-3-danielhb413@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2124 bytes --]
On Tue, Mar 22, 2022 at 03:38:52PM -0300, Daniel Henrique Barboza wrote:
> Similar to logical DRCs, let's convert physical DRCs to register their
> vmstates using dc->vmsd.
>
> The same constraints with instance_id being set to spapr_drc_index()
> also applies in this case. However, since realize_physical() calls
> drc_realize(), qdev_set_legacy_instance_id() is already being set.
Ok, and you've verified that you don't need to set the legacy ID on
both "layers"? That is, have you tested that you can migrate from
before this change to after?
>
> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> ---
> hw/ppc/spapr_drc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
> index a5ef64d2a2..5a60885876 100644
> --- a/hw/ppc/spapr_drc.c
> +++ b/hw/ppc/spapr_drc.c
> @@ -640,9 +640,6 @@ static void realize_physical(DeviceState *d, Error **errp)
> return;
> }
>
> - vmstate_register(VMSTATE_IF(drcp),
> - spapr_drc_index(SPAPR_DR_CONNECTOR(drcp)),
> - &vmstate_spapr_drc_physical, drcp);
> qemu_register_reset(drc_physical_reset, drcp);
> }
>
> @@ -651,7 +648,6 @@ static void unrealize_physical(DeviceState *d)
> SpaprDrcPhysical *drcp = SPAPR_DRC_PHYSICAL(d);
>
> drc_unrealize(d);
> - vmstate_unregister(VMSTATE_IF(drcp), &vmstate_spapr_drc_physical, drcp);
> qemu_unregister_reset(drc_physical_reset, drcp);
> }
>
> @@ -662,6 +658,8 @@ static void spapr_drc_physical_class_init(ObjectClass *k, void *data)
>
> dk->realize = realize_physical;
> dk->unrealize = unrealize_physical;
> + dk->vmsd = &vmstate_spapr_drc_physical;
> +
> drck->dr_entity_sense = physical_entity_sense;
> drck->isolate = drc_isolate_physical;
> drck->unisolate = drc_unisolate_physical;
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-03-23 2:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 18:38 [PATCH for-7.1 0/4] use dc->vmsd with spapr devices vmstate Daniel Henrique Barboza
2022-03-22 18:38 ` [PATCH for-7.1 1/4] hw/ppc: use qdev to register logical DRC vmstates Daniel Henrique Barboza
2022-03-22 18:38 ` [PATCH for-7.1 2/4] hw/ppc: use qdev to register physical " Daniel Henrique Barboza
2022-03-23 1:48 ` David Gibson [this message]
2022-03-23 21:44 ` Daniel Henrique Barboza
2022-03-22 18:38 ` [PATCH for-7.1 3/4] hw/ppc: use qdev to register spapr_iommu tcet vmstate Daniel Henrique Barboza
2022-03-22 18:38 ` [PATCH for-7.1 4/4] hw/ppc: use qdev to register spapr_nvdimm vmsd Daniel Henrique Barboza
2022-03-23 1:49 ` [PATCH for-7.1 0/4] use dc->vmsd with spapr devices vmstate David Gibson
2022-03-23 21:47 ` Daniel Henrique Barboza
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=Yjp8hkhiiVDrUTIa@yekko \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=danielhb413@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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 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.