Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.

Commit 3464657

Browse files
committed
doc: document kvm_xsave2::len field
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
1 parent 19357f4 commit 3464657

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/x86_64/fam_wrappers.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ pub type MsrList = FamStructWrapper<kvm_msr_list>;
100100
#[repr(C)]
101101
#[derive(Debug, Default)]
102102
pub struct kvm_xsave2 {
103+
/// The length, in bytes, of the FAM in [`kvm_xsave`].
104+
///
105+
/// Note that `KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2)` returns the size of the entire
106+
/// `kvm_xsave` structure, e.g. the sum of header and FAM. Thus, this `len` field
107+
/// is equal to `KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2) - 4096`.
103108
pub len: usize,
104109
pub xsave: kvm_xsave,
105110
}

0 commit comments

Comments
 (0)