qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 3/4] s390/kvm: Add a channel I/O based virtio


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH v2 3/4] s390/kvm: Add a channel I/O based virtio transport driver.
Date: Tue, 9 Oct 2012 16:30:46 +0200

On Wed, 19 Sep 2012 18:38:38 +0200
Alexander Graf <address@hidden> 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
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]