Re: [PATCH v2 3/4] s390/kvm: Add a channel I/O based virtio transport driver.

Cornelia Huck
2012-10-09T14:30:46Z

On Wed, 19 Sep 2012 18:38:38 +0200
Alexander Graf <agraf@suse.de> 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
>