All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Sergey Fedorov <sergey.fedorov@linaro.org>, qemu-devel@nongnu.org
Cc: "MTTCG Devel" <mttcg@listserver.greensocs.com>,
	"KONRAD Frédéric" <fred.konrad@greensocs.com>,
	"Alvise Rigo" <a.rigo@virtualopensystems.com>,
	"Emilio G. Cota" <cota@braap.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <rth@twiddle.net>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Alexander Graf" <agraf@suse.de>,
	"Marcelo Tosatti" <mtosatti@redhat.com>,
	"Cornelia Huck" <cornelia.huck@de.ibm.com>,
	qemu-ppc@nongnu.org, kvm@vger.kernel.org
Subject: Re: [RFC v2 02/11] cpus: pass CPUState to run_on_cpu helpers
Date: Mon, 11 Jul 2016 14:36:34 +0200	[thread overview]
Message-ID: <578392D2.6050704@de.ibm.com> (raw)
In-Reply-To: <1467839703-11733-3-git-send-email-sergey.fedorov@linaro.org>

On 07/06/2016 11:14 PM, Sergey Fedorov wrote:
> From: Alex Bennée <alex.bennee@linaro.org>
> 
> CPUState is a fairly common pointer to pass to these helpers. This means
> if you need other arguments for the async_run_on_cpu case you end up
> having to do a g_malloc to stuff additional data into the routine. For
> the current users this isn't a massive deal but for MTTCG this gets
> cumbersome when the only other parameter is often an address.
> 
> This adds the typedef run_on_cpu_func for helper functions which has an
> explicit CPUState * passed as the first parameter. All the users of
> run_on_cpu and async_run_on_cpu have had their helpers updated to use
> CPUState where available.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> [Sergey Fedorov:
>  - eliminate more CPUState in user data;
>  - remove unnecessary user data passing;
>  - fix target-s390x/kvm.c and target-s390x/misc_helper.c]
> Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org>
> ---
> 
> Changes in v2:
>  - eliminate more CPUState in user data
>  - remove unnecessary user data passing
>  - fix target-s390x/kvm.c and target-s390x/misc_helper.c
> 
> ---
>  cpus.c                     | 15 ++++---
>  hw/i386/kvm/apic.c         |  3 +-
>  hw/i386/kvmvapic.c         |  6 +--
>  hw/ppc/ppce500_spin.c      | 31 +++++----------
>  hw/ppc/spapr.c             |  6 +--
>  hw/ppc/spapr_hcall.c       | 17 ++++----
>  include/qom/cpu.h          |  8 ++--
>  kvm-all.c                  | 21 ++++------
>  target-i386/helper.c       | 19 ++++-----
>  target-i386/kvm.c          |  6 +--
>  target-s390x/cpu.c         |  4 +-
>  target-s390x/cpu.h         |  7 +---
>  target-s390x/kvm.c         | 98 +++++++++++++++++++++++-----------------------
>  target-s390x/misc_helper.c |  4 +-
>  14 files changed, 108 insertions(+), 137 deletions(-)

s390 parts look ok.



WARNING: multiple messages have this Message-ID (diff)
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Sergey Fedorov <sergey.fedorov@linaro.org>, qemu-devel@nongnu.org
Cc: "MTTCG Devel" <mttcg@listserver.greensocs.com>,
	"KONRAD Frédéric" <fred.konrad@greensocs.com>,
	"Alvise Rigo" <a.rigo@virtualopensystems.com>,
	"Emilio G. Cota" <cota@braap.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <rth@twiddle.net>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Alexander Graf" <agraf@suse.de>,
	"Marcelo Tosatti" <mtosatti@redhat.com>,
	"Cornelia Huck" <cornelia.huck@de.ibm.com>,
	qemu-ppc@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [RFC v2 02/11] cpus: pass CPUState to run_on_cpu helpers
Date: Mon, 11 Jul 2016 14:36:34 +0200	[thread overview]
Message-ID: <578392D2.6050704@de.ibm.com> (raw)
In-Reply-To: <1467839703-11733-3-git-send-email-sergey.fedorov@linaro.org>

