Kamble, Nitin A wrote:
> Hi Laurent,
> This patch looks much cleaner to me. 
> 
> I see you are saving the regs like this in the patch.
>  memcpy(c->regs, ctxt->vcpu->regs, sizeof c->regs);
> 
> But I don't see any place in the patch these regs getting restored after
> failure.
> 
> Is it taken care of the code outside of the patch?

In fact, during the emulation the function works on c->regs and copy them into
ctxt->vpcu->regs on success (see label "writeback"). The result is in vcpu not
in c->regs.
If the function fails, as we didn't modify ctxt->vcpu->regs, we can re-start
with original values by copying again ctxt->vcpu->regs to c->regs.

Regargs,
Laurent
-- 
------------- [EMAIL PROTECTED]  --------------
          "Software is hard" - Donald Knuth

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to