From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH 2/2 v2] KVM: PPC: booke: Add watchdog emulation Date: Tue, 17 Jul 2012 13:00:32 -0500 Message-ID: <5005A840.8070200@freescale.com> References: <1341830087-12728-1-git-send-email-Bharat.Bhushan@freescale.com> <50044CF1.8070806@suse.de> <5004B995.8060303@freescale.com> <25F0D173-5EFA-4516-B478-F5E220E502CE@suse.de> <6A3DF150A5B70D4F9B66A25E3F7C888D03DCB08D@039-SN2MPN1-023.039d.mgd.msft <50055FEC.4020602@suse.de> <6A3DF150A5B70D4F9B66A25E3F7C888D03DCB328@039-SN2MPN1-023.039d.mgd.msft.net> <50057039.6070108@suse.de> <6A3DF150A5B70D4F9B66A25E3F7C888D03DCB508@039-SN2MPN1-023.039d.mgd.msft.net> <5005781E.1020502@suse.de> <5005925A.7090502@freescale.com> <50059820.7050305@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Bhushan Bharat-R65777 , Wood Scott-B07421 , "" , "" , "" , Benjamin Herrenschmidt , Kumar Gala , Avi Kivity To: Alexander Graf Return-path: In-Reply-To: <50059820.7050305@suse.de> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 07/17/2012 11:51 AM, Alexander Graf wrote: > On 07/17/2012 06:27 PM, Scott Wood wrote: >> Determining whether we're on final expiration is based only on the >> previous value of TSR[ENW,WIS] when the timer expires. We look at TCR >> to determine whether we need to actually exit to QEMU (as opposed to a >> final expiration with no action, which still should result in the timer >> being stopped), but I don't see any problematic races there as long as >> we don't try to update TCR from that context. > > Yeah, what I was trying to say is that I would like to keep the TSR > state unmodified for the final expiry case. If user space decides to not > act upon it, it should be able to call into VCPU_RUN and have the same > behavior as if the watchdog never expired. I agree, it would be racy for QEMU to have to clear TSR if it's not doing a full reset. And that fact is making me wonder if I should have listened to you and kept TSR owned by the vcpu thread. :-) -Scott