On Mon, Oct 19, 2009 at 06:32:54PM -0200, Marcelo Tosatti wrote: > On Thu, Oct 15, 2009 at 07:05:36PM +0200, Jan Kiszka wrote: > > This plugs an NMI-related hole in the VCPU synchronization between > > kernel and user space. So far, neither pending NMIs nor the inhibit NMI > > mask was properly read/set which was able to cause problems on > > vmsave/restore, live migration and system reset. Fix it by making use > > of the new VCPU substate interface. > > > > Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> > > --- > > > > Documentation/kvm/api.txt | 12 ++++++++++++ > > arch/x86/include/asm/kvm.h | 7 +++++++ > > arch/x86/include/asm/kvm_host.h | 2 ++ > > arch/x86/kvm/svm.c | 22 ++++++++++++++++++++++ > > arch/x86/kvm/vmx.c | 30 ++++++++++++++++++++++++++++++ > > arch/x86/kvm/x86.c | 26 ++++++++++++++++++++++++++ > > 6 files changed, 99 insertions(+), 0 deletions(-) > > > > diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt > > index bee5bbd..e483edb 100644 > > --- a/Documentation/kvm/api.txt > > +++ b/Documentation/kvm/api.txt > > @@ -848,3 +848,15 @@ Deprecates: KVM_GET/SET_CPUID2 > > Architectures: x86 > > Payload: struct kvm_lapic > > Deprecates: KVM_GET/SET_LAPIC > > + > > +6.8 KVM_X86_VCPU_STATE_NMI > > + > > +Architectures: x86 > > +Payload: struct kvm_nmi_state > > +Deprecates: - > > + > > +struct kvm_nmi_state { > > + __u8 pending; > > + __u8 masked; > > + __u8 pad1[6]; > > Don't you also have to save "nmi_injected", in case of failure during > NMI delivery. > > BTW, what happens to exceptions that fail to be delivered? Can't see > where they are saved/restored across migration. > The instruction that caused an exception will be re-executed after migration and exception will be regenerated. But I think we should migrate exception anyway for completeness. -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html