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 <rbradford@meta.com>
This commit is contained in:
Rob Bradford 2026-01-15 07:01:56 -08:00 committed by Rob Bradford
parent cda1ec5fbc
commit 15d34ffebb

View file

@ -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(),