From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Thu, 28 Jun 2012 22:26:43 +0000 Subject: Re: [PATCH 3/4] Watchdog exit handling support Message-Id: <4FECDA23.1030909@freescale.com> List-Id: References: <1340861999-31281-3-git-send-email-Bharat.Bhushan@freescale.com> In-Reply-To: <1340861999-31281-3-git-send-email-Bharat.Bhushan@freescale.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org On 06/28/2012 12:39 AM, Bharat Bhushan wrote: > This patch adds the support to handle the exit caused by watchdog > (KVM_EXIT_WDT). In the handling we clear the TSR register. I'm not sure what the logical split is between this patch and 4/4... > diff --git a/hw/ppc_booke.c b/hw/ppc_booke.c > index 837a5b6..a9fba15 100644 > --- a/hw/ppc_booke.c > +++ b/hw/ppc_booke.c > @@ -203,6 +203,11 @@ static void booke_wdt_cb(void *opaque) > booke_timer->wdt_timer); > } > > +void ppc_booke_wdt_clear_tsr(CPUPPCState *env, target_ulong tsr) > +{ > + env->spr[SPR_BOOKE_TSR] = tsr & ~(TSR_ENW | TSR_WIS | TSR_WRS_MASK); > +} > + We should probably call this function before returning to KVM, at least after we halt for debug, possibly other times. -Scott