Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755909Ab1EDUww (ORCPT ); Wed, 4 May 2011 16:52:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52751 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755760Ab1EDUwu (ORCPT ); Wed, 4 May 2011 16:52:50 -0400 Date: Wed, 4 May 2011 23:52:22 +0300 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: Rusty Russell , Carsten Otte , Christian Borntraeger , linux390@de.ibm.com, Martin Schwidefsky , Heiko Carstens , Shirley Ma , lguest@lists.ozlabs.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, Krishna Kumar , Tom Lendacky , steved@us.ibm.com, habanero@linux.vnet.ibm.com Subject: [PATCH 13/18] virtio_test: avail_event index support Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mutt-Fcc: =sent User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1649 Lines: 65 Add ability to test the new avail_event feature, enable by default. Signed-off-by: Michael S. Tsirkin --- tools/virtio/virtio_test.c | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 157ec68..8adf55d 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -202,6 +202,14 @@ const struct option longopts[] = { .val = 'h', }, { + .name = "avail-event-idx", + .val = 'A', + }, + { + .name = "no-avail-event-idx", + .val = 'a', + }, + { .name = "indirect", .val = 'I', }, @@ -224,7 +232,8 @@ const struct option longopts[] = { static void help() { fprintf(stderr, "Usage: virtio_test [--help]" - " [--no-indirect] " + " [--no-indirect]" + " [--no-avail-event-idx]" " [--no-used-event-idx]\n"); } @@ -232,7 +241,8 @@ int main(int argc, char **argv) { struct vdev_info dev; unsigned long long features = (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | - (1ULL << VIRTIO_RING_F_USED_EVENT_IDX); + (1ULL << VIRTIO_RING_F_USED_EVENT_IDX) | + (1ULL << VIRTIO_RING_F_AVAIL_EVENT_IDX); int o; for (;;) { @@ -243,6 +253,9 @@ int main(int argc, char **argv) case '?': help(); exit(2); + case 'a': + features &= ~(1ULL << VIRTIO_RING_F_AVAIL_EVENT_IDX); + break; case 'h': help(); goto done; -- 1.7.5.53.gc233e -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/