|
11 | 11 |
|
12 | 12 | use super::interrupt_controller::{Error, InterruptController};
|
13 | 13 | use byteorder::{ByteOrder, LittleEndian};
|
| 14 | +use serde::{Deserialize, Serialize}; |
14 | 15 | use std::result;
|
15 | 16 | use std::sync::{Arc, Barrier};
|
16 |
| -use versionize::{VersionMap, Versionize, VersionizeResult}; |
17 |
| -use versionize_derive::Versionize; |
18 | 17 | use vm_device::interrupt::{
|
19 | 18 | InterruptIndex, InterruptManager, InterruptSourceConfig, InterruptSourceGroup,
|
20 | 19 | MsiIrqGroupConfig, MsiIrqSourceConfig,
|
21 | 20 | };
|
22 | 21 | use vm_device::BusDevice;
|
23 | 22 | use vm_memory::GuestAddress;
|
24 |
| -use vm_migration::{ |
25 |
| - Migratable, MigratableError, Pausable, Snapshot, Snapshottable, Transportable, VersionMapped, |
26 |
| -}; |
| 23 | +use vm_migration::{Migratable, MigratableError, Pausable, Snapshot, Snapshottable, Transportable}; |
27 | 24 | use vmm_sys_util::eventfd::EventFd;
|
28 | 25 |
|
29 | 26 | type Result<T> = result::Result<T, Error>;
|
@@ -136,15 +133,14 @@ pub struct Ioapic {
|
136 | 133 | interrupt_source_group: Arc<dyn InterruptSourceGroup>,
|
137 | 134 | }
|
138 | 135 |
|
139 |
| -#[derive(Versionize)] |
| 136 | +#[derive(Serialize, Deserialize)] |
140 | 137 | pub struct IoapicState {
|
141 | 138 | id_reg: u32,
|
142 | 139 | reg_sel: u32,
|
143 | 140 | reg_entries: [RedirectionTableEntry; NUM_IOAPIC_PINS],
|
144 | 141 | used_entries: [bool; NUM_IOAPIC_PINS],
|
145 | 142 | apic_address: u64,
|
146 | 143 | }
|
147 |
| -impl VersionMapped for IoapicState {} |
148 | 144 |
|
149 | 145 | impl BusDevice for Ioapic {
|
150 | 146 | fn read(&mut self, _base: u64, offset: u64, data: &mut [u8]) {
|
@@ -444,7 +440,7 @@ impl Snapshottable for Ioapic {
|
444 | 440 | }
|
445 | 441 |
|
446 | 442 | fn snapshot(&mut self) -> std::result::Result<Snapshot, MigratableError> {
|
447 |
| - Snapshot::new_from_versioned_state(&self.state()) |
| 443 | + Snapshot::new_from_state(&self.state()) |
448 | 444 | }
|
449 | 445 | }
|
450 | 446 |
|
|
0 commit comments