On Thu, 27 Nov 2008 19:43:53 -0000
Avi Kivity <[EMAIL PROTECTED]> wrote:

> From: Avi Kivity <[EMAIL PROTECTED]>
> 
> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
> 
> 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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to