Skip to content

Conversation

phip1611
Copy link
Contributor

Since the functionality of [0] was backported to kvm-bindings@v0.12.1 and kvm-ioctls@v0.22.1 [1, 2], we can now save nested KVM state. This way, nesting works across state save/resume and live-migration.

[0] rust-vmm/kvm#322
[1] rust-vmm/kvm#349
[2] rust-vmm/kvm#350

Closes #7160 (makes it obsolete).

@phip1611 phip1611 force-pushed the nested-state-migration branch from 197ab59 to bf80750 Compare September 25, 2025 13:17
@phip1611 phip1611 marked this pull request as ready for review September 25, 2025 13:18
@phip1611 phip1611 requested a review from a team as a code owner September 25, 2025 13:18
@phip1611 phip1611 closed this Sep 25, 2025
@phip1611 phip1611 reopened this Sep 25, 2025
@phip1611 phip1611 force-pushed the nested-state-migration branch from bf80750 to 247d672 Compare September 25, 2025 14:02
Since the functionality of [0] was backported to
kvm-bindings@v0.12.1 and kvm-ioctls@v0.22.1 [1, 2], we
can now save nested KVM state. This way, nesting works across
state save/resume and live-migration.

[0] rust-vmm/kvm#322
[1] rust-vmm/kvm#349
[2] rust-vmm/kvm#350

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
@phip1611 phip1611 force-pushed the nested-state-migration branch from 247d672 to 05cdfa3 Compare September 29, 2025 07:29
@phip1611 phip1611 requested a review from rbradford September 29, 2025 07:29
/// Get the state of the nested guest from the current vCPU,
/// if there is any.
#[cfg(target_arch = "x86_64")]
fn nested_state(&self) -> cpu::Result<Option<KvmNestedStateBuffer>> {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe nested_state -> get_nested_state 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By convention, Rust code should avoid a get_ where possible. In kvm-ioctls, this only exists for consistence with the rest of the code. I don't have a strong opinion here, tho.

@rbradford rbradford added this pull request to the merge queue Sep 29, 2025
Merged via the queue into cloud-hypervisor:main with commit 690741d Sep 29, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plan/Discussion to bump kvm-ioctls from 0.19 to 0.23.0

3 participants