lkml.org 
[lkml]   [2018]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[RFC 0/2] KVM/nVMX: Add support for saving and restoring L1 hypervisors with its running L2s
Date
Live migration software in L0 needs to be able to capture an accurate state of
the L1 guest in order to save it and later restore it. One of the complications
of doing this when you have a nested/L2 guest is that the state from the L0
user space point of view is very indeterminstic. The state can be coming from
the L1 or the L2 guest depending on when the vCPU was kicked out of non-root
mode. There is also no way currently to extract the extra meta-state that L0
holds in order to run L2s.

In order to fix this, always switch to L1 state before exiting to user space
(Patch 1) and provide a new ioctl command to extra the extra meta-state (Patch 2).

This is still an early RFC because:

1- To get feedback on the approach taken here.
2- I am still debugging a VMEntry failure for L2 that occassionaly happens when
I run a pause+unpause loop against an L1 guest running L2s. Also there is some
meta-state that I am not extracting yet (will update this soon). L1 seems to
be very stable though.

KarimAllah Ahmed (2):
KVM/nVMX: Cleanly exit from L2 to L1 on user-space exit
KVM/nVMX: Add support for saving/restoring L2 meta-state stored by L0

arch/x86/include/asm/kvm_host.h | 5 +++
arch/x86/include/uapi/asm/kvm.h | 7 ++++
arch/x86/kvm/vmx.c | 83 +++++++++++++++++++++++++++++++++++++++++
arch/x86/kvm/x86.c | 43 ++++++++++++++++++---
include/linux/kvm_host.h | 2 +
include/uapi/linux/kvm.h | 3 ++
virt/kvm/kvm_main.c | 24 ++++++++++++
7 files changed, 162 insertions(+), 5 deletions(-)

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: x86@kernel.org
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>

--
2.7.4

\
 
 \ /
  Last update: 2018-02-16 15:24    [W:0.024 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site