From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLwcd-0003xq-L1 for qemu-devel@nongnu.org; Wed, 20 Jan 2016 12:32:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLwcY-0005GA-DB for qemu-devel@nongnu.org; Wed, 20 Jan 2016 12:32:43 -0500 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:42087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLwcY-0005Fy-3M for qemu-devel@nongnu.org; Wed, 20 Jan 2016 12:32:38 -0500 Received: from localhost by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 20 Jan 2016 17:32:35 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id BFB3C17D8042 for ; Wed, 20 Jan 2016 17:32:38 +0000 (GMT) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u0KHWX8c5636570 for ; Wed, 20 Jan 2016 17:32:33 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u0KHWWS6009401 for ; Wed, 20 Jan 2016 10:32:33 -0700 Date: Wed, 20 Jan 2016 18:32:30 +0100 From: Cornelia Huck Message-ID: <20160120183230.59fbaf94.cornelia.huck@de.ibm.com> In-Reply-To: <569E850A.5070300@redhat.com> References: <1452861718-25806-1-git-send-email-pbonzini@redhat.com> <1452861718-25806-10-git-send-email-pbonzini@redhat.com> <20160119185119-mutt-send-email-mst@redhat.com> <569E850A.5070300@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 09/10] virtio: read avail_idx from VQ only when necessary List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Vincenzo Maffione , "Michael S. Tsirkin" On Tue, 19 Jan 2016 19:48:42 +0100 Paolo Bonzini wrote: > >> @@ -1579,6 +1595,7 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f, int version_id) > >> return -1; > >> } > >> vdev->vq[i].used_idx = vring_used_idx(&vdev->vq[i]); > >> + vdev->vq[i].shadow_avail_idx = vring_avail_idx(&vdev->vq[i]); > >> } > >> } > > > > > > shadow_avail_idx also should be updated on vhost stop, > > That's virtio_queue_set_last_avail_idx, right? That should also take care of vring teardown.