KVM: x86: Save&restore interrupt shadow mask
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 19 Feb 2010 18:38:07 +0000 (19:38 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Apr 2010 09:38:28 +0000 (12:38 +0300)
commit48005f64d0ea965d454e38b5181af4aba9bdef5b
tree15aa4fe79716e3089893c8e9d48d7e0b898d2693
parent03b82a30ea8b26199901b219848d706dbd70c609
KVM: x86: Save&restore interrupt shadow mask

The interrupt shadow created by STI or MOV-SS-like operations is part of
the VCPU state and must be preserved across migration. Transfer it in
the spare padding field of kvm_vcpu_events.interrupt.

As a side effect we now have to make vmx_set_interrupt_shadow robust
against both shadow types being set. Give MOV SS a higher priority and
skip STI in that case to avoid that VMX throws a fault on next entry.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Documentation/kvm/api.txt
arch/x86/include/asm/kvm.h
arch/x86/include/asm/kvm_emulate.h
arch/x86/kvm/emulate.c
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
include/linux/kvm.h