Re: [RFC PATCH 2/2] KVM: x86 emulator: Cleanup emulate_push() writebacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Takuya Yoshikawa <takuya.yoshikawa@xxxxxxxxx> wrote:
> @@ -1265,22 +1263,19 @@ int emulate_int_real(struct x86_emulate_ctxt *ctxt,
>  
>  	/* TODO: Add limit checks */
>  	c->src.val = ctxt->eflags;
> -	emulate_push(ctxt, ops);
> -	rc = writeback(ctxt, ops);
> +	rc = emulate_push(ctxt, ops);
>  	if (rc != X86EMUL_CONTINUE)
>  		return rc;
>  
>  	ctxt->eflags &= ~(EFLG_IF | EFLG_TF | EFLG_AC);
>  
>  	c->src.val = ops->get_segment_selector(VCPU_SREG_CS, ctxt->vcpu);
> -	emulate_push(ctxt, ops);
> -	rc = writeback(ctxt, ops);
> +	rc = emulate_push(ctxt, ops);
>  	if (rc != X86EMUL_CONTINUE)
>  		return rc;
>  
>  	c->src.val = c->eip;
> -	emulate_push(ctxt, ops);
> -	rc = writeback(ctxt, ops);
> +	rc = emulate_push(ctxt, ops);
>  	if (rc != X86EMUL_CONTINUE)
>  		return rc;

I could also delete "c->dst.type = OP_NONE;" line here.

...

>  
>  static int em_push(struct x86_emulate_ctxt *ctxt)
>  {
> -	emulate_push(ctxt, ctxt->ops);
> -	return X86EMUL_CONTINUE;
> +	return emulate_push(ctxt, ctxt->ops);
>  }

em_push() can be used instead of emulate_push() if we rearrange
the place to put em_push().


There seems to be some conflicting patches around.  So If I get
some other comments, I'll rebase and resend later!

Takuya
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux