aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/kvm/x86_emulate.c4
-rw-r--r--drivers/kvm/x86_emulate.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 6e7f774d1751..9f8d59a49313 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -824,8 +824,10 @@ x86_decode_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
824 c->lock_prefix = 1; 824 c->lock_prefix = 1;
825 break; 825 break;
826 case 0xf2: /* REPNE/REPNZ */ 826 case 0xf2: /* REPNE/REPNZ */
827 c->rep_prefix = REPNE_PREFIX;
828 break;
827 case 0xf3: /* REP/REPE/REPZ */ 829 case 0xf3: /* REP/REPE/REPZ */
828 c->rep_prefix = 1; 830 c->rep_prefix = REPE_PREFIX;
829 break; 831 break;
830 default: 832 default:
831 goto done_prefixes; 833 goto done_prefixes;
diff --git a/drivers/kvm/x86_emulate.h b/drivers/kvm/x86_emulate.h
index 4603b2bf3488..644086e354a7 100644
--- a/drivers/kvm/x86_emulate.h
+++ b/drivers/kvm/x86_emulate.h
@@ -162,6 +162,10 @@ struct x86_emulate_ctxt {
162 struct decode_cache decode; 162 struct decode_cache decode;
163}; 163};
164 164
165/* Repeat String Operation Prefix */
166#define REPE_PREFIX 1
167#define REPNE_PREFIX 2
168
165/* Execution mode, passed to the emulator. */ 169/* Execution mode, passed to the emulator. */
166#define X86EMUL_MODE_REAL 0 /* Real mode. */ 170#define X86EMUL_MODE_REAL 0 /* Real mode. */
167#define X86EMUL_MODE_PROT16 2 /* 16-bit protected mode. */ 171#define X86EMUL_MODE_PROT16 2 /* 16-bit protected mode. */