mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: vhost_user: Enable most virtio reserved features
A lot of the VIRTIO reserved features should be supported or not by the vhost-user backend. That means on the VMM side, these features should be available, so that they don't get lost during the negotiation. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
// Copyright 2019 Intel Corporation. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::{
|
||||
VIRTIO_F_IN_ORDER, VIRTIO_F_NOTIFICATION_DATA, VIRTIO_F_ORDER_PLATFORM,
|
||||
VIRTIO_F_RING_EVENT_IDX, VIRTIO_F_RING_INDIRECT_DESC, VIRTIO_F_RING_PACKED, VIRTIO_F_VERSION_1,
|
||||
};
|
||||
use std::io;
|
||||
use vhost::vhost_user::message::VhostUserVirtioFeatures;
|
||||
use vhost::Error as VhostError;
|
||||
use vm_memory::Error as MmapError;
|
||||
|
||||
@@ -98,3 +103,12 @@ pub enum Error {
|
||||
MissingIrqFd,
|
||||
}
|
||||
type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
pub const DEFAULT_VIRTIO_FEATURES: u64 = 1 << VIRTIO_F_RING_INDIRECT_DESC
|
||||
| 1 << VIRTIO_F_RING_EVENT_IDX
|
||||
| 1 << VIRTIO_F_VERSION_1
|
||||
| 1 << VIRTIO_F_RING_PACKED
|
||||
| 1 << VIRTIO_F_IN_ORDER
|
||||
| 1 << VIRTIO_F_ORDER_PLATFORM
|
||||
| 1 << VIRTIO_F_NOTIFICATION_DATA
|
||||
| VhostUserVirtioFeatures::PROTOCOL_FEATURES.bits();
|
||||
|
||||
Reference in New Issue
Block a user