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

@@ -588,12 +588,7 @@ where
}
}
impl<B> Pausable for Vsock<B>
where
B: VsockBackend + Sync + 'static,
{
virtio_pausable_inner!();
}
virtio_pausable!(Vsock, T: 'static + VsockBackend + Sync);
impl<B> Snapshotable for Vsock<B> where B: VsockBackend + Sync + 'static {}
impl<B> Migratable for Vsock<B> where B: VsockBackend + Sync + 'static {}