diff options
author | Laurent Vivier <Laurent.Vivier@bull.net> | 2007-09-20 05:17:24 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-22 06:03:28 -0400 |
commit | ae6200baea4175cac684ea76f78082b31afbdefa (patch) | |
tree | a6b8a9d17179b85018d4fb4250373cd3ba28e597 /drivers/kvm/x86_emulate.c | |
parent | 1a52e051368a0e29b26e8790bacd8d1d759e3287 (diff) |
KVM: x86 emulator: fix repne/repnz decoding
The repnz/repne instructions must set rep_prefix to 1 like rep/repe/repz.
This patch correct the disk probe problem met with OpenBSD.
This issue appears with commit e70669abd4e60dfea3ac1639848e20e2b8dd1255
because before it, the decoding was done internally to kvm and after it
is done by x86_emulate.c (which doesn't do it correctly).
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86_emulate.c')
-rw-r--r-- | drivers/kvm/x86_emulate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index b1026d2c8aec..80b1758e2d33 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c | |||
@@ -596,11 +596,10 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) | |||
596 | case 0xf0: /* LOCK */ | 596 | case 0xf0: /* LOCK */ |
597 | lock_prefix = 1; | 597 | lock_prefix = 1; |
598 | break; | 598 | break; |
599 | case 0xf2: /* REPNE/REPNZ */ | ||
599 | case 0xf3: /* REP/REPE/REPZ */ | 600 | case 0xf3: /* REP/REPE/REPZ */ |
600 | rep_prefix = 1; | 601 | rep_prefix = 1; |
601 | break; | 602 | break; |
602 | case 0xf2: /* REPNE/REPNZ */ | ||
603 | break; | ||
604 | default: | 603 | default: |
605 | goto done_prefixes; | 604 | goto done_prefixes; |
606 | } | 605 | } |