On 24.07.26 00:30, Connor Kite wrote:
By default svq vrings are placed in an anonymous memory map. As svqs
will be leveraged to enable memory isolation in vhost-user, it is useful
to be able to place the vrings in a shared isolation memory region.

Adds the option to specify vring placement by providing a vring base
address before starting the svq.

Signed-off-by: Connor Kite <[email protected]>
---
  hw/virtio/vhost-shadow-virtqueue.c | 22 +++++++++++++++-------
  hw/virtio/vhost-shadow-virtqueue.h |  3 +++
  2 files changed, 18 insertions(+), 7 deletions(-)

I would go beyond Stefan and say that I do really ask for explicit bounds checking on the area.

Besides that, `vhost_svq_stop()` still always calls `munmap()` on `desc` and `used` and that must absolutely not be done in case a fixed location was provided.

Also, it would be nicer to have a function to set the base address instead of having to modify the svq object directly.

Hanna


Reply via email to