kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Scott Wood <scottwood@freescale.com>
Cc: Bharat Bhushan <r65777@freescale.com>,
	kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, agraf@suse.de,
	Bharat Bhushan <Bharat.Bhushan@freescale.com>
Subject: Re: [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation
Date: Wed, 25 Jul 2012 21:46:43 -0300	[thread overview]
Message-ID: <20120726004643.GA3904@amt.cnet> (raw)
In-Reply-To: <50108764.2070906@freescale.com>

On Wed, Jul 25, 2012 at 06:55:16PM -0500, Scott Wood wrote:
> On 07/25/2012 03:37 PM, Marcelo Tosatti wrote:
> > On Fri, Jul 20, 2012 at 04:29:08PM -0500, Scott Wood wrote:
> >> On 07/20/2012 12:00 AM, Bharat Bhushan wrote:
> >>> This patch adds the watchdog emulation in KVM. The watchdog
> >>> emulation is enabled by KVM_ENABLE_CAP(KVM_CAP_PPC_WDT) ioctl.
> >>> The kernel timer are used for watchdog emulation and emulates
> >>> h/w watchdog state machine. On watchdog timer expiry, it exit to QEMU
> >>> if TCR.WRC is non ZERO. QEMU can reset/shutdown etc depending upon how
> >>> it is configured.
> > 
> > Why can't you do this in QEMU, given the kernel exits to userspace on
> > timer configuration?
> >
> > The QEMU timer handler used to emulate the watchdog then would have to
> > only read the register value from the vCPU.
> 
> Do what specifically in QEMU?  The whole watchdog mechanism?
>
> It's only on final (third) expiry, when a reset is needed, that it exits
> to QEMU.  The first expiry sets a bit in TSR that software can clear to
> clear the watchdog.  If software doesn't clear it, the second expiry
> sets a different bit in TSR that triggers a critical interrupt to the
> guest.  If software doesn't clear either of those bits by the time it
> expires again, it's reset time (if a reset action is enabled).
> 
> The TSR/TCR registers are shared with other timers that are implemented
> in the kernel, and it would be more complicated to implement just the
> watchdog in QEMU.  Plus, we currently have no interface for exiting to
> QEMU for emulation of an SPR.
> 
> Currently QEMU on PPC leaves all timekeeping stuff to the kernel, and
> I'd like to keep it that way.
> 
> -Scott
> 

OK.

      reply	other threads:[~2012-07-26  0:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20  5:00 [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation Bharat Bhushan
2012-07-20 21:29 ` Scott Wood
2012-07-21  8:37   ` Bhushan Bharat-R65777
2012-07-23 15:35     ` Scott Wood
2012-07-23  4:10   ` Bhushan Bharat-R65777
2012-07-23 15:32     ` Scott Wood
2012-07-23 15:43       ` Bhushan Bharat-R65777
2012-07-23 16:00         ` Scott Wood
2012-07-23 16:04           ` Bhushan Bharat-R65777
2012-07-23 16:30             ` Scott Wood
2012-07-24  7:45               ` Bhushan Bharat-R65777
2012-07-24 22:32                 ` Scott Wood
2012-07-25 20:37   ` Marcelo Tosatti
2012-07-25 23:55     ` Scott Wood
2012-07-26  0:46       ` Marcelo Tosatti [this message]

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=20120726004643.GA3904@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=Bharat.Bhushan@freescale.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=r65777@freescale.com \
    --cc=scottwood@freescale.com \
    /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).