Skip to content

Commit

Permalink
virtio-devices: vdpa: Not error out on resume if not paused
Browse files Browse the repository at this point in the history
Signed-off-by: Bo Chen <chen.bo@intel.com>
  • Loading branch information
likebreath committed Jun 14, 2024
1 parent f2b2d03 commit 827b150
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions virtio-devices/src/vdpa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ impl Pausable for Vdpa {
}

fn resume(&mut self) -> std::result::Result<(), MigratableError> {
if !self.common.paused.load(Ordering::SeqCst) {
return Ok(());
}

if !self.migrating {
Err(MigratableError::Resume(anyhow!(
"Can't resume a vDPA device outside live migration"
Expand Down

0 comments on commit 827b150

Please sign in to comment.