qemu-patch-raspberry4/target-ppc
David Gibson b162d02e94 target-ppc: Don't use hwaddr to represent hardware state
The hwaddr type is somewhat vaguely defined as being able to contain bus
addresses on the widest possible bus in the system.  For that reason it's
discouraged for representing specific pieces of persistent hardware state,
which should instead use an explicit width type that matches the bits
available in real hardware.  In particular, because of the possibility that
the size of hwaddr might change if different buses are added to the target
in future, it's not suitable for use in vm state descriptions for savevm
and migration.

This patch purges such unwise uses of hwaddr from the ppc target code,
which turns out to be just one.  The ppcemb_tlb_t struct, used on a number
of embedded ppc models to represent a TLB entry contains a hwaddr for the
real address field.  This patch changes it to be a fixed uint64_t which is
suitable enough for all machine types which use this structure.

Other uses of hwaddr in CPUPPCState turn out not to be problematic:
htab_base and htab_mask are just used for the convenience of the TCG code;
the underlying machine state is the SDR1 register, which is stored with
a suitable type already.  Likewise the mpic_cpu_base field is only used
internally and does not represent fundamental hardware state which needs to
be saved.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
2012-12-14 13:12:57 +01:00
..
cpu-qom.h target-ppc: QOM'ify CPU 2012-04-15 17:10:30 +02:00
cpu.h target-ppc: Don't use hwaddr to represent hardware state 2012-12-14 13:12:57 +01:00
excp_helper.c target-ppc: Pass PowerPCCPU to cpu_ppc_hypercall 2012-10-31 01:02:45 +01:00
fpu_helper.c ppc: Add missing break 2012-06-24 01:04:43 +02:00
helper.c ppc: Move misc helpers from helper.c to misc_helper.c 2012-06-24 01:04:43 +02:00
helper.h target-ppc: rename helper flags 2012-10-28 14:54:24 +01:00
helper_regs.h Replace always_inline with inline 2009-08-16 09:06:54 +00:00
int_helper.c target-ppc: get rid of the HANDLE_NAN{1, 2, 3} macros 2012-10-04 15:54:17 +02:00
kvm.c spapr: Pass PowerPCCPU to spapr_hypercall() 2012-10-31 01:02:45 +01:00
kvm_ppc.c Replace Qemu by QEMU in comments 2012-04-07 14:00:45 +00:00
kvm_ppc.h pseries: Add support for new KVM hash table control call 2012-10-04 15:54:17 +02:00
machine.c target-ppc: Extend FPU state for newer POWER CPUs 2012-11-01 13:02:22 +01:00
Makefile.objs PPC: BookE: Implement EPR SPR 2012-06-24 01:04:52 +02:00
mem_helper.c PPC: Add support for MSR_CM 2012-06-24 01:04:51 +02:00
mfrom_table.c find -type f | xargs sed -i 's/[\t ]$//g' # on most files 2007-09-16 21:08:06 +00:00
mfrom_table_gen.c fix spelling in target sub directory 2011-12-02 10:50:57 +00:00
misc_helper.c ppc: Move misc helpers from helper.c to misc_helper.c 2012-06-24 01:04:43 +02:00
mmu_helper.c target-ppc: make some functions static 2012-11-01 19:49:45 +01:00
mpic_helper.c PPC: BookE: Implement EPR SPR 2012-06-24 01:04:52 +02:00
STATUS Fix typos in comments (chek -> check) 2011-05-22 22:31:45 +01:00
timebase_helper.c ppc: Avoid AREG0 for timebase helpers 2012-06-24 01:04:43 +02:00
translate.c TCG: Use gen_opc_instr_start from context instead of global variable. 2012-12-08 14:24:43 +00:00
translate_init.c target-ppc: Rework storage of VPA registration state 2012-10-29 11:45:54 +01:00