* Re: [PATCH] KVM: x86 emulator: switch 'pop reg' instruction to emulate_pop()
[not found] <20081127194353.5E440A006D@cleopatra.tlv.redhat.com>
@ 2008-11-28 8:47 ` Guillaume Thouvenin
2008-11-29 18:35 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Guillaume Thouvenin @ 2008-11-28 8:47 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
On Thu, 27 Nov 2008 19:43:53 -0000
Avi Kivity <avi@redhat.com> wrote:
> From: Avi Kivity <avi@redhat.com>
>
> Signed-off-by: Avi Kivity <avi@qumranet.com>
>
> diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
> index 70242f5..702de98 100644
> --- a/arch/x86/kvm/x86_emulate.c
> +++ b/arch/x86/kvm/x86_emulate.c
> @@ -1389,14 +1389,11 @@ special_insn:
> break;
> case 0x58 ... 0x5f: /* pop reg */
> pop_instruction:
> - if ((rc = ops->read_std(register_address(c, ss_base(ctxt),
> - c->regs[VCPU_REGS_RSP]), c->dst.ptr,
> - c->op_bytes, ctxt->vcpu)) != 0)
> + c->src.bytes = c->op_bytes;
> + rc = emulate_pop(ctxt, ops);
> + if (rc != 0)
> goto done;
> -
> - register_address_increment(c, &c->regs[VCPU_REGS_RSP],
> - c->op_bytes);
> - c->dst.type = OP_NONE; /* Disable writeback. */
> + c->dst.val = c->src.val;
> break;
> case 0x63: /* movsxd */
> if (ctxt->mode != X86EMUL_MODE_PROT64)
With this patch kvmctl ./user/test/x86/realmode.flat failed if
emulate_invalid_guest_state is enabled. The error is:
emulation failed (emulation failure) rip 99 66 2d 9a 01
It seems that instruction pointer is wrong.
Regards,
Guillaume
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: x86 emulator: switch 'pop reg' instruction to emulate_pop()
2008-11-28 8:47 ` [PATCH] KVM: x86 emulator: switch 'pop reg' instruction to emulate_pop() Guillaume Thouvenin
@ 2008-11-29 18:35 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-11-29 18:35 UTC (permalink / raw)
To: Guillaume Thouvenin; +Cc: kvm
Guillaume Thouvenin wrote:
> With this patch kvmctl ./user/test/x86/realmode.flat failed if
> emulate_invalid_guest_state is enabled. The error is:
>
> emulation failed (emulation failure) rip 99 66 2d 9a 01
>
> It seems that instruction pointer is wrong.
>
>
Yes, 'call' was using the pop_instruction path. I fixed it up.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-29 18:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20081127194353.5E440A006D@cleopatra.tlv.redhat.com>
2008-11-28 8:47 ` [PATCH] KVM: x86 emulator: switch 'pop reg' instruction to emulate_pop() Guillaume Thouvenin
2008-11-29 18:35 ` Avi Kivity
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.