mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-21 23:41:15 +00:00
virtio-devices: Stop deriving unnecessary traits
These structs only need to derive Versionize now. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
6e6f66de2e
commit
bd724fc304
@ -366,7 +366,7 @@ pub struct Block {
|
|||||||
rate_limiter_config: Option<RateLimiterConfig>,
|
rate_limiter_config: Option<RateLimiterConfig>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Versionize)]
|
#[derive(Versionize)]
|
||||||
pub struct BlockState {
|
pub struct BlockState {
|
||||||
pub disk_path: String,
|
pub disk_path: String,
|
||||||
pub disk_nsectors: u64,
|
pub disk_nsectors: u64,
|
||||||
|
@ -43,7 +43,7 @@ const CONFIG_EVENT: u16 = EPOLL_HELPER_EVENT_LAST + 4;
|
|||||||
//Console size feature bit
|
//Console size feature bit
|
||||||
const VIRTIO_CONSOLE_F_SIZE: u64 = 0;
|
const VIRTIO_CONSOLE_F_SIZE: u64 = 0;
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Default, Deserialize, Serialize, Versionize)]
|
#[derive(Copy, Clone, Debug, Default, Versionize)]
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
pub struct VirtioConsoleConfig {
|
pub struct VirtioConsoleConfig {
|
||||||
cols: u16,
|
cols: u16,
|
||||||
@ -280,7 +280,7 @@ pub struct Console {
|
|||||||
seccomp_action: SeccompAction,
|
seccomp_action: SeccompAction,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Versionize)]
|
#[derive(Versionize)]
|
||||||
pub struct ConsoleState {
|
pub struct ConsoleState {
|
||||||
avail_features: u64,
|
avail_features: u64,
|
||||||
acked_features: u64,
|
acked_features: u64,
|
||||||
|
@ -693,7 +693,7 @@ impl EpollHelperHandler for IommuEpollHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Serialize, Deserialize, Versionize)]
|
#[derive(Clone, Copy, Versionize)]
|
||||||
struct Mapping {
|
struct Mapping {
|
||||||
gpa: u64,
|
gpa: u64,
|
||||||
size: u64,
|
size: u64,
|
||||||
@ -741,7 +741,7 @@ pub struct Iommu {
|
|||||||
seccomp_action: SeccompAction,
|
seccomp_action: SeccompAction,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Versionize)]
|
#[derive(Versionize)]
|
||||||
struct IommuState {
|
struct IommuState {
|
||||||
avail_features: u64,
|
avail_features: u64,
|
||||||
acked_features: u64,
|
acked_features: u64,
|
||||||
|
@ -296,7 +296,7 @@ pub struct Net {
|
|||||||
rate_limiter_config: Option<RateLimiterConfig>,
|
rate_limiter_config: Option<RateLimiterConfig>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Versionize)]
|
#[derive(Versionize)]
|
||||||
pub struct NetState {
|
pub struct NetState {
|
||||||
pub avail_features: u64,
|
pub avail_features: u64,
|
||||||
pub acked_features: u64,
|
pub acked_features: u64,
|
||||||
|
@ -25,7 +25,7 @@ const QUEUE_SIZE: usize = 256;
|
|||||||
const CTRL_QUEUE_EVENT: u16 = EPOLL_HELPER_EVENT_LAST + 1;
|
const CTRL_QUEUE_EVENT: u16 = EPOLL_HELPER_EVENT_LAST + 1;
|
||||||
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Copy, Clone, Debug, Default, Deserialize, Serialize, Versionize)]
|
#[derive(Copy, Clone, Debug, Default, Versionize)]
|
||||||
pub struct VirtioNetConfig {
|
pub struct VirtioNetConfig {
|
||||||
pub mac: [u8; 6],
|
pub mac: [u8; 6],
|
||||||
pub status: u16,
|
pub status: u16,
|
||||||
|
@ -44,7 +44,7 @@ const VIRTIO_PMEM_RESP_TYPE_EIO: u32 = 1;
|
|||||||
// New descriptors are pending on the virtio queue.
|
// New descriptors are pending on the virtio queue.
|
||||||
const QUEUE_AVAIL_EVENT: u16 = EPOLL_HELPER_EVENT_LAST + 1;
|
const QUEUE_AVAIL_EVENT: u16 = EPOLL_HELPER_EVENT_LAST + 1;
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Default, Serialize, Deserialize, Versionize)]
|
#[derive(Copy, Clone, Debug, Default, Versionize)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
struct VirtioPmemConfig {
|
struct VirtioPmemConfig {
|
||||||
start: u64,
|
start: u64,
|
||||||
@ -269,7 +269,7 @@ pub struct Pmem {
|
|||||||
_region: MmapRegion,
|
_region: MmapRegion,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Versionize)]
|
#[derive(Versionize)]
|
||||||
pub struct PmemState {
|
pub struct PmemState {
|
||||||
avail_features: u64,
|
avail_features: u64,
|
||||||
acked_features: u64,
|
acked_features: u64,
|
||||||
|
@ -130,7 +130,7 @@ pub struct Rng {
|
|||||||
seccomp_action: SeccompAction,
|
seccomp_action: SeccompAction,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Versionize)]
|
#[derive(Versionize)]
|
||||||
pub struct RngState {
|
pub struct RngState {
|
||||||
pub avail_features: u64,
|
pub avail_features: u64,
|
||||||
pub acked_features: u64,
|
pub acked_features: u64,
|
||||||
|
@ -167,7 +167,7 @@ pub struct Watchdog {
|
|||||||
timer: File,
|
timer: File,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Versionize)]
|
#[derive(Versionize)]
|
||||||
pub struct WatchdogState {
|
pub struct WatchdogState {
|
||||||
pub avail_features: u64,
|
pub avail_features: u64,
|
||||||
pub acked_features: u64,
|
pub acked_features: u64,
|
||||||
|
Loading…
Reference in New Issue
Block a user