@@ -2011,14 +2011,14 @@ impl VcpuFd {
2011
2011
/// let vcpu = vm.create_vcpu(0).unwrap();
2012
2012
/// let mut state_buffer = KvmNestedStateBuffer::empty();
2013
2013
/// if kvm.check_extension(Cap::NestedState) {
2014
- /// vcpu.get_nested_state (&mut state_buffer).unwrap();
2014
+ /// vcpu.nested_state (&mut state_buffer).unwrap();
2015
2015
/// // Next, serialize the actual state into a file or so.
2016
2016
/// }
2017
2017
/// ```
2018
2018
///
2019
2019
/// [`Kvm::check_extension_int`]: kvm_ioctls::Kvm::check_extension_int
2020
2020
#[ cfg( target_arch = "x86_64" ) ]
2021
- pub fn get_nested_state (
2021
+ pub fn nested_state (
2022
2022
& self ,
2023
2023
buffer : & mut KvmNestedStateBuffer ,
2024
2024
) -> Result < Option < NonZeroUsize /* actual length of state */ > > {
@@ -2047,7 +2047,7 @@ impl VcpuFd {
2047
2047
///
2048
2048
/// - `state`: The new state to be put into KVM. The header must report the
2049
2049
/// `size` of the state properly. The state must be retrieved first using
2050
- /// [`Self::get_nested_state `].
2050
+ /// [`Self::nested_state `].
2051
2051
///
2052
2052
/// # Example
2053
2053
///
@@ -2058,7 +2058,7 @@ impl VcpuFd {
2058
2058
/// let vcpu = vm.create_vcpu(0).unwrap();
2059
2059
/// if kvm.check_extension(Cap::NestedState) {
2060
2060
/// let mut state_buffer = KvmNestedStateBuffer::empty();
2061
- /// vcpu.get_nested_state (&mut state_buffer).unwrap();
2061
+ /// vcpu.nested_state (&mut state_buffer).unwrap();
2062
2062
/// // Rename the variable to better reflect the role.
2063
2063
/// let old_state = state_buffer;
2064
2064
///
@@ -3725,7 +3725,7 @@ mod tests {
3725
3725
size_of:: <KvmNestedStateBuffer >( )
3726
3726
) ;
3727
3727
3728
- vcpu. get_nested_state ( & mut state_buffer) . unwrap ( ) ;
3728
+ vcpu. nested_state ( & mut state_buffer) . unwrap ( ) ;
3729
3729
let old_state = state_buffer;
3730
3730
3731
3731
// There is no nested guest in this test, so there is no payload.
0 commit comments