All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Halil Pasic <pasic@linux.vnet.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/1] s390x: vmstatify config migration for virtio-ccw
Date: Wed, 31 May 2017 20:13:47 +0200	[thread overview]
Message-ID: <87mv9sc2sk.fsf@secure.mitica> (raw)
In-Reply-To: <20170529131716.94338-1-pasic@linux.vnet.ibm.com> (Halil Pasic's message of "Mon, 29 May 2017 15:17:16 +0200")

Halil Pasic <pasic@linux.vnet.ibm.com> wrote:
> Let's vmstatify virtio_ccw_save_config and virtio_ccw_load_config for
> flexibility (extending using subsections) and for fun.
>
> To achieve this we need to hack the config_vector, which is VirtIODevice
> (that is common virtio) state, in the middle of the VirtioCcwDevice state
> representation.  This somewhat ugly, but we have no choice because the
> stream format needs to be preserved.
>
> Almost no changes in behavior. Exception is everything that comes with
> vmstate like extra bookkeeping about what's in the stream, and maybe some
> extra checks and better error reporting.
>
> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

> +static void subch_dev_pre_save(void *opaque)
> +{
> +    SubchDev *s = opaque;
> +
> +    /* Prepare remote_schid for save */
> +    s->migrated_schid = s->schid;
> +}
> +
> +static int subch_dev_post_load(void *opaque, int version_id)
> +{
> +
> +    SubchDev *s = opaque;
> +
> +    /* Re-assign the subchannel to remote_schid if necessary */
> +    if (s->migrated_schid != s->schid) {
> +        if (css_find_subch(true, s->cssid, s->ssid, s->schid) == s) {

I am assuming this is somehow similar to
   old_s = channel_subsys.css[s->cssid]->sch_set[s->ssid]->sch[old_schid];



> -    qemu_put_be32(f, s->curr_status.pmcw.intparm);
> -    qemu_put_be16(f, s->curr_status.pmcw.flags);
> -    qemu_put_be16(f, s->curr_status.pmcw.devno);
> -    qemu_put_byte(f, s->curr_status.pmcw.lpm);
> -    qemu_put_byte(f, s->curr_status.pmcw.pnom);
> -    qemu_put_byte(f, s->curr_status.pmcw.lpum);
> -    qemu_put_byte(f, s->curr_status.pmcw.pim);
> -    qemu_put_be16(f, s->curr_status.pmcw.mbi);
> -    qemu_put_byte(f, s->curr_status.pmcw.pom);
> -    qemu_put_byte(f, s->curr_status.pmcw.pam);

I hope it somehow makes sense, I am having trouble following that you
have fields named: pim, pam, pom, pnom, lpm, lpum, mda, mba ..... looks
like hell for reviewing O:-)

And I thought that x86 was weird because it used all three letters
acronyms

O:-)

Later, Juan.

  parent reply	other threads:[~2017-05-31 18:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-29 13:17 [Qemu-devel] [PATCH 1/1] s390x: vmstatify config migration for virtio-ccw Halil Pasic
2017-05-31 16:00 ` Dr. David Alan Gilbert
2017-05-31 16:22   ` Halil Pasic
2017-05-31 18:13 ` Juan Quintela [this message]
2017-06-01  9:45   ` Halil Pasic
2017-06-01 10:52 ` Cornelia Huck
2017-06-01 11:02   ` Halil Pasic
2017-06-01 11:19     ` Christian Borntraeger
2017-06-01 11:28       ` Halil Pasic
2017-06-01 11:36         ` Christian Borntraeger

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=87mv9sc2sk.fsf@secure.mitica \
    --to=quintela@redhat.com \
    --cc=bjsdjshi@linux.vnet.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dgilbert@redhat.com \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=qemu-devel@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.