aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/x86_emulate.h
diff options
context:
space:
mode:
authorGuillaume Thouvenin <guillaume.thouvenin@ext.bull.net>2007-11-22 05:32:09 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:53:14 -0500
commit90e0a28f6b7241c7793f2ebd540c349580170446 (patch)
treee0e92ea3bd13298ac99529e54d1be98d306eb8f0 /drivers/kvm/x86_emulate.h
parente9f85cde99fa011db256f6683ba81d155e0d3f57 (diff)
KVM: x86 emulator: Make a distinction between repeat prefixes F3 and F2
cmps and scas instructions accept repeat prefixes F3 and F2. So in order to emulate those prefixed instructions we need to be able to know if prefixes are REP/REPE/REPZ or REPNE/REPNZ. Currently kvm doesn't make this distinction. This patch introduces this distinction. Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86_emulate.h')
-rw-r--r--drivers/kvm/x86_emulate.h4
1 files changed, 4 insertions, 0 deletions
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. */