From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUCcr-0001kJ-7f for qemu-devel@nongnu.org; Mon, 22 Apr 2013 05:01:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUCcq-0001KQ-4U for qemu-devel@nongnu.org; Mon, 22 Apr 2013 05:01:29 -0400 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:52595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUCcp-0001Jw-RR for qemu-devel@nongnu.org; Mon, 22 Apr 2013 05:01:28 -0400 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 22 Apr 2013 09:57:49 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 9DCAB219006B for ; Mon, 22 Apr 2013 10:03:45 +0100 (BST) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r3M91DBs53280820 for ; Mon, 22 Apr 2013 09:01:13 GMT Received: from d06av08.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r3M91N8S001971 for ; Mon, 22 Apr 2013 03:01:23 -0600 Message-ID: <5174FC62.3090103@de.ibm.com> Date: Mon, 22 Apr 2013 11:01:22 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1363024736-2650-1-git-send-email-jjherne@us.ibm.com> <1363024736-2650-3-git-send-email-jjherne@us.ibm.com> In-Reply-To: <1363024736-2650-3-git-send-email-jjherne@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2 v3] [S390-KVM] Regsync: Utilize selective runtime reg sync for hot code paths List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Jason J. Herne" Cc: aliguori@us.ibm.com, jan.kiszka@siemens.com, mtosatti@redhat.com, agraf@suse.de, qemu-devel@nongnu.org, R65777@freescale.com On 11/03/13 18:58, Jason J. Herne wrote: > Make use of new kvm_s390_get_registers_partial() for kvm_handle_css_inst() and > handle_hypercall() since they only need registers from the partial set and they > are called quite frequently. > > Signed-off-by: Jason J. Herne > --- > target-s390x/kvm.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c > index 934757e..36861aa 100644 > --- a/target-s390x/kvm.c > +++ b/target-s390x/kvm.c > @@ -468,12 +468,16 @@ static int kvm_handle_css_inst(S390CPU *cpu, struct kvm_run *run, > int r = 0; > int no_cc = 0; > CPUS390XState *env = &cpu->env; > + CPUState *cs = ENV_GET_CPU(env); > > if (ipa0 != 0xb2) { > /* Not handled for now. */ > return -1; > } > - cpu_synchronize_state(env); > + > + kvm_s390_get_registers_partial(cs); > + cs->kvm_vcpu_dirty = true; > + > switch (ipa1) { > case PRIV_XSCH: > r = ioinst_handle_xsch(env, env->regs[1]); Looks good, but can you also do the same for TSCH? This is also related to the main I/O path. > @@ -604,7 +608,10 @@ static int handle_priv(S390CPU *cpu, struct kvm_run *run, > > static int handle_hypercall(CPUS390XState *env, struct kvm_run *run) > { > - cpu_synchronize_state(env); > + CPUState *cs = ENV_GET_CPU(env); > + > + kvm_s390_get_registers_partial(cs); > + cs->kvm_vcpu_dirty = true; > env->regs[2] = s390_virtio_hypercall(env); > > return 0; >