From: Scott Wood <scottwood@freescale.com>
To: Bhushan Bharat-R65777 <R65777@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"agraf@suse.de" <agraf@suse.de>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/3 v2] Reset qemu timers when guest reset
Date: Fri, 4 Jan 2013 09:58:52 -0600 [thread overview]
Message-ID: <1357315132.666.3@snotra> (raw)
In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D06542853@039-SN2MPN1-022.039d.mgd.msft.net> (from R65777@freescale.com on Thu Jan 3 19:28:49 2013)
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: qemu-devel@nongnu.org; qemu-ppc@nongnu.org; agraf@suse.de;
> 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 <bharat.bhushan@freescale.com>
> > > ---
> > > 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
next prev parent reply other threads:[~2013-01-04 15:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-28 5:16 [Qemu-devel] [PATCH 0/3 v2] Enable and Handle in-kernel watchdog emulation Bharat Bhushan
2012-12-28 5:16 ` [Qemu-devel] [PATCH 1/3 v2] Synchronized the linux headers Bharat Bhushan
2012-12-28 5:16 ` [Qemu-devel] [PATCH 2/3 v2] Reset qemu timers when guest reset Bharat Bhushan
2013-01-03 14:10 ` Alexander Graf
2013-01-03 20:20 ` [Qemu-devel] [Qemu-ppc] " Scott Wood
2013-01-03 20:33 ` Alexander Graf
2013-01-03 20:37 ` Scott Wood
2013-01-03 20:48 ` Alexander Graf
2013-01-04 1:28 ` Bhushan Bharat-R65777
2013-01-04 15:58 ` Scott Wood [this message]
2012-12-28 5:16 ` [Qemu-devel] [PATCH 3/3 v2] Enable kvm emulated watchdog Bharat Bhushan
2013-01-10 15:36 ` Alexander Graf
2013-01-11 6:42 ` Bhushan Bharat-R65777
2013-01-11 11:01 ` Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1357315132.666.3@snotra \
--to=scottwood@freescale.com \
--cc=B07421@freescale.com \
--cc=R65777@freescale.com \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).