Re: [PATCH] KVM: x86: Save&restore interrupt shadow mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/14/2010 06:49 PM, Jan Kiszka wrote:
From: Jan Kiszka<jan.kiszka@xxxxxxxxxxx>

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.


diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
index f46b79f..4dd01e2 100644
--- a/arch/x86/include/asm/kvm.h
+++ b/arch/x86/include/asm/kvm.h
@@ -258,6 +258,9 @@ struct kvm_reinject_control {
  #define KVM_VCPUEVENT_VALID_NMI_PENDING	0x00000001
  #define KVM_VCPUEVENT_VALID_SIPI_VECTOR	0x00000002

+#define X86_SHADOW_INT_MOV_SS  1
+#define X86_SHADOW_INT_STI     2
+

svm doesn't make a difference. Is it worth exposing this to userspace (and thus providing wrong information on svm)?

(in any case, needs a KVM_ prefix).

Needs a KVM_CAP_ and flags bit.

--
error compiling committee.c: too many arguments to function

--
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

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux