Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtio-block read-only handling is not spec compliant #4888

Closed
rbradford opened this issue Nov 14, 2022 · 0 comments · Fixed by #4889
Closed

virtio-block read-only handling is not spec compliant #4888

rbradford opened this issue Nov 14, 2022 · 0 comments · Fixed by #4889

Comments

@rbradford
Copy link
Member

See cloud-hypervisor/rust-hypervisor-firmware#209

When asked to write to a read-only device the write should be rejected with a block status error:

A device MUST set the status byte to VIRTIO_BLK_S_IOERR for a write request if the VIRTIO_BLK_F_RO feature if offered, and MUST NOT write any data.

Currently it panics the thread.

rbradford added a commit to rbradford/cloud-hypervisor that referenced this issue Nov 14, 2022
TEST=Boot `--disk readonly=on` along with a guest that tries to write
(unmodified hypervisor-fw) and observe that the virtio device thread no
longer panics.

Fixes: cloud-hypervisor#4888

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
rbradford added a commit that referenced this issue Nov 14, 2022
TEST=Boot `--disk readonly=on` along with a guest that tries to write
(unmodified hypervisor-fw) and observe that the virtio device thread no
longer panics.

Fixes: #4888

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant