From: "Jan Beulich" Subject: Re: [PATCH 4/4] SVM: streamline entry.S code Date: Wed, 04 Sep 2013 15:50:40 +0100 Message-ID: <522764E002000078000F06C7@nat28.tlf.novell.com> References: <521786A002000078000EE064@nat28.tlf.novell.com> <521787FA02000078000EE083@nat28.tlf.novell.com> <52274612.4040506@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VHEPj-00012S-Pz for xen-devel@lists.xenproject.org; Wed, 04 Sep 2013 14:50:36 +0000 In-Reply-To: <52274612.4040506@oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: xen-devel , Keir Fraser , Jacob Shin , suravee.suthikulpanit@amd.com List-Id: xen-devel@lists.xenproject.org >>> On 04.09.13 at 16:39, Boris Ostrovsky wrote: > On 08/23/2013 10:04 AM, Jan Beulich wrote: >> @@ -92,25 +97,26 @@ UNLIKELY_END(svm_trace) >> >> VMRUN >> >> + GET_CURRENT(%rax) >> push %rdi >> push %rsi >> push %rdx >> push %rcx >> + mov VCPU_svm_vmcb(%rax),%rcx >> push %rax >> push %r8 >> push %r9 >> push %r10 >> push %r11 >> push %rbx >> + mov %rax,%rbx > > Can you continue with using %rax as 'current' pointer below and not save it > to %rbx? %rax appears to be a temp register so perhaps you can use, say, > %rdi, for that purpose. I'm sorry, but I don't understand what you're asking for. We actually _want_ "current" to be in a register thats callee-saved, such that we don't need to reload it after function calls. One goal of the patch in fact is to eliminate such redundant reloads. But as I'm not sure what you want, this explanation may be entirely off. And as a side note: At this point I'm not really expecting requests for further changes, unless you spot a mistake in the patch. It was around for review for long enough, and as said it had two reviews already. And further optimization should go in a separate, incremental patch. Jan