All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Riku Voipio <riku.voipio@iki.fi>,
	qemu-devel@nongnu.org, Blue Swirl <blauwirbel@gmail.com>,
	Max Filippov <jcmvbkbc@gmail.com>,
	Michael Walle <michael@walle.cc>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-ppc <qemu-ppc@nongnu.org>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Igor Mammedov <imammedo@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH next v2 00/74] QOM CPUState, part 3: CPU reset
Date: Mon, 21 May 2012 15:52:09 +0200	[thread overview]
Message-ID: <4FBA4889.9080804@suse.de> (raw)
In-Reply-To: <1336608729-30289-1-git-send-email-afaerber@suse.de>

On 05/10/2012 02:10 AM, Andreas Färber wrote:
> Hello,
>
> Based on my CPUState patches for 1.1 (qom-cpu-1.1) this series kills off the
> cpu_state_reset() function, which had been renamed as an interim solution
> to free the identifier "cpu_reset" for QOM.
>
> The interested observer may note that the earlier sh4 SH7750 patches (that
> have been deferred due to time constraints for 1.1) were a test run and
> serve as template for propagating xxxCPU throughout the code base:
>
> (i) In target-specific code, accessing CPUxxxState* is a cheap pointer
> dereference from xxxCPU (&cpu->env), so xxxCPU should be preferred for any
> static helper functions and QOM/qdev state structs because fields in CPUState
> and in xxxCPU will increase over time. In state structs this also paves
> the way for QOM child<>  or link<>  properties.
>
> (ii) In TCG helpers, the target's xxxCPU can be obtained via xxx_env_get_cpu().
> Be aware that this incurs one QOM cast.
>
> (iii) In generic code, the base CPU can be obtained via ENV_GET_CPU() macro.
> Note that this incurs two QOM casts, so local variables should be preferred
> over repeated macro usage within a function.
>
> (iv) In generic functions, only after all usages of env have been eliminated
> can the argument be changed from CPUArchState to CPUState.
>
> (v) Opaque xxxCPU* values are assigned directly to xxxCPU*, to save QOM casts;
> to CPUState* via CPU() cast, in case the casting mechanism ever gets changed.
>
> Historically, this series has been cherry-picked from a larger CPUState
> refactoring (guess why) and reordered to group subsystems and to enforce
> get, pass, use order.
> I had checked v1 to compile on ...
> * openSUSE 12.1 x86_64 w/KVM,
> * openSUSE Factory ppc w/KVM (with the AREG0 #error suppressed),
> * mingw32/64 cross-builds,
> * OpenBSD 5.1 amd64.
> Thus I'm confident that I got order, return types and local variables right;
> changes to opaque values however (keyword "pass") should be reviewed carefully.
> v2 fixes the changed cpu_init macros to return NULL if CPU init failed.
>
> Again, target maintainers are requested to start queuing their patches on their
> -next branches, where available, to avoid collisions.
> I've been careful to verbosely document which change is for what; the targets
> are not interdependent except for the final patch, neither is linux-user.
> PReP patches depend on target-ppc, so should go through the ppc tree please.
> Only target-mips actually depends on a 1.1 patch (the comment drop).
>
> Some logical next steps that were not strictly necessary for cpu_reset() have
> been deferred to part 4, including s390x and some more pxa2xx refactorings.
>
> Available for testing and cherry-picking (not pulling!) from:
> git://github.com/afaerber/qemu-cpu.git qom-cpu-reset.v2
> https://github.com/afaerber/qemu-cpu/commits/qom-cpu-reset.v2
>
> Regards,
> Andreas
>
> Cc: Anthony Liguori<anthony@codemonkey.ws>
> Cc: Paolo Bonzini<pbonzini@redhat.com>
> Cc: Igor Mammedov<imammedo@redhat.com>
>
> Cc: Peter Maydell<peter.maydell@linaro.org>
> Cc: Alexander Graf<agraf@suse.de>
> Cc: qemu-ppc<qemu-ppc@nongnu.org>
> Cc: Blue Swirl<blauwirbel@gmail.com>
> Cc: Edgar E. Iglesias<edgar.iglesias@gmail.com>
> Cc: Max Filippov<jcmvbkbc@gmail.com>
> Cc: Michael Walle<michael@walle.cc>
> Cc: Aurelien Jarno<aurelien@aurel32.net>
> Cc: Richard Henderson<rth@twiddle.net>
> Cc: Riku Voipio<riku.voipio@iki.fi>

Very simple, nice and clean ;)

PowerPC parts are:

   Acked-by: Alexander Graf <agraf@suse.de>


Alex

  parent reply	other threads:[~2012-05-21 13:52 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10  0:10 [Qemu-devel] [PATCH next v2 00/74] QOM CPUState, part 3: CPU reset Andreas Färber
2012-05-10  0:10 ` [Qemu-devel] [PATCH next v2 01/74] target-arm: Use cpu_reset() in cpu_arm_init() Andreas Färber
2012-05-10  0:10 ` [Qemu-devel] [PATCH next v2 02/74] target-mips: Use cpu_reset() in cpu_mips_init() Andreas Färber
2012-05-10  0:10 ` [PATCH next v2 03/74] target-i386: Pass X86CPU to do_cpu_{init,sipi}() Andreas Färber
2012-05-10  0:10   ` [Qemu-devel] [PATCH next v2 03/74] target-i386: Pass X86CPU to do_cpu_{init, sipi}() Andreas Färber
2012-05-10  0:10 ` [Qemu-devel] [PATCH next v2 04/74] target-i386: Let cpu_x86_init() return X86CPU Andreas Färber
2012-05-10  9:44 ` [Qemu-devel] [PATCH next v2 00/74] QOM CPUState, part 3: CPU reset Andreas Färber
2012-05-10 20:35 ` Peter Maydell
2012-05-10 21:05   ` Andreas Färber
2012-05-10 21:26     ` Peter Maydell
2012-05-10 21:44       ` Andreas Färber
2012-05-14 20:25 ` Max Filippov
2012-05-14 21:49   ` Andreas Färber
2012-05-15 11:24   ` Edgar E. Iglesias
2012-05-15 15:11     ` Andreas Färber
2012-05-15 13:19   ` Edgar E. Iglesias
2012-05-15 15:47     ` Andreas Färber
2012-05-21 13:52 ` Alexander Graf [this message]
2012-05-21 22:39   ` Andreas Färber
  -- strict thread matches above, loose matches on Subject: below --
2012-05-10  0:13 Andreas Färber
2012-05-14 16:13 ` Andreas Färber
2012-05-14 16:15 ` Andreas Färber
2012-05-14 19:54   ` Blue Swirl
2012-05-14 20:59     ` Andreas Färber
2012-05-14 21:22       ` Blue Swirl
2012-05-21  9:09         ` Andreas Färber
2012-05-21 18:20           ` Blue Swirl
2012-05-22  0:34             ` Andreas Färber
2012-05-22  8:03               ` Fabien Chouteau
2012-05-23 18:48               ` Blue Swirl
2012-05-15 15:16 ` Igor Mammedov
2012-05-16  9:14   ` Andreas Färber
2012-05-16 22:04 ` Andreas Färber
2012-05-21 13:59 ` Andreas Färber

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=4FBA4889.9080804@suse.de \
    --to=agraf@suse.de \
    --cc=afaerber@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=imammedo@redhat.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=michael@walle.cc \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=rth@twiddle.net \
    /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.