Re: [Qemu-devel] [PATCH v2] PPC: Clean up DECR implementation

2014-04-09 Thread Alexander Graf
> Am 09.04.2014 um 21:33 schrieb Tom Musta : > >> On 4/8/2014 2:58 PM, Alexander Graf wrote: >>> On 04/08/2014 09:56 PM, Tom Musta wrote: >>> On 4/6/2014 3:55 PM, Alexander Graf wrote: >>> >>> @@ -806,6 +838,10 @@ clk_setup_cb cpu_ppc_tb_init (CPUPPCState *env, uint32_t freq)

Re: [Qemu-devel] [PATCH v2] PPC: Clean up DECR implementation

2014-04-09 Thread Tom Musta
On 4/8/2014 2:58 PM, Alexander Graf wrote: > On 04/08/2014 09:56 PM, Tom Musta wrote: >> On 4/6/2014 3:55 PM, Alexander Graf wrote: >> >> >>> @@ -806,6 +838,10 @@ clk_setup_cb cpu_ppc_tb_init (CPUPPCState *env, >>> uint32_t freq) >>> tb_env = g_malloc0(sizeof(ppc_tb_t)); >>> env->tb_e

Re: [Qemu-devel] [PATCH v2] PPC: Clean up DECR implementation

2014-04-08 Thread Tom Musta
On 4/8/2014 2:58 PM, Alexander Graf wrote: > On 04/08/2014 09:56 PM, Tom Musta wrote: >> On 4/6/2014 3:55 PM, Alexander Graf wrote: >> >> >>> @@ -806,6 +838,10 @@ clk_setup_cb cpu_ppc_tb_init (CPUPPCState *env, >>> uint32_t freq) >>> tb_env = g_malloc0(sizeof(ppc_tb_t)); >>> env->tb_e

Re: [Qemu-devel] [PATCH v2] PPC: Clean up DECR implementation

2014-04-08 Thread Alexander Graf
On 04/08/2014 09:56 PM, Tom Musta wrote: On 4/6/2014 3:55 PM, Alexander Graf wrote: @@ -806,6 +838,10 @@ clk_setup_cb cpu_ppc_tb_init (CPUPPCState *env, uint32_t freq) tb_env = g_malloc0(sizeof(ppc_tb_t)); env->tb_env = tb_env; tb_env->flags = PPC_DECR_UNDERFLOW_TRIGGERED; +

Re: [Qemu-devel] [PATCH v2] PPC: Clean up DECR implementation

2014-04-08 Thread Tom Musta
On 4/6/2014 3:55 PM, Alexander Graf wrote: > @@ -806,6 +838,10 @@ clk_setup_cb cpu_ppc_tb_init (CPUPPCState *env, uint32_t > freq) > tb_env = g_malloc0(sizeof(ppc_tb_t)); > env->tb_env = tb_env; > tb_env->flags = PPC_DECR_UNDERFLOW_TRIGGERED; > +if (env->insns_flags & PPC_SEGM

[Qemu-devel] [PATCH v2] PPC: Clean up DECR implementation

2014-04-06 Thread Alexander Graf
There are 3 different variants of the decrementor for BookE and BookS. The BookE variant sets TSR[DIS] to 1 when the DEC value becomes 1 or 0. TSR[DIS] is then the indicator whether the decrementor interrupt line is asserted or not. The old BookS variant treats DEC as an edge interrupt that gets