Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/vmm/src/devices/acpi/generated/vmclock_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ pub const VMCLOCK_FLAG_PERIOD_MAXERROR_VALID: u64 = 16;
pub const VMCLOCK_FLAG_TIME_ESTERROR_VALID: u64 = 32;
pub const VMCLOCK_FLAG_TIME_MAXERROR_VALID: u64 = 64;
pub const VMCLOCK_FLAG_TIME_MONOTONIC: u64 = 128;
pub const VMCLOCK_FLAG_VM_GEN_COUNTER_PRESENT: u64 = 256;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add this to our bindgen patches?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, at the moment we should be doing that, in theory. In the future, when the ABI changes are merged in Linux mainline we won't need to. And this change will disappear. So, IOW, I think it doesn't matter how we apply this change now, because in the future we will just recreate the bindings and that's it. If we have this in our patches, the patches won't apply. Which isn't a big deal, we can re-create the patch, so either way works for me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, my concern is that if we need to regenerate the bindings we may inadvertently lose these manual changes as there's no patch to apply this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we do that, the Firecracker won't compile so we'll find out. If I add it as bindgen patches, we won't be able to recreate the bindings next time. Choose your poison :P (either way works for me)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair, but I'd rather keep the generated files fully auto-generated. But it's no strong opinion, hopefully this is all temporary anyways.

pub const VMCLOCK_FLAG_NOTIFICATION_PRESENT: u64 = 512;
pub const VMCLOCK_STATUS_UNKNOWN: u8 = 0;
pub const VMCLOCK_STATUS_INITIALIZING: u8 = 1;
pub const VMCLOCK_STATUS_SYNCHRONIZED: u8 = 2;
Expand Down Expand Up @@ -153,10 +155,11 @@ pub struct vmclock_abi {
pub time_frac_sec: __le64,
pub time_esterror_nanosec: __le64,
pub time_maxerror_nanosec: __le64,
pub vm_generation_counter: __le64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of vmclock_abi"][::std::mem::size_of::<vmclock_abi>() - 104usize];
["Size of vmclock_abi"][::std::mem::size_of::<vmclock_abi>() - 112usize];
["Alignment of vmclock_abi"][::std::mem::align_of::<vmclock_abi>() - 8usize];
["Offset of field: vmclock_abi::magic"][::std::mem::offset_of!(vmclock_abi, magic) - 0usize];
["Offset of field: vmclock_abi::size"][::std::mem::offset_of!(vmclock_abi, size) - 4usize];
Expand Down Expand Up @@ -198,4 +201,6 @@ const _: () = {
[::std::mem::offset_of!(vmclock_abi, time_esterror_nanosec) - 88usize];
["Offset of field: vmclock_abi::time_maxerror_nanosec"]
[::std::mem::offset_of!(vmclock_abi, time_maxerror_nanosec) - 96usize];
["Offset of field: vmclock_abi::vm_generation_counter"]
[::std::mem::offset_of!(vmclock_abi, vm_generation_counter) - 104usize];
};