From: Cornelia Huck Subject: Re: [PATCH RFC v5 14/19] s390x/virtio-ccw: enable virtio 1.0 Date: Tue, 9 Dec 2014 18:24:42 +0100 Message-ID: <20141209182442.6824a615.cornelia.huck@de.ibm.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 Cc: virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org, kvm@vger.kernel.org, rusty@rustcorp.com.au, thuth@linux.vnet.ibm.com To: "Michael S. Tsirkin" Return-path: Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:37881 "EHLO e06smtp17.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751189AbaLIRYt (ORCPT ); Tue, 9 Dec 2014 12:24:49 -0500 Received: from /spool/local by e06smtp17.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 b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 312671B0804B for ; Tue, 9 Dec 2014 17:25:06 +0000 (GMT) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sB9HOjrj59375714 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 sB9HOiZG031769 for ; Tue, 9 Dec 2014 10:24:45 -0700 In-Reply-To: <20141209134646.GA6897@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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;