Skip to content

Commit 2dc08d1

Browse files
committed
cap: add DirtyLogRing cap
The capability is used for the KVM dirty ring interface for tracking dirtied pages. Signed-off-by: David Kleymann <[email protected]>
1 parent bd3260e commit 2dc08d1

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

kvm-ioctls/CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
## Upcoming Release
44

5+
6+
### Fixed
7+
8+
- Fixed `VmFd::enable_cap` available for all architectures
9+
10+
### Added
11+
12+
- Added `KvmDirtyLogRing` structure to mmap the dirty log ring.
13+
- Added `KVM_DIRTY_GFN_F_DIRTY` and `KVM_DIRTY_GFN_F_RESET` bitflags.
14+
- Added `KvmDirtyLogRing` iterator type for accessing dirty log entries.
15+
- Added `dirty_log_ring` field to `VcpuFd` to access per-vCpu dirty rings.
16+
- Inserted fences in KvmDirtyLogRing iterator `next` for architectures with weak memory consistency that require Acquire/Release
17+
- Added `DirtyLogRingInfo` struct and `dirty_log_ring_info` field to `VmFd` to
18+
track dirty ring configuration.
19+
- Added `enable_dirty_log_ring` function on `VmFd` to check corresponding
20+
capabilities and enable KVM's dirty log ring.
21+
- Added `VcpuFd::dirty_log_ring_iter()` to iterate over dirty guest frame numbers.
22+
- Added `VmFd::reset_dirty_rings()` to reset all dirty rings for the VM.
23+
24+
- Plumb through KVM_CAP_DIRTY_LOG_RING as DirtyLogRing cap.
25+
526
## v0.24.0
627

728
### Added

kvm-ioctls/src/cap.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,5 @@ pub enum Cap {
169169
NestedState = KVM_CAP_NESTED_STATE,
170170
#[cfg(target_arch = "x86_64")]
171171
X2ApicApi = KVM_CAP_X2APIC_API,
172+
DirtyLogRing = KVM_CAP_DIRTY_LOG_RING,
172173
}

0 commit comments

Comments
 (0)