From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjQ30-0004yQ-35 for qemu-devel@nongnu.org; Fri, 14 Dec 2012 02:51:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjQ2z-0005HF-5Y for qemu-devel@nongnu.org; Fri, 14 Dec 2012 02:51:06 -0500 Received: from mx4-phx2.redhat.com ([209.132.183.25]:55790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjQ2y-0005HB-Sq for qemu-devel@nongnu.org; Fri, 14 Dec 2012 02:51:05 -0500 Date: Fri, 14 Dec 2012 02:51:02 -0500 (EST) From: Paolo Bonzini Message-ID: <563127555.23861364.1355471450321.JavaMail.root@redhat.com> In-Reply-To: <8738z94f3d.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv2] virtio: verify that all outstanding buffers are flushed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rusty Russell Cc: Stefan Hajnoczi , Anthony Liguori , qemu-devel@nongnu.org, Stefan Hajnoczi , "Michael S. Tsirkin" > > We technically should save the addresses and sizes too. It makes > > it a heck of a lot safer then re-reading guest memory since we do some > > validation on the size of the sg elements. > > Not really. > > The guest puts the descriptors in the ring and leaves them there until > the device acks. If it changes them once they're exposed but before > they're acked, it can get either before or after version, and always > could. The problems start when the guest tries to race against QEMU and defy the validation. Always using the validated version is a bit easier than redoing the validation after migration. Paolo