summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/kvm_emulate.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-04-01 18:18:53 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-06-04 16:01:05 +0200
commita584539b24b87dc8be83a713006396cabec47833 (patch)
tree6db65111b097aa218400c01451f963327646150a /arch/x86/include/asm/kvm_emulate.h
parent609e36d372ad9329269e4a1467bd35311893d1d6 (diff)
KVM: x86: pass the whole hflags field to emulator and back
The hflags field will contain information about system management mode and will be useful for the emulator. Pass the entire field rather than just the guest-mode information. Reviewed-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_emulate.h')
-rw-r--r--arch/x86/include/asm/kvm_emulate.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
index 57a9d94fe160..7410879a41f7 100644
--- a/arch/x86/include/asm/kvm_emulate.h
+++ b/arch/x86/include/asm/kvm_emulate.h
@@ -262,6 +262,9 @@ enum x86emul_mode {
X86EMUL_MODE_PROT64, /* 64-bit (long) mode. */
};
+/* These match some of the HF_* flags defined in kvm_host.h */
+#define X86EMUL_GUEST_MASK (1 << 5) /* VCPU is in guest-mode */
+
struct x86_emulate_ctxt {
const struct x86_emulate_ops *ops;
@@ -273,8 +276,8 @@ struct x86_emulate_ctxt {
/* interruptibility state, as a result of execution of STI or MOV SS */
int interruptibility;
+ int emul_flags;
- bool guest_mode; /* guest running a nested guest */
bool perm_ok; /* do not check permissions if true */
bool ud; /* inject an #UD if host doesn't support insn */