Messages in this thread |  | | From | Rusty Russell <> | Subject | Re: [PATCH RFC v4 00/17] linux: towards virtio-1 guest support | Date | Tue, 28 Oct 2014 11:15:06 +1030 |
| |
"Michael S. Tsirkin" <mst@redhat.com> writes: > Based on patches by Cornelia Rusty and others, but > with an API that should allow better static checking of code, > and slightly more concervative changes in vring,net and blk. > > Based on patches by Cornelia and others, but > with an API that should allow better static checking of code, > slightly more concervative changes in vring and drivers, > and compatibility for existing drivers so that > this series be applied before all drivers are converted. > > virtio drivers now pass sparse without warnings.
That's good! Some comments:
1) Patch order. You need to increase feature bits to 64, then define VIRTIO_F_VERSION_1, then use it in your __virtio conversion macros.
2) You need to enhance virtio_check_driver_offered_feature to look at the legacy bits, too. [ Oh, I see you did that in a followup ]
3) virtio_has_feature() is a bit heavy-weight, you probably want to add __virtio_has_feature() or just opencode vdev->features & (1ULL << VIRTIO_F_VERSION_1);
Obviously, patch correctness don't matter until we enable the VIRTIO_F_VERSION_1 feature in a transport. That's what makes me nervous, and I'll be waiting for Cornelia's ACK on that, since it looks like s390 is ready to go?
Thanks, Rusty.
|  |