mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-25 17:31:16 +00:00
vhost_rs: remove config space offset setting
There is one definition in message.rs file as below: pub const VHOST_USER_CONFIG_OFFSET: u32 = 0x100 This definition is only for virtio mmio config space and we will add this offset in virtio-mmio side and not vhost user protocl side. Signed-off-by: Yang Zhong <yang.zhong@intel.com>
This commit is contained in:
parent
a44a903587
commit
6fb7c3bbc2
@ -575,10 +575,9 @@ impl VhostUserMsgValidator for VhostUserConfig {
|
|||||||
fn is_valid(&self) -> bool {
|
fn is_valid(&self) -> bool {
|
||||||
if (self.flags & !VhostUserConfigFlags::all().bits()) != 0 {
|
if (self.flags & !VhostUserConfigFlags::all().bits()) != 0 {
|
||||||
return false;
|
return false;
|
||||||
} else if self.offset < VHOST_USER_CONFIG_OFFSET
|
} else if self.offset >= VHOST_USER_CONFIG_SIZE
|
||||||
|| self.offset >= VHOST_USER_CONFIG_SIZE
|
|
||||||
|| self.size == 0
|
|| self.size == 0
|
||||||
|| self.size > (VHOST_USER_CONFIG_SIZE - VHOST_USER_CONFIG_OFFSET)
|
|| self.size > VHOST_USER_CONFIG_SIZE
|
||||||
|| self.size + self.offset > VHOST_USER_CONFIG_SIZE
|
|| self.size + self.offset > VHOST_USER_CONFIG_SIZE
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user