From: Paul Mackerras Subject: Re: [PATCH 6/6] KVM: PPC: Book3S PR: Expose TM registers Date: Sat, 17 May 2014 16:20:36 +1000 Message-ID: <20140517062036.GC22449@iris.ozlabs.ibm.com> References: <1398788262-3307-1-git-send-email-agraf@suse.de> <1398788262-3307-7-git-send-email-agraf@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org To: Alexander Graf Return-path: Content-Disposition: inline In-Reply-To: <1398788262-3307-7-git-send-email-agraf@suse.de> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Tue, Apr 29, 2014 at 06:17:42PM +0200, Alexander Graf wrote: > POWER8 introduces transactional memory which brings along a number of new > registers and MSR bits. > > Implementing all of those is a pretty big headache, so for now let's at least > emulate enough to make Linux's context switching code happy. [snip] > - if (!(vcpu->arch.fscr & (1ULL << fac))) { > + /* We get TM interrupts only when EBB is disabled? Sigh. */ This comment doesn't make sense to me. Not every reason code reported in the high bits of FSCR corresponds directly to an enable bit in FSCR. In fact, of the 7 defined reason codes in POWER8, only three correspond to an enable bit... > + if ((fac != FSCR_TM_LG) && !(vcpu->arch.fscr & (1ULL << fac))) { so this should really check explicitly for TAR, EBB or DSCR. Paul.