Re: [PATCH RFC v4 00/17] linux: towards virtio-1 guest support

From: Rusty Russell
Date: Mon Oct 27 2014 - 20:53:06 EST


"Michael S. Tsirkin" <mst@xxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/