mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
The virtio spec v1.2 in 5.2.6.2 requires that the device MUST return VIRTIO_BLK_S_UNSUPP for write zeroes commands if any unknown flag is set. Add an early check that rejects requests with reserved flag bits set by returning VIRTIO_BLK_S_UNSUPP via the existing ExecuteError::Unsupported variant. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>