On Wed, 30 Jan 2013 23:48:23 +0100 Andreas Färber <afaer...@suse.de> wrote:
> Hi Alex, > > Here's a cleanup of all of cpu_inject_*(), as requested by Cornelia, plus > another API preparation for my CPUState part 8 series, to go along with my > debug output bug fixes. > > As a reminder here's a link to one of my original discussions of the new > types: > https://lists.nongnu.org/archive/html/qemu-devel/2012-05/msg01286.html > > That is, for any non-TCG functions (TCG does not support CPUState yet) an > S390CPU argument should be preferred over CPUS390XState since it allows cheap > access to its own fields, CPUState's via CPU() and to CPUS390XState via ->env. > Doing this consistently avoids costs of casting back and forth unnecessarily. > > s390 code should use s390_env_get_cpu() where needed, not ENV_GET_CPU(). > > As a rule of thumb, any field in include/exec/cpu-defs.h:CPU_COMMON can be > expected to end up in CPUState (or accessible from there) sooner or later. > Per-target functions can be expected to change to CPUState soon. > > New fields that do not need to be accessed via TCGv or from a hot TCG helper > function should be added to S390CPU, not to CPUS390XState. > > Regards, > Andreas > > Cc: Alexander Graf <ag...@suse.de> > Cc: Cornelia Huck <cornelia.h...@de.ibm.com> > Cc: Christian Borntraeger <borntrae...@de.ibm.com> > > Andreas Färber (2): > target-s390x: Clean up cpu_inject_*() signatures > target-s390x: Pass S390CPU to s390_{add,del}_running_cpu() > > hw/s390x/ipl.c | 6 ++++-- > hw/s390x/s390-virtio-bus.c | 4 +--- > hw/s390x/s390-virtio.c | 8 ++++++-- > target-s390x/cpu.c | 2 +- > target-s390x/cpu.h | 23 ++++++++++++++--------- > target-s390x/helper.c | 11 +++++++---- > target-s390x/interrupt.c | 2 +- > target-s390x/kvm.c | 13 +++++-------- > 8 Dateien geändert, 39 Zeilen hinzugefügt(+), 30 Zeilen entfernt(-) > Looks sane and works for me. Acked-by: Cornelia Huck <cornelia.h...@de.ibm.com>