vm-virtio: Pausable macro factorization improvements

By adding an internal layer of abstraction (the hidden VirtioPausable
trait), we can factorize the virtio common code.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2020-01-27 18:59:39 +01:00
committed by Sebastien Boeuf
parent c06a827cbb
commit 2cb7ec04a4
3 changed files with 76 additions and 56 deletions

View File

@@ -1011,9 +1011,6 @@ impl<T: 'static + DiskFile + Send> VirtioDevice for Block<T> {
}
}
impl<T: 'static + DiskFile + Send> Pausable for Block<T> {
virtio_pausable_inner!();
}
virtio_pausable!(Block, T: 'static + DiskFile + Send);
impl<T: 'static + DiskFile + Send> Snapshotable for Block<T> {}
impl<T: 'static + DiskFile + Send> Migratable for Block<T> {}