Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754206AbbDUOrK (ORCPT ); Tue, 21 Apr 2015 10:47:10 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:48212 "EHLO e06smtp10.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750937AbbDUOrH (ORCPT ); Tue, 21 Apr 2015 10:47:07 -0400 In-Reply-To: <5535D83C.1060302@linux.vnet.ibm.com> References: <20141203052204.9DA8F1400DD@ozlabs.org> <54A50094.5070902@linux.vnet.ibm.com> <1421883597.30744.3.camel@neuling.org> <1421963049.30744.23.camel@neuling.org> <1422419289.9646.20.camel@neuling.org> <1424667110.16027.6.camel@neuling.org> <1426718702.4866.2.camel@neuling.org> <1426719027.4866.4.camel@neuling.org> <550FEC36.8080803@linux.vnet.ibm.com> <1428534695.4682.18.camel@neuling.org> <55267595.90 <5527938B.1030901@linux.vnet.ibm.com> <552B82F9.3080108@linux.vnet.ibm.com> <5535D83C.1060302@linux.vnet.ibm.com> Subject: Re: [V6,1/9] elf: Add new powerpc specifc core note sections X-KeepSent: 1F8375CD:27A71A83-C1257E2E:00506121; type=4; name=$KeepSent To: Anshuman Khandual Cc: akpm@linux-foundation.org, avagin@openvz.org, davej@redhat.com, davem@davemloft.net, dhowells@redhat.com, Edjunior Barbosa Machado , james.hogan@imgtec.com, kirjanov@gmail.com, linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, Michael Neuling , oleg@redhat.com, palves@redhat.com, Paul.Clothier@imgtec.com, peterz@infradead.org, sam.bobroff@au1.ibm.com, shuahkh@osg.samsung.com, sukadev@linux.vnet.ibm.com, tglx@linutronix.de X-Mailer: IBM Notes Release 9.0.1FP3 Octobe4, 2013 Message-ID: From: Ulrich Weigand Date: Tue, 21 Apr 2015 16:41:09 +0200 X-MIMETrack: Serialize by Router on D06ML032/06/M/IBM(Release 9.0.1FP3|January 12, 2015) at 21/04/2015 16:46:57 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15042114-0041-0000-0000-000004002D0C Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3377 Lines: 82 Anshuman Khandual wrote on 21.04.2015 06:55:24: > Changed ELF core note sections > ------------------------------ > These core note sections need to be changed to accommodate the in > transaction ptrace requests when the running/current value of these > registers will reside some where else instead of the original places > of thread_struct. > > /* Running register state */ > (1) NT_PRFPREG (Accessible always) > (2) NT_PPC_VMX (Accessible always) > (3) NT_PPC_VSX (Accessible always) > > New ELF core note sections > -------------------------- > /* TM check pointed register set */ > (1) NT_PPC_TM_CGPR --> NT_PRSTATUS (Accessible inside TM) > (2) NT_PPC_TM_CFPR --> NT_PRFPREG (Accessible inside TM) > (3) NT_PPC_TM_CVMX --> NT_PPC_VMX (Accessible inside TM) > (4) NT_PPC_TM_CVSX --> NT_PPC_VSX (Accessible inside TM) > > NOTE: The register set data structure for these ELF core not > sections would exactly match with that of the corresponding > running value register sets indicated above. OK. > /* TM SPR set */ (Accessible always) > (5) NT_PPC_TM_SPR thread->tm_tfhar > thread->tm_tfiar > thread->ttm_exasr OK. > /* TM check pointed misc register set */ > (6) NT_PPC_TM_TAR thread->tm_tar (Accessible inside TM) > (7) NT_PPC_TM_PPR thread->tm_ppr (Accessible inside TM) > (8) NT_PPC_TM_DSCR thread->tm_dscr (Accessible inside TM) > > NOTE: Application can have a different set of TAR, PPR and DSCR > registers inside the transaction compared that of the outside. > Also seems like they are *not* the check pointed ones, will > double check on this. Changed the core note section name from > NT_PPC_TM_CTAR to just NT_PPC_TM_TAR and for all the others. Huh? How is this not the checkpointed set? I would have expected that NT_PPC_TAR contains the current tar (which is the one in the transaction if we're within one), while NT_PPC_TM_CTAR contains the checkpointed value that will be restored once the transaction aborts. Why is this not the case? > NOTE: They are like any other special purpose register which can > be changed from the user space. So the elf core note section name > can be generic. Here are some optional ELF core note sections > which we can also add like the above ones. > > (12) NT_PPC_EBBRR thread->ebbrr (Accessible inside EBB) > (13) NT_PPC_EBBHR thread->ebbhr (Accessible inside EBB) > (14) NT_PPC_BESCR thread->bescr (Accessible inside EBB) > (15) NT_PPC_SIAR thread->siar (Accessible inside EBB) > (16) NT_PPC_SDAR thread->sdar (Accessible inside EBB) > (17) NT_PPC_SIER thread->sier (Accessible inside EBB) > (18) NT_PPC_MMCR2 thread->mmcr2 (Accessible inside EBB) > (19) NT_PPC_MMCR0 thread->mmcr0 (Accessible inside EBB) So I'm not really familiar with the EBB stuff. But just as a general note, if those are in fact related (i.e. on every machine that has EBB, all those registers will be available), it might indeed make more sense to collect them into a single note section (NT_PPC_EBB?) after all. Bye, Ulrich -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/