diff options
author | Mohammed Gamal <m.gamal005@gmail.com> | 2010-08-08 22:11:38 +0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 12:51:04 +0400 |
commit | 8c5eee30a942cb3154f14f12407755ed7da74bbc (patch) | |
tree | 3926ca1ef05fd2293fd3412802915b7b9cf4da55 /arch/x86/kvm/emulate.c | |
parent | 3f9f53b0d599aabb03db35208fb31768568ca83f (diff) | |
download | linux-8c5eee30a942cb3154f14f12407755ed7da74bbc.tar.xz |
KVM: x86 emulator: Fix emulate_grp3 return values
This patch lets emulate_grp3() return X86EMUL_* return codes instead
of hardcoded ones.
Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index f0415eab6591..8617c344405d 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -1424,9 +1424,9 @@ static inline int emulate_grp3(struct x86_emulate_ctxt *ctxt, emulate_1op_rax_rdx("idiv", c->src, *rax, *rdx, ctxt->eflags); break; default: - return 0; + return X86EMUL_UNHANDLEABLE; } - return 1; + return X86EMUL_CONTINUE; } static inline int emulate_grp45(struct x86_emulate_ctxt *ctxt, @@ -3172,7 +3172,7 @@ special_insn: ctxt->eflags ^= EFLG_CF; break; case 0xf6 ... 0xf7: /* Grp3 */ - if (!emulate_grp3(ctxt, ops)) + if (emulate_grp3(ctxt, ops) != X86EMUL_CONTINUE) goto cannot_emulate; break; case 0xf8: /* clc */ |