From patchwork Thu Nov 27 15:16:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 415562 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1F014140147 for ; Fri, 28 Nov 2014 02:24:07 +1100 (AEDT) Received: from localhost ([::1]:40182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu0vN-0005Fg-9p for incoming@patchwork.ozlabs.org; Thu, 27 Nov 2014 10:24:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu0ox-0002rf-2c for qemu-devel@nongnu.org; Thu, 27 Nov 2014 10:17:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xu0on-0006TT-W8 for qemu-devel@nongnu.org; Thu, 27 Nov 2014 10:17:27 -0500 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:42397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu0on-0006T7-Lf for qemu-devel@nongnu.org; Thu, 27 Nov 2014 10:17:17 -0500 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 27 Nov 2014 15:17:16 -0000 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp16.uk.ibm.com (192.168.101.146) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 27 Nov 2014 15:17:15 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 2B3FC17D8042 for ; Thu, 27 Nov 2014 15:17:31 +0000 (GMT) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sARFHEwa12714058 for ; Thu, 27 Nov 2014 15:17:14 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sARFHDq6014107 for ; Thu, 27 Nov 2014 08:17:14 -0700 Received: from gondolin.boeblingen.de.ibm.com (dyn-9-152-224-210.boeblingen.de.ibm.com [9.152.224.210]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sARFGpWq012636; Thu, 27 Nov 2014 08:17:12 -0700 From: Cornelia Huck To: virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org, kvm@vger.kernel.org Date: Thu, 27 Nov 2014 16:16:49 +0100 Message-Id: <1417101409-29482-17-git-send-email-cornelia.huck@de.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1417101409-29482-1-git-send-email-cornelia.huck@de.ibm.com> References: <1417101409-29482-1-git-send-email-cornelia.huck@de.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14112715-0025-0000-0000-0000029F4DEC X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.112 Cc: Cornelia Huck , rusty@rustcorp.com.au, thuth@linux.vnet.ibm.com, mst@redhat.com Subject: [Qemu-devel] [PATCH RFC v4 16/16] virtio-net: enable virtio 1.0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org virtio-net (non-vhost) now should have everything in place to support virtio 1.0: let's enable the feature bit for it. Note that VIRTIO_F_VERSION_1 is technically a transport feature; once every device is ready for virtio 1.0, we can move setting this feature bit out of the individual devices. Signed-off-by: Cornelia Huck --- hw/net/virtio-net.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index b31b3a4..9ceff02 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -453,6 +453,10 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && !get_vhost_net(nc->peer)) { + features |= (1 << (VIRTIO_F_VERSION_1 - 32)); + } + if (index > 0) { return features; }