All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: quintela@redhat.com, Alexey Kardashevskiy <aik@ozlabs.ru>,
	agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI
Date: Sat, 01 Jun 2013 10:01:11 +1000	[thread overview]
Message-ID: <1370044871.3928.173.camel@pasglop> (raw)
In-Reply-To: <51A87E5B.1030100@redhat.com>

On Fri, 2013-05-31 at 12:41 +0200, Paolo Bonzini wrote:

> It may be halfway through, but it is always restarted on the destination.

"restarted" as in the whole transfer is restarted if any right ? So we
can essentially consider as a new request for which we just did
scsi_req_enqueue() ?

IE. We don't do direct DMA to guest pages just yet (we still do copies)
so basically our process is:

 1- Obtain request from guest
 2- Queue it (scsi_req_enqueue)
 3- No transfer -> go away (completion is called)
 4- Pre-process user descriptors (check desc type direct vs indirect,
    position our "cursor" walking them etc....)
 5- scsi_req_continue()
    .../... loop of callbacks & transfer

Now from what you say, I assume that regardless of the point where
the request was, when we "resume" it will always be at step 4 ?

IE. I can just pre-process the descriptors again ? (I actually need
to transfer them again from the guest since I suspect I clobber them
at the very least due to byteswap) and call scsi_req_continue() and
assume the transfer (if any) started from the beginning ?

> virtio-scsi parses the whole descriptor chain upfront and sends the
> guest addresses in the migration stream.
> 
> > Is not it the same QEMU thread which handles hcalls and QEMU console
> > commands so the migration cannot stop parsing/handling a vscsi_req?
> 
> The VM is paused and I/O is flushed at the point when the reqs are sent.
>  That's why you couldn't get a pending request.  Only failed requests
> remain in queue.

Ben.

  reply	other threads:[~2013-06-01  0:01 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     ` [Qemu-devel] [Qemu-ppc] " David Gibson
2013-05-27  6:48     ` [Qemu-devel] " 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 [this message]
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=1370044871.3928.173.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=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 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.