From patchwork Mon Apr 13 12:15:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 460759 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 8C7D41402F4 for ; Mon, 13 Apr 2015 22:16:33 +1000 (AEST) Received: from localhost ([::1]:51430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhdHy-0001Gh-7a for incoming@patchwork.ozlabs.org; Mon, 13 Apr 2015 08:16:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhdHb-0000mg-Kl for qemu-devel@nongnu.org; Mon, 13 Apr 2015 08:16:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhdHY-0007XX-DG for qemu-devel@nongnu.org; Mon, 13 Apr 2015 08:16:07 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:52874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhdHY-0007X3-4H for qemu-devel@nongnu.org; Mon, 13 Apr 2015 08:16:04 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 13 Apr 2015 13:16:01 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 13 Apr 2015 13:15:59 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id D7C8C17D8042 for ; Mon, 13 Apr 2015 13:16:33 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t3DCFwxU5046778 for ; Mon, 13 Apr 2015 12:15:58 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t3D7AS50027362 for ; Mon, 13 Apr 2015 03:10:28 -0400 Received: from gondolin (dyn-9-152-224-143.boeblingen.de.ibm.com [9.152.224.143]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t3D7ARmp027348; Mon, 13 Apr 2015 03:10:27 -0400 Date: Mon, 13 Apr 2015 14:15:51 +0200 From: Cornelia Huck To: "Michael S. Tsirkin" Message-ID: <20150413141551.41daad1e.cornelia.huck@de.ibm.com> In-Reply-To: <20150413134908-mutt-send-email-mst@redhat.com> References: <1428849904-28953-1-git-send-email-mst@redhat.com> <1428849904-28953-2-git-send-email-mst@redhat.com> <20150413100258.1f2c636f.cornelia.huck@de.ibm.com> <20150413132110-mutt-send-email-mst@redhat.com> <20150413133521.274fd658.cornelia.huck@de.ibm.com> <20150413134908-mutt-send-email-mst@redhat.com> Organization: IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz =?UTF-8?B?R2VzY2jDpGZ0c2bDvGhydW5nOg==?= Dirk Wittkopp Sitz der Gesellschaft: =?UTF-8?B?QsO2Ymxpbmdlbg==?= Registergericht: Amtsgericht Stuttgart, HRB 243294 X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; i686-pc-linux-gnu) Mime-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15041312-0021-0000-0000-0000038BEA78 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.111 Cc: Rusty Russell , qemu-devel@nongnu.org, Anthony Liguori , virtualization@lists.linux-foundation.org Subject: Re: [Qemu-devel] [PATCH 2/2] virtio-balloon: virtio 1 support 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 On Mon, 13 Apr 2015 13:49:42 +0200 "Michael S. Tsirkin" wrote: > On Mon, Apr 13, 2015 at 01:35:21PM +0200, Cornelia Huck wrote: > > On Mon, 13 Apr 2015 13:26:31 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Apr 13, 2015 at 10:02:58AM +0200, Cornelia Huck wrote: > > > > > > Also, doesn't get_features need to be modified as well so that > > > > VERSION_1 is advertised? > > > > > > virtio_pci_device_plugged seems to set it ATM. I'll re-test to confirm. > > > > Indeed, pci sets it, but ccw does not. And virtio-net, for example, > > sets it explicitly as well. We need to unify this :) > > I'm inclined to set it in transport and black-list in specific devices. > Agreed, let's set it in the transports. For ccw, I'd probably only want to offer it once the driver has negotiated a revision >= 1, so something like the following (untested): diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 8b6b2ab..4d8cc24 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -703,6 +703,9 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw) dev->host_features = virtio_bus_get_vdev_features_rev(&dev->bus, dev->host_features, dev->revision >= 1 ? 1 : 0); + if (dev->revision >= 1) { + virtio_add_feature(&dev->host_features, VIRTIO_F_VERSION_1); + } break; default: ret = -ENOSYS;