From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyOWv-0002NX-Ku for qemu-devel@nongnu.org; Tue, 09 Dec 2014 12:25:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XyOWm-00085T-Js for qemu-devel@nongnu.org; Tue, 09 Dec 2014 12:24:57 -0500 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:56586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyOWm-00085M-AZ for qemu-devel@nongnu.org; Tue, 09 Dec 2014 12:24:48 -0500 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 Dec 2014 17:24:47 -0000 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 0271217D8042 for ; Tue, 9 Dec 2014 17:25:07 +0000 (GMT) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sB9HOjmf58654806 for ; Tue, 9 Dec 2014 17:24:45 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sB9HOiZA031769 for ; Tue, 9 Dec 2014 10:24:44 -0700 Date: Tue, 9 Dec 2014 18:24:42 +0100 From: Cornelia Huck Message-ID: <20141209182442.6824a615.cornelia.huck@de.ibm.com> In-Reply-To: <20141209134646.GA6897@redhat.com> References: <1417525227-14051-1-git-send-email-cornelia.huck@de.ibm.com> <1417525227-14051-15-git-send-email-cornelia.huck@de.ibm.com> <20141209134646.GA6897@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC v5 14/19] s390x/virtio-ccw: enable virtio 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: thuth@linux.vnet.ibm.com, rusty@rustcorp.com.au, qemu-devel@nongnu.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org On Tue, 9 Dec 2014 15:46:46 +0200 "Michael S. Tsirkin" wrote: > On Tue, Dec 02, 2014 at 02:00:22PM +0100, Cornelia Huck wrote: > > virtio-ccw should now have everything in place to operate virtio 1.0 > > devices, so let's enable revision 1. > > > > Signed-off-by: Cornelia Huck > > Looks like this will allow revision 1 for all devices, > we only want this for virtio 1 devices. > > The following should fix it I think: > > Signed-off-by: Michael S. Tsirkin > > > @@ -104,6 +101,12 @@ struct VirtioCcwDevice { > uint64_t ind_bit; > }; > > +/* The maximum virtio revision we support. */ > +static int virtio_ccw_rev_max(VirtioCcwDevice *dev) Make this "static inline int" and I'm fine with this :) > +{ > + return dev->host_features & (1ULL << VIRTIO_F_VERSION_1) ? 1 : 0; > +} > + > /* virtual css bus type */ > typedef struct VirtualCssBus { > BusState parent_obj;