On 07/06/2016 11:14 PM, Sergey Fedorov wrote:
> From: Alex Bennée <alex.bennee@linaro.org>
> 
> CPUState is a fairly common pointer to pass to these helpers. This means
> if you need other arguments for the async_run_on_cpu case you end up
> having to do a g_malloc to stuff additional data into the routine. For
> the current users this isn't a massive deal but for MTTCG this gets
> cumbersome when the only other parameter is often an address.
> 
> This adds the typedef run_on_cpu_func for helper functions which has an
> explicit CPUState * passed as the first parameter. All the users of
> run_on_cpu and async_run_on_cpu have had their helpers updated to use
> CPUState where available.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> [Sergey Fedorov:
>  - eliminate more CPUState in user data;
>  - remove unnecessary user data passing;
>  - fix target-s390x/kvm.c and target-s390x/misc_helper.c]
> Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org>
> ---
> 
> Changes in v2:
>  - eliminate more CPUState in user data
>  - remove unnecessary user data passing
>  - fix target-s390x/kvm.c and target-s390x/misc_helper.c
> 
> ---
>  cpus.c                     | 15 ++++---
>  hw/i386/kvm/apic.c         |  3 +-
>  hw/i386/kvmvapic.c         |  6 +--
>  hw/ppc/ppce500_spin.c      | 31 +++++----------
>  hw/ppc/spapr.c             |  6 +--
>  hw/ppc/spapr_hcall.c       | 17 ++++----
>  include/qom/cpu.h          |  8 ++--
>  kvm-all.c                  | 21 ++++------
>  target-i386/helper.c       | 19 ++++-----
>  target-i386/kvm.c          |  6 +--
>  target-s390x/cpu.c         |  4 +-
>  target-s390x/cpu.h         |  7 +---
>  target-s390x/kvm.c         | 98 +++++++++++++++++++++++-----------------------
>  target-s390x/misc_helper.c |  4 +-
>  14 files changed, 108 insertions(+), 137 deletions(-)

s390 parts look ok.

  parent reply	other threads:[~2016-07-11 12:37 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 21:14 [Qemu-devel] [RFC v2 00/11] cpu-exec: Safe work in quiescent state Sergey Fedorov
2016-07-06 21:14 ` [Qemu-devel] [RFC v2 01/11] atomic: introduce atomic_dec_fetch Sergey Fedorov
2016-07-06 21:14 ` [RFC v2 02/11] cpus: pass CPUState to run_on_cpu helpers Sergey Fedorov
2016-07-06 21:14   ` [Qemu-devel] " Sergey Fedorov
2016-07-07  0:30   ` David Gibson
2016-07-07  0:30     ` [Qemu-devel] " David Gibson
2016-07-11 12:36   ` Christian Borntraeger [this message]
2016-07-11 12:36     ` Christian Borntraeger
2016-07-11 12:38     ` Sergey Fedorov
2016-07-11 12:38       ` [Qemu-devel] " Sergey Fedorov
2016-07-11 12:55       ` Christian Borntraeger
2016-07-11 12:55         ` [Qemu-devel] " Christian Borntraeger
2016-07-06 21:14 ` [Qemu-devel] [RFC v2 03/11] cpus: Move common code out of {async_, }run_on_cpu() Sergey Fedorov
2016-07-06 21:14 ` [Qemu-devel] [RFC v2 04/11] cpus: Wrap mutex used to protect CPU work Sergey Fedorov
2016-07-11 12:06   ` Alex Bennée
2016-07-06 21:14 ` [Qemu-devel] [RFC v2 05/11] cpus: Rename flush_queued_work() Sergey Fedorov
2016-07-11 12:07   ` Alex Bennée
2016-07-06 21:14 ` [Qemu-devel] [RFC v2 06/11] linux-user: Use QemuMutex and QemuCond Sergey Fedorov
2016-07-11 12:08   ` Alex Bennée
2016-07-06 21:14 ` [Qemu-devel] [RFC v2 07/11] linux-user: Rework exclusive operation mechanism Sergey Fedorov
2016-07-14 15:04   ` Alex Bennée
2016-07-06 21:15 ` [Qemu-devel] [RFC v2 08/11] linux-user: Add qemu_cpu_is_self() and qemu_cpu_kick() Sergey Fedorov
2016-07-14 15:07   ` Alex Bennée
2016-07-06 21:15 ` [Qemu-devel] [RFC v2 09/11] linux-user: Support CPU work queue Sergey Fedorov
2016-07-14 15:10   ` Alex Bennée
2016-07-06 21:15 ` [Qemu-devel] [RFC v2 10/11] cpu-exec-common: Introduce async_safe_run_on_cpu() Sergey Fedorov
2016-07-14 15:57   ` Alex Bennée
2016-07-06 21:15 ` [Qemu-devel] [RFC v2 11/11] tcg: Make tb_flush() thread safe Sergey Fedorov
2016-07-07 20:11   ` Sergey Fedorov
2016-07-14  8:41   ` Alex Bennée
2016-07-14  8:54     ` Sergey Fedorov
2016-07-14  9:49       ` Alex Bennée
2016-07-14 16:00 ` [Qemu-devel] [RFC v2 00/11] cpu-exec: Safe work in quiescent state Alex Bennée

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=578392D2.6050704@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=a.rigo@virtualopensystems.com \
    --cc=agraf@suse.de \
    --cc=alex.bennee@linaro.org \
    --cc=cornelia.huck@de.ibm.com \
    --cc=cota@braap.org \
    --cc=crosthwaite.peter@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=ehabkost@redhat.com \
    --cc=fred.konrad@greensocs.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=mttcg@listserver.greensocs.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sergey.fedorov@linaro.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.