KVM: Deal with interrupt shadow state for emulated instructions
[firefly-linux-kernel-4.4.55.git] / arch / x86 / include / asm / kvm_x86_emulate.h
index 6a159732881a6b4067fd552fd4576cce797a5926..b7ed2c423116be32942ef23b63e5dc4f09492d9d 100644 (file)
@@ -143,6 +143,9 @@ struct decode_cache {
        struct fetch_cache fetch;
 };
 
+#define X86_SHADOW_INT_MOV_SS  1
+#define X86_SHADOW_INT_STI     2
+
 struct x86_emulate_ctxt {
        /* Register state before/after emulation. */
        struct kvm_vcpu *vcpu;
@@ -152,6 +155,9 @@ struct x86_emulate_ctxt {
        int mode;
        u32 cs_base;
 
+       /* interruptibility state, as a result of execution of STI or MOV SS */
+       int interruptibility;
+
        /* decode cache */
        struct decode_cache decode;
 };