This patch corrects a mistake introduced by commit 5d9b36eec8ca6abe03da91efdfc7b5861525bd43 and reported by Nitin A Kamble.
The pop instruction restores ECX and EIP if read_std() fails and if we have a REP prefix, but at this level ECX and EIP are not saved (and not modified). We don't have to restore it. Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index 585cccf..1ad500c 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c @@ -1379,13 +1379,8 @@ special_insn: pop_instruction: if ((rc = ops->read_std(register_address(ctxt->ss_base, c->regs[VCPU_REGS_RSP]), c->dst.ptr, - c->op_bytes, ctxt->vcpu)) != 0) { - if (c->rep_prefix) { - c->regs[VCPU_REGS_RCX] = saved_rcx; - c->eip = saved_eip; - } + c->op_bytes, ctxt->vcpu)) != 0) goto done; - } register_address_increment(c->regs[VCPU_REGS_RSP], c->op_bytes); -- 1.5.2.4 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel