- Make sure host_stride == guest_stride at allocation time
For (3), since we have to do something like VIRTIO_GPU_CMD_METADATA_QUERY (or whatever we call it) for Vulkan and zero-copy anyways, this seemed like the most natural choice.
Yep, for shared resources it certainly makes sense to have host and guest agree on the stride. I'd tend to not touch the current TRANSFER ioctls (and virtio commands) though, but integrate that into the blob resource support instead. We probably need blob transfer ioctls and virtio commands anyway.
I don't think we can simply use the args here without checking we
actually got something from userspace ...
Correct me if I'm wrong, but doesn't drm_ioctl(..) already make sure that the pointer is the intersection of the kernel and userspace sizes, so we can safely append data? i.e, layer_stride and stride will be zero for old user space + a new kernel.
Ah, right, I forgot the generic drm ioctl code does that service for us.
cheers, Gerd