qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH 2/3 v2] Reset qemu timers when guest reset


From: Scott Wood
Subject: Re: [Qemu-ppc] [PATCH 2/3 v2] Reset qemu timers when guest reset
Date: Fri, 4 Jan 2013 09:58:52 -0600

On 01/03/2013 07:28:49 PM, Bhushan Bharat-R65777 wrote:


> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Friday, January 04, 2013 1:51 AM
> To: Bhushan Bharat-R65777
> Cc: address@hidden; address@hidden; address@hidden; Bhushan Bharat-
> R65777
> Subject: Re: [Qemu-ppc] [PATCH 2/3 v2] Reset qemu timers when guest reset
>
> On 12/27/2012 11:16:51 PM, Bharat Bhushan wrote:
> > This patch install the timer reset handler. This will be called when
> > the guest is reset.
> >
> > Signed-off-by: Bharat Bhushan <address@hidden>
> > ---
> >  v2: same as v1
> >
> >  hw/ppc_booke.c |   12 ++++++++++++
> >  1 files changed, 12 insertions(+), 0 deletions(-)
> >
> > diff --git a/hw/ppc_booke.c b/hw/ppc_booke.c index d51e7fa..837a5b6
> > 100644
> > --- a/hw/ppc_booke.c
> > +++ b/hw/ppc_booke.c
> > @@ -231,6 +231,16 @@ void store_booke_tcr(CPUPPCState *env,
> > target_ulong val)
> >
> >  }
> >
> > +static void ppc_booke_timer_reset_handle(void *opaque) {
> > +    CPUPPCState *env = opaque;
> > +
> > +    env->spr[SPR_BOOKE_TSR] = 0;
> > +    env->spr[SPR_BOOKE_TCR] = 0;
> > +
> > +    booke_update_irq(env);
> > +}
>
> When does KVM_SET_SREGS get called?

This is part of reset processing and is not cpu_synchronize_state() called before all reset handlers are called and after that post_synchronize will do the KVM_SET_SREGS in kvm_put_registers().

cpu_synchronize_state() does not do KVM_SET_SREGS. I don't see "post_synchronize" anywhere in the QEMU sources.

As Alex said, there needs to be a way for this function to set a flag that TCR and TSR have been dirtied.

-Scott



reply via email to

[Prev in Thread] Current Thread [Next in Thread]