You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Linux 5.17, the `kvm_xsave` struct has a flexible array member
(FAM) at the end, which can be retrieved using the `KVM_GET_XSAVE2`
ioctl [1]. What makes this FAM special is that the length is not stored
in the header, but has to be retrieved via
`KVM_CHECK_CAPABILITY(KVM_CAP_XSAVE2)`, which returns the total size of
the `kvm_xsave` struct (e.g. the traditional 4096 byte header + the size
of the FAM). Thus, to support `KVM_GET_XSAVE2`, we first need to check
the capability on the VM fd, construct a FamStructWrapper of the correct
size, and then call `KVM_GET_XSAVE2`.
[1]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-get-xsave2
Signed-off-by: Patrick Roy <[email protected]>
0 commit comments