All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
To: Jun Koi <junkoi2004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: cache_regs & decache_regs?
Date: Tue, 12 Jun 2007 18:18:44 -0500	[thread overview]
Message-ID: <466F29D4.6020903@codemonkey.ws> (raw)
In-Reply-To: <fdaac4d50706102222i5d145682m795fdb8cc2ca9c4e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Jun Koi wrote:
> Hi,
>
> In kvm_setup_pio() we have code like this:
>
> 	kvm_arch_ops->cache_regs(vcpu);
> 	memcpy(vcpu->pio_data, &vcpu->regs[VCPU_REGS_RAX], 4);
> 	kvm_arch_ops->decache_regs(vcpu);
>
> So what is the reason of saving RSP and RIP before the memcpy()
> function, then recovering it right after that?
>
> AFAICS, there nothing is change by the memcpy() function, so I cannot
> figure it out why it is necessary to do that.
>   

In SVM, cache_regs() actually syncs RAX.

Regards,

Anthony Liguori

> Many thanks,
> Jun
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> kvm-devel mailing list
> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

  parent reply	other threads:[~2007-06-12 23:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-11  5:22 cache_regs & decache_regs? Jun Koi
     [not found] ` <fdaac4d50706102222i5d145682m795fdb8cc2ca9c4e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-12 23:18   ` Anthony Liguori [this message]
     [not found]     ` <466F29D4.6020903-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-06-13  3:12       ` Jun Koi

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=466F29D4.6020903@codemonkey.ws \
    --to=anthony-rdkfgonbjusknkdkm+me6a@public.gmane.org \
    --cc=junkoi2004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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.