All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <Laurent.Vivier-6ktuUTfB/bM@public.gmane.org>
To: "Kamble,
	Nitin A" <nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH] Correct management of REP prefix
Date: Wed, 03 Oct 2007 09:23:54 +0200	[thread overview]
Message-ID: <4703438A.6010307@bull.net> (raw)
In-Reply-To: <5461330FA59EDB46BE9AB8AAF2C431AD055A4295-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 815 bytes --]

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
-- 
------------- Laurent.Vivier-6ktuUTfB/bM@public.gmane.org  --------------
          "Software is hard" - Donald Knuth


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
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/

[-- Attachment #3: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

  parent reply	other threads:[~2007-10-03  7:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-27 21:34 [PATCH] Correct management of REP prefix Laurent Vivier
     [not found] ` <1190928863669-git-send-email-Laurent.Vivier-6ktuUTfB/bM@public.gmane.org>
2007-09-30  9:06   ` Avi Kivity
     [not found]     ` <46FF6702.2060203-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-01  8:55       ` Laurent Vivier
     [not found]         ` <4700B611.1000803-6ktuUTfB/bM@public.gmane.org>
2007-10-02  6:14           ` Avi Kivity
2007-10-01  9:01   ` Laurent Vivier
     [not found]     ` <11912292661049-git-send-email-Laurent.Vivier-6ktuUTfB/bM@public.gmane.org>
2007-10-02  6:11       ` Avi Kivity
2007-10-02 22:23       ` Kamble, Nitin A
     [not found]         ` <5461330FA59EDB46BE9AB8AAF2C431AD055A4295-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-10-03  7:23           ` Laurent Vivier [this message]
     [not found]             ` <4703438A.6010307-6ktuUTfB/bM@public.gmane.org>
2007-10-03 17:10               ` Kamble, Nitin A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4703438A.6010307@bull.net \
    --to=laurent.vivier-6ktuutfb/bm@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.