[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-ppc] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI |
Date: |
Mon, 03 Jun 2013 08:21:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 |
Il 01/06/2013 02:01, Benjamin Herrenschmidt ha scritto:
> 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 ?
Yes. Unless the spec somehow lets the guest figure out the point at
which the whole chain has been pre-processed, and lets the guest modify
the chain at this point. But if that's not the case, you can do that.
Memory has already been loaded when load_request runs.
Paolo