mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Only allow removal of specific types of virtio device
Now that all virtio devices are assigned with identifiers, they could all be removed from the VM. This is not something that we want to allow because it does not make sense for some devices. That's why based on the device type, we remove the device or we return an error to the user. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
9ed880d74e
commit
a5de49558e
@@ -68,11 +68,11 @@ const VIRTIO_F_IOMMU_PLATFORM: u32 = 33;
|
||||
const VIRTIO_F_IN_ORDER: u32 = 35;
|
||||
|
||||
// Types taken from linux/virtio_ids.h
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[allow(dead_code)]
|
||||
#[allow(non_camel_case_types)]
|
||||
#[repr(C)]
|
||||
enum VirtioDeviceType {
|
||||
pub enum VirtioDeviceType {
|
||||
TYPE_NET = 1,
|
||||
TYPE_BLOCK = 2,
|
||||
TYPE_CONSOLE = 3,
|
||||
|
||||
Reference in New Issue
Block a user