From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLapr-0002wA-Jl for qemu-devel@nongnu.org; Tue, 09 Oct 2012 10:31:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLapj-0002dm-ML for qemu-devel@nongnu.org; Tue, 09 Oct 2012 10:31:03 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:43433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLapj-0002cW-DO for qemu-devel@nongnu.org; Tue, 09 Oct 2012 10:30:55 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 Oct 2012 15:30:53 +0100 Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q99EUhtM49414266 for ; Tue, 9 Oct 2012 14:30:43 GMT Received: from d06av08.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q99EUnla011526 for ; Tue, 9 Oct 2012 08:30:50 -0600 Date: Tue, 9 Oct 2012 16:30:46 +0200 From: Cornelia Huck Message-ID: <20121009163046.16fcefab@BR9GNB5Z> In-Reply-To: <04780C07-9F02-4148-B375-83C6025D6E45@suse.de> References: <1346771622-52763-1-git-send-email-cornelia.huck@de.ibm.com> <1346771622-52763-4-git-send-email-cornelia.huck@de.ibm.com> <04780C07-9F02-4148-B375-83C6025D6E45@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 3/4] s390/kvm: Add a channel I/O based virtio transport driver. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: linux-s390 , Anthony Liguori , Rusty Russell , KVM , Carsten Otte , Sebastian Ott , Marcelo Tosatti , Heiko Carstens , qemu-devel , Christian Borntraeger , Avi Kivity , Martin Schwidefsky On Wed, 19 Sep 2012 18:38:38 +0200 Alexander Graf wrote: > > On 04.09.2012, at 17:13, Cornelia Huck wrote: > > +static u32 virtio_ccw_get_features(struct virtio_device *vdev) > > +{ > > + struct virtio_ccw_device *vcdev = to_vc_device(vdev); > > + struct virtio_feature_desc features; > > + int ret; > > + > > + /* Read the feature bits from the host. */ > > + /* TODO: Features > 32 bits */ > > + features.index = 0; > > + vcdev->ccw.cmd_code = CCW_CMD_READ_FEAT; > > + vcdev->ccw.flags = 0; > > + vcdev->ccw.count = sizeof(features); > > + vcdev->ccw.cda = vcdev->area; > > + ret = ccw_io_helper(vcdev, VIRTIO_CCW_DOING_READ_FEAT); > > + if (ret) > > + return 0; > > + > > + memcpy(&features, (void *)(unsigned long)vcdev->area, > > + sizeof(features)); > > + return le32_to_cpu(features.features); > > The fact that the features are LE is missing from the spec, right? You're right, I thought it was there. > > > Alex >