qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI
Date: Tue, 7 May 2013 13:07:36 +1000	[thread overview]
Message-ID: <20130507030736.GC13692@truffula.fritz.box> (raw)
In-Reply-To: <51875DA7.4090308@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1940 bytes --]

On Mon, May 06, 2013 at 09:37:11AM +0200, Paolo Bonzini wrote:
> Il 03/05/2013 03:38, David Gibson ha scritto:
> > This patch adds the necessary support for saving the state of the PAPR VIO
> > virtual SCSI device.  This turns out to be trivial, because the generiC
> > SCSI code already quiesces the attached virtual SCSI bus.
> > 
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> > ---
> >  hw/scsi/spapr_vscsi.c |   28 ++++++++++++++++++++++++++++
> >  1 file changed, 28 insertions(+)
> > 
> > diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
> > index 3d322d5..f416871 100644
> > --- a/hw/scsi/spapr_vscsi.c
> > +++ b/hw/scsi/spapr_vscsi.c
> > @@ -954,6 +954,33 @@ static Property spapr_vscsi_properties[] = {
> >      DEFINE_PROP_END_OF_LIST(),
> >  };
> >  
> > +static void spapr_vscsi_pre_save(void *opaque)
> > +{
> > +    VSCSIState *s = opaque;
> > +    int i;
> > +
> > +    /* Can't save active requests, apparently the general SCSI code
> > +     * quiesces the queue for us on vmsave */
> > +    for (i = 0; i < VSCSI_REQ_LIMIT; i++) {
> > +        assert(!s->reqs[i].active);
> > +    }
> > +}
> 
> This is only true when the rerror and werror options have the values
> "ignore" or "report".  See virtio-scsi for an example of how to save the
> requests using the save_request and load_request callbacks in
> SCSIBusInfo.

Ah, bother.  Unfortunately the save request is quite a lot more
complicated for vscsi, since we have a lot more private data, and I'm
not sure which bits can be reconstructed from other information.  I'll
see what I can come up with.

What guarantees _does_ the scsi layer give about the lifecycle state
of the requests when we savevm?

-- 
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: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-05-07  3:10 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-03  1:38 [Qemu-devel] [0/8] pseries: savevm / migration support David Gibson
2013-05-03  1:38 ` [Qemu-devel] [PATCH 1/8] savevm: Implement VMS_DIVIDE flag David Gibson
2013-05-03  1:38 ` [Qemu-devel] [PATCH 2/8] target-ppc: Convert ppc cpu savevm to VMStateDescription David Gibson
2013-05-03 11:29   ` Andreas Färber
2013-05-03 14:26     ` [Qemu-devel] [Qemu-ppc] " David Gibson
2013-05-03  1:38 ` [Qemu-devel] [PATCH 3/8] pseries: savevm support for XICS interrupt controller David Gibson
2013-05-03  1:38 ` [Qemu-devel] [PATCH 4/8] pseries: savevm support for VIO devices David Gibson
2013-05-03  1:38 ` [Qemu-devel] [PATCH 5/8] pseries: savevm support for PAPR VIO logical lan David Gibson
2013-05-03  1:38 ` [Qemu-devel] [PATCH 6/8] pseries: savevm support for PAPR TCE tables David Gibson
2013-05-03  1:38 ` [Qemu-devel] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI David Gibson
2013-05-06  7:37   ` Paolo Bonzini
2013-05-07  3:07     ` David Gibson [this message]
2013-05-27  6:48     ` Alexey Kardashevskiy
2013-05-27  7:03       ` Paolo Bonzini
2013-05-31  5:58         ` Alexey Kardashevskiy
2013-05-31  8:18           ` Paolo Bonzini
2013-05-31 10:12             ` Alexey Kardashevskiy
2013-05-31 10:26               ` Paolo Bonzini
2013-05-31 10:33                 ` Alexey Kardashevskiy
2013-05-31 10:34                   ` Paolo Bonzini
2013-05-31 10:07           ` Benjamin Herrenschmidt
2013-05-31 10:25             ` Alexey Kardashevskiy
2013-05-31 10:41               ` Paolo Bonzini
2013-06-01  0:01                 ` Benjamin Herrenschmidt
2013-06-03  6:21                   ` Paolo Bonzini
2013-06-03  5:46                 ` Alexey Kardashevskiy
2013-06-03  6:23                   ` Paolo Bonzini
2013-06-03  8:07                   ` Benjamin Herrenschmidt
2013-06-03  9:37                     ` Alexey Kardashevskiy
2013-06-03  9:41                       ` Paolo Bonzini
2013-05-03  1:38 ` [Qemu-devel] [PATCH 8/8] pseries: savevm support for pseries machine David Gibson

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=20130507030736.GC13692@truffula.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=quintela@redhat.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).