From 15d34ffebba5e8db159e1eb11628e51b35fffbf3 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 15 Jan 2026 07:01:56 -0800 Subject: [PATCH] virtio-devices: vhost-user: blk: Use zero configuration offset Based upon the discussion and in https://github.com/rust-vmm/vhost/issues/29#issue-830820820 and the QEMU behaviour the get_config offset should be zero. This was not caught by our integration tests as the vhost-user-blk backend as implemented in this repository does not use the offset. Fixes: #7615 Signed-off-by: Rob Bradford --- virtio-devices/src/vhost_user/blk.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/virtio-devices/src/vhost_user/blk.rs b/virtio-devices/src/vhost_user/blk.rs index 6576013e8..d26350c91 100644 --- a/virtio-devices/src/vhost_user/blk.rs +++ b/virtio-devices/src/vhost_user/blk.rs @@ -11,8 +11,7 @@ use log::{error, info}; use seccompiler::SeccompAction; use serde::{Deserialize, Serialize}; use vhost::vhost_user::message::{ - VHOST_USER_CONFIG_OFFSET, VhostUserConfigFlags, VhostUserProtocolFeatures, - VhostUserVirtioFeatures, + VhostUserConfigFlags, VhostUserProtocolFeatures, VhostUserVirtioFeatures, }; use vhost::vhost_user::{FrontendReqHandler, VhostUserFrontend, VhostUserFrontendReqHandler}; use virtio_bindings::virtio_blk::{ @@ -147,7 +146,7 @@ impl Blk { let (_, config_space) = vu .socket_handle() .get_config( - VHOST_USER_CONFIG_OFFSET, + 0, config_len as u32, VhostUserConfigFlags::WRITABLE, config_space.as_slice(),