mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-02 19:45:46 +00:00
vm-virtio: vhost_user: Fix blk device configuration space offset value
Current device configuration space offset value is 0, we need to update that value to VHOST_USER_CONFIG_OFFSET(0x100) to follow the spec Fixes #844 Signed-off-by: Arron Wang <arron.wang@intel.com>
This commit is contained in:
parent
d6e6901957
commit
65a38e6f70
@ -20,6 +20,7 @@ use std::sync::Arc;
|
|||||||
use std::thread;
|
use std::thread;
|
||||||
use std::vec::Vec;
|
use std::vec::Vec;
|
||||||
use vhost_rs::vhost_user::message::VhostUserConfigFlags;
|
use vhost_rs::vhost_user::message::VhostUserConfigFlags;
|
||||||
|
use vhost_rs::vhost_user::message::VHOST_USER_CONFIG_OFFSET;
|
||||||
use vhost_rs::vhost_user::message::{VhostUserProtocolFeatures, VhostUserVirtioFeatures};
|
use vhost_rs::vhost_user::message::{VhostUserProtocolFeatures, VhostUserVirtioFeatures};
|
||||||
use vhost_rs::vhost_user::{Master, VhostUserMaster, VhostUserMasterReqHandler};
|
use vhost_rs::vhost_user::{Master, VhostUserMaster, VhostUserMasterReqHandler};
|
||||||
use vhost_rs::VhostBackend;
|
use vhost_rs::VhostBackend;
|
||||||
@ -116,7 +117,7 @@ impl Blk {
|
|||||||
let config_space: Vec<u8> = vec![0u8; config_len as usize];
|
let config_space: Vec<u8> = vec![0u8; config_len as usize];
|
||||||
let (_, config_space) = vhost_user_blk
|
let (_, config_space) = vhost_user_blk
|
||||||
.get_config(
|
.get_config(
|
||||||
0,
|
VHOST_USER_CONFIG_OFFSET,
|
||||||
config_len as u32,
|
config_len as u32,
|
||||||
VhostUserConfigFlags::WRITABLE,
|
VhostUserConfigFlags::WRITABLE,
|
||||||
config_space.as_slice(),
|
config_space.as_slice(),
|
||||||
|
Loading…
Reference in New Issue
Block a user