All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: "Jason J. Herne" <jjherne@us.ibm.com>
Cc: aliguori@us.ibm.com, jan.kiszka@siemens.com, mtosatti@redhat.com,
	agraf@suse.de, qemu-devel@nongnu.org, R65777@freescale.com
Subject: Re: [Qemu-devel] [PATCH 2/2 v3] [S390-KVM] Regsync: Utilize selective runtime reg sync for hot code paths
Date: Mon, 22 Apr 2013 11:01:22 +0200	[thread overview]
Message-ID: <5174FC62.3090103@de.ibm.com> (raw)
In-Reply-To: <1363024736-2650-3-git-send-email-jjherne@us.ibm.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 <jjherne@us.ibm.com>
> ---
>  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;
> 

  reply	other threads:[~2013-04-22  9:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-11 17:58 [Qemu-devel] [PATCH 0/2 v3] [S390-KVM] Regsync: Allow selective runtime register synchronization Jason J. Herne
2013-03-11 17:58 ` [Qemu-devel] [PATCH 1/2 " Jason J. Herne
2013-04-22  8:57   ` Christian Borntraeger
2013-03-11 17:58 ` [Qemu-devel] [PATCH 2/2 v3] [S390-KVM] Regsync: Utilize selective runtime reg sync for hot code paths Jason J. Herne
2013-04-22  9:01   ` Christian Borntraeger [this message]
2013-04-08 19:39 ` [Qemu-devel] [PATCH 0/2 v3] [S390-KVM] Regsync: Allow selective runtime register synchronization Jason J. Herne

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=5174FC62.3090103@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=R65777@freescale.com \
    --cc=agraf@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=jan.kiszka@siemens.com \
    --cc=jjherne@us.ibm.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.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.