Skip to content

Commit 9758ef8

Browse files
committed
Persist i/o memory across snapshots
Signed-off-by: Patrick Roy <[email protected]>
1 parent da4c0c8 commit 9758ef8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/vmm/src/arch/aarch64/vm.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ impl ArchVm {
7070
pub fn save_state(&self, mpidrs: &[u64]) -> Result<VmState, ArchVmError> {
7171
Ok(VmState {
7272
memory: self.common.guest_memory.describe(),
73+
io_memory: self.common.io_memory.describe(),
7374
gic: self
7475
.get_irqchip()
7576
.save_device(mpidrs)
@@ -96,6 +97,8 @@ impl ArchVm {
9697
pub struct VmState {
9798
/// Guest memory state
9899
pub memory: GuestMemoryState,
100+
/// io memory state
101+
pub io_memory: GuestMemoryState,
99102
/// GIC state.
100103
pub gic: GicState,
101104
}

src/vmm/src/arch/x86_64/vm.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ impl ArchVm {
187187

188188
Ok(VmState {
189189
memory: self.common.guest_memory.describe(),
190+
io_memory: self.common.io_memory.describe(),
190191
pitstate,
191192
clock,
192193
pic_master,
@@ -211,6 +212,8 @@ impl ArchVm {
211212
pub struct VmState {
212213
/// guest memory state
213214
pub memory: GuestMemoryState,
215+
/// io memory state
216+
pub io_memory: GuestMemoryState,
214217
pitstate: kvm_pit_state2,
215218
clock: kvm_clock_data,
216219
// TODO: rename this field to adopt inclusive language once Linux updates it, too.

0 commit comments

Comments
 (0)