aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-09-13 17:22:49 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-10-04 11:03:54 -0700
commitb77af26e973705e8fd96cff102fc978ee44043da (patch)
tree5da84b6520fbcf44ef8d9af06307785744eef835 /hw/ppc
parentad75a51e84af9638e4ec51aa1e6ec5f3ff642558 (diff)
downloadqemu-b77af26e973705e8fd96cff102fc978ee44043da.zip
qemu-b77af26e973705e8fd96cff102fc978ee44043da.tar.gz
qemu-b77af26e973705e8fd96cff102fc978ee44043da.tar.bz2
accel/tcg: Replace CPUState.env_ptr with cpu_env()
Reviewed-by: Anton Johansson <anjo@rev.ng> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/e500.c4
-rw-r--r--hw/ppc/spapr.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index d5b6820..e04114f 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -373,7 +373,7 @@ static int ppce500_load_device_tree(PPCE500MachineState *pms,
MachineState *machine = MACHINE(pms);
unsigned int smp_cpus = machine->smp.cpus;
const PPCE500MachineClass *pmc = PPCE500_MACHINE_GET_CLASS(pms);
- CPUPPCState *env = first_cpu->env_ptr;
+ CPUPPCState *env = cpu_env(first_cpu);
int ret = -1;
uint64_t mem_reg_property[] = { 0, cpu_to_be64(machine->ram_size) };
int fdt_size;
@@ -499,7 +499,7 @@ static int ppce500_load_device_tree(PPCE500MachineState *pms,
if (cpu == NULL) {
continue;
}
- env = cpu->env_ptr;
+ env = cpu_env(cpu);
cpu_name = g_strdup_printf("/cpus/PowerPC,8544@%x", i);
qemu_fdt_add_subnode(fdt, cpu_name);
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index d4230d3..cb84067 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1125,7 +1125,7 @@ static void spapr_dt_hypervisor(SpaprMachineState *spapr, void *fdt)
* Older KVM versions with older guest kernels were broken
* with the magic page, don't allow the guest to map it.
*/
- if (!kvmppc_get_hypercall(first_cpu->env_ptr, hypercall,
+ if (!kvmppc_get_hypercall(cpu_env(first_cpu), hypercall,
sizeof(hypercall))) {
_FDT(fdt_setprop(fdt, hypervisor, "hcall-instructions",
hypercall, sizeof(hypercall)));