Re: [PATCH RFC 10/15] hw/virtio/vhost-shadow-virtqueue: range boundary in translation
Connor Kite <[email protected]>
| Newsgroups | dev.linux.lists.virtio-fs,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <CA+spn3qP1xahLRTNutmOLvDEXJXHh9W1tMeGeKiiDiz-ntyknw@mail.gmail.com> |
On Mon, Aug 3, 2026 at 5:56 AM Hanna Czenczek <[email protected]> wrote: > > > It’s not immediately obvious what is ensuring that `iov_len` can never > be 0. Sure, it would be wrong and makes no sense, but that is why I > think an `assert(iovec[i].iov_len > 0)` would be appropriate. > > (Looks like `virtqueue_map_desc()` is what rejects zero length, but that > is not really local to this code path, so not immediately obvious.) > > Hanna > From the QEMU Coding Style guidelines on error-handling it looks like errors that could be initiated by a malfunctioning guest should not cause Qemu to exit. Would it be more appropriate to return false when zero-length is detected? That follows the existing error path returning up to vhost_handle_guest_kick, which renders the svq unresponsive to future kicks. Best, Connor