[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110412144504.GB13850@redhat.com>
Date: Tue, 12 Apr 2011 17:45:04 +0300
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Christian Borntraeger <borntraeger@...ibm.com>
Cc: Rusty Russell <rusty@...tcorp.com.au>,
Carsten Otte <cotte@...ibm.com>, linux390@...ibm.com,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
lguest@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
linux-s390@...r.kernel.org,
virtualization@...ts.linux-foundation.org
Subject: Re: [RFC][PATCH] virtio: 64 bit features
On Tue, Apr 12, 2011 at 04:04:56PM +0200, Christian Borntraeger wrote:
> Am 11.04.2011 18:55, schrieb Michael S. Tsirkin:
>
> Looks mostly good, but
>
>
> > --- a/drivers/s390/kvm/kvm_virtio.c
> > +++ b/drivers/s390/kvm/kvm_virtio.c
> > @@ -82,13 +82,13 @@ static unsigned desc_size(const struct kvm_device_desc *desc)
> > static u32 kvm_get_features(struct virtio_device *vdev)
>
> This should be u64.
>
Ugh. Sure. Will fix, thanks!
> > {
> > unsigned int i;
> > - u32 features = 0;
> > + u64 features = 0;
> > struct kvm_device_desc *desc = to_kvmdev(vdev)->desc;
> > u8 *in_features = kvm_vq_features(desc);
> >
> > - for (i = 0; i < min(desc->feature_len * 8, 32); i++)
> > + for (i = 0; i < min(desc->feature_len * 8, 64); i++)
> > if (in_features[i / 8] & (1 << (i % 8)))
> > - features |= (1 << i);
> > + features |= (1ull << i);
> > return features;
> > }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists