From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: cache_regs & decache_regs? Date: Tue, 12 Jun 2007 18:18:44 -0500 Message-ID: <466F29D4.6020903@codemonkey.ws> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Jun Koi Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.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/