[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH qom-cpu v2 16/40] cpu: Move exception
From: |
Andreas Färber |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH qom-cpu v2 16/40] cpu: Move exception_index field from CPU_COMMON to CPUState |
Date: |
Thu, 13 Mar 2014 01:56:58 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
Am 11.03.2014 23:29, schrieb Andreas Färber:
> Am 10.03.2014 01:15, schrieb Andreas Färber:
>> Signed-off-by: Andreas Färber <address@hidden>
>
> Needs:
>
> diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c
> index 8434f6e..931536e 100644
> --- a/target-arm/op_helper.c
> +++ b/target-arm/op_helper.c
> @@ -232,10 +232,12 @@ void HELPER(wfi)(CPUARMState *env)
>
> void HELPER(wfe)(CPUARMState *env)
> {
> + CPUState *cs = CPU(arm_env_get_cpu(env));
> +
> /* Don't actually halt the CPU, just yield back to top
> * level loop
> */
> - env->exception_index = EXCP_YIELD;
> + cs->exception_index = EXCP_YIELD;
> cpu_loop_exit(env);
> }
>
Further needs:
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 32e7a8c..81ec959 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -1178,7 +1178,7 @@ static int kvmppc_handle_halt(PowerPCCPU *cpu)
if (!(cs->interrupt_request & CPU_INTERRUPT_HARD) && (msr_ee)) {
cs->halted = 1;
- env->exception_index = EXCP_HLT;
+ cs->exception_index = EXCP_HLT;
}
return 0;
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg