[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 10/13] target-ppc: Don't use hwaddr to represent hardw
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 10/13] target-ppc: Don't use hwaddr to represent hardware state |
Date: |
Tue, 4 Dec 2012 13:42:14 +1100 |
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 <address@hidden>
---
target-ppc/cpu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 5f1dc8b..742d4f8 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -355,7 +355,7 @@ struct ppc6xx_tlb_t {
typedef struct ppcemb_tlb_t ppcemb_tlb_t;
struct ppcemb_tlb_t {
- hwaddr RPN;
+ uint64_t RPN;
target_ulong EPN;
target_ulong PID;
target_ulong size;
--
1.7.10.4
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 08/13] pseries: Update SLOF for NVRAM support, (continued)
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Erlon Cruz, 2012/12/06
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Erlon Cruz, 2012/12/06
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Nikunj A Dadhania, 2012/12/07
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Erlon Cruz, 2012/12/07
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Alexander Graf, 2012/12/07
[Qemu-ppc] [PATCH 12/13] pseries: Increase default NVRAM size, David Gibson, 2012/12/03
[Qemu-ppc] [PATCH 06/13] pseries: Split xics irq configuration from state information, David Gibson, 2012/12/03
[Qemu-ppc] [PATCH 04/13] pseries: Allow RTAS tokens without a qemu handler, David Gibson, 2012/12/03
[Qemu-ppc] [PATCH 02/13] pseries: Use #define for XICS base irq number, David Gibson, 2012/12/03
[Qemu-ppc] [PATCH 10/13] target-ppc: Don't use hwaddr to represent hardware state,
David Gibson <=
[Qemu-ppc] [PATCH 13/13] target-ppc: Give a meaningful error if too many threads are specified, David Gibson, 2012/12/03
- Re: [Qemu-ppc] [PATCH 13/13] target-ppc: Give a meaningful error if too many threads are specified, David Gibson, 2012/12/03
- Re: [Qemu-ppc] [PATCH 13/13] target-ppc: Give a meaningful error if too many threads are specified, Alexander Graf, 2012/12/13
- Re: [Qemu-ppc] [PATCH 13/13] target-ppc: Give a meaningful error if too many threads are specified, David Gibson, 2012/12/13
- Re: [Qemu-ppc] [PATCH 13/13] target-ppc: Give a meaningful error if too many threads are specified, Alexander Graf, 2012/12/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 13/13] target-ppc: Give a meaningful error if too many threads are specified, Peter Maydell, 2012/12/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 13/13] target-ppc: Give a meaningful error if too many threads are specified, Peter Maydell, 2012/12/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 13/13] target-ppc: Give a meaningful error if too many threads are specified, David Gibson, 2012/12/16
[Qemu-ppc] [PATCH 03/13] pseries: Return the token when we register an RTAS call, David Gibson, 2012/12/03