From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHjSf-0007Rr-80 for qemu-devel@nongnu.org; Wed, 04 May 2011 17:18:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHjSe-0000zS-8e for qemu-devel@nongnu.org; Wed, 04 May 2011 17:18:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHjSd-0000zO-VG for qemu-devel@nongnu.org; Wed, 04 May 2011 17:18:20 -0400 Date: Thu, 5 May 2011 00:17:49 +0300 From: "Michael S. Tsirkin" Message-ID: <20110504211749.GA21244@redhat.com> References: <20110504203256.GA20819@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110504203256.GA20819@redhat.com> Subject: [Qemu-devel] [PDFv2] virtio-spec: 64 bit features, used/avail event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, kvm@vger.kernel.org Cc: Krishna Kumar , Carsten Otte , lguest@lists.ozlabs.org, Shirley Ma , linux-s390@vger.kernel.org, netdev@vger.kernel.org, habanero@linux.vnet.ibm.com, Rusty Russell , Heiko Carstens , virtualization@lists.linux-foundation.org, steved@us.ibm.com, Christian Borntraeger , Tom Lendacky , Martin Schwidefsky , linux390@de.ibm.com People asked for a pdf for a new spec, so here it is: http://userweb.kernel.org/~mst/virtio-spec-event-idx-v2.pdf Guest and host implementation can be found here: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost-net-next-event-idx-v1 git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu-kvm.git virtio-net-event-idx-v1 Description reposted below: I'm working on a patchset (to follow shortly) that modified the notificatin hand-off in virtio to be basically like Xen: each side published an index, the other side only triggers an event when it crosses that index value (Xen event indexes start at 1, ours start at 0 for backward-compatiblity, but that's minor). Especially for testing, it is very convenient to have separate feature bits for this change in used and available ring; since we've run out of bits in the 32 bit field, I added another 32 bit and bit 31 enables that. I started with using both flags and indexes in parallel, but switched to doing either-or: this means we do not need to tweak memory access ordering as index access just replaces flags access. A note on naming: the index replacing avail->flags is named used_event, the index replacing used->flags is named avail_event to stress the fact that these actually point into the other side of the ring: event is triggered when avail->idx == used->avail_event + 1 and when used->idx == avail->used_event + 1, respectively. Signed-off-by: Michael S. Tsirkin -- MST