Skip to content

Commit 219a14c

Browse files
committed
vmclock ABI: add snapshot safety features
Add support for vm_generation_counter and notifications. Keep this separately for now, since currently upstream bindings don't include it. We will recreate this for Linux headers once they are released. Signed-off-by: Babis Chalios <bchalios@amazon.es>
1 parent a8f5d78 commit 219a14c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/vmm/src/devices/acpi/generated/vmclock_abi.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ pub const VMCLOCK_FLAG_PERIOD_MAXERROR_VALID: u64 = 16;
3838
pub const VMCLOCK_FLAG_TIME_ESTERROR_VALID: u64 = 32;
3939
pub const VMCLOCK_FLAG_TIME_MAXERROR_VALID: u64 = 64;
4040
pub const VMCLOCK_FLAG_TIME_MONOTONIC: u64 = 128;
41+
pub const VMCLOCK_FLAG_VM_GEN_COUNTER_PRESENT: u64 = 256;
42+
pub const VMCLOCK_FLAG_NOTIFICATION_PRESENT: u64 = 512;
4143
pub const VMCLOCK_STATUS_UNKNOWN: u8 = 0;
4244
pub const VMCLOCK_STATUS_INITIALIZING: u8 = 1;
4345
pub const VMCLOCK_STATUS_SYNCHRONIZED: u8 = 2;
@@ -153,10 +155,11 @@ pub struct vmclock_abi {
153155
pub time_frac_sec: __le64,
154156
pub time_esterror_nanosec: __le64,
155157
pub time_maxerror_nanosec: __le64,
158+
pub vm_generation_counter: __le64,
156159
}
157160
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
158161
const _: () = {
159-
["Size of vmclock_abi"][::std::mem::size_of::<vmclock_abi>() - 104usize];
162+
["Size of vmclock_abi"][::std::mem::size_of::<vmclock_abi>() - 112usize];
160163
["Alignment of vmclock_abi"][::std::mem::align_of::<vmclock_abi>() - 8usize];
161164
["Offset of field: vmclock_abi::magic"][::std::mem::offset_of!(vmclock_abi, magic) - 0usize];
162165
["Offset of field: vmclock_abi::size"][::std::mem::offset_of!(vmclock_abi, size) - 4usize];
@@ -198,4 +201,6 @@ const _: () = {
198201
[::std::mem::offset_of!(vmclock_abi, time_esterror_nanosec) - 88usize];
199202
["Offset of field: vmclock_abi::time_maxerror_nanosec"]
200203
[::std::mem::offset_of!(vmclock_abi, time_maxerror_nanosec) - 96usize];
204+
["Offset of field: vmclock_abi::vm_generation_counter"]
205+
[::std::mem::offset_of!(vmclock_abi, vm_generation_counter) - 104usize];
201206
};

0 commit comments

Comments
 (0)