Skip to content

Commit

Permalink
refactor: remove unused set_dirty_page_tracking() function
Browse files Browse the repository at this point in the history
In addition to being unused, it was also wrong, because it only updated
the flag on KVM's side, but kept firecracker's tracking disabled.

Signed-off-by: Patrick Roy <[email protected]>
  • Loading branch information
roypat committed Jan 27, 2025
1 parent 2b714e7 commit 6115abf
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/vmm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,18 +631,6 @@ impl Vmm {
Ok(bitmap)
}

/// Enables or disables KVM dirty page tracking.
pub fn set_dirty_page_tracking(&mut self, enable: bool) -> Result<(), VmmError> {
// This function _always_ results in an ioctl update. The VMM is stateless in the sense
// that it's unaware of the current dirty page tracking setting.
// The VMM's consumer will need to cache the dirty tracking setting internally. For
// example, if this function were to be exposed through the VMM controller, the VMM
// resources should cache the flag.
self.vm
.set_kvm_memory_regions(&self.guest_memory, enable)
.map_err(VmmError::Vm)
}

/// Updates the path of the host file backing the emulated block device with id `drive_id`.
/// We update the disk image on the device and its virtio configuration.
pub fn update_block_device_path(
Expand Down

0 comments on commit 6115abf

Please sign in to comment.