Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754302AbbDTGno (ORCPT ); Mon, 20 Apr 2015 02:43:44 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:39228 "EHLO e23smtp09.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754159AbbDTGnn (ORCPT ); Mon, 20 Apr 2015 02:43:43 -0400 Message-ID: <55349FD9.5040006@linux.vnet.ibm.com> Date: Mon, 20 Apr 2015 12:12:33 +0530 From: Anshuman Khandual User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Ulrich Weigand CC: shuahkh@osg.samsung.com, Michael Neuling , james.hogan@imgtec.com, avagin@openvz.org, Paul.Clothier@imgtec.com, peterz@infradead.org, palves@redhat.com, linux-kernel@vger.kernel.org, davem@davemloft.net, dhowells@redhat.com, linuxppc-dev@ozlabs.org, kirjanov@gmail.com, tglx@linutronix.de, oleg@redhat.com, davej@redhat.com, akpm@linux-foundation.org, sukadev@linux.vnet.ibm.com, Edjunior Barbosa Machado , sam.bobroff@au1.ibm.com Subject: Re: [V6,1/9] elf: Add new powerpc specifc core note sections References: <20141203052204.9DA8F1400DD@ozlabs.org> <548578A8.5020901@linux.vnet.ibm.com> <54947C64.4030206@linux.vnet.ibm.com> <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> In-Reply-To: <552B82F9.3080108@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15042006-0033-0000-0000-0000015CF294 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2000 Lines: 41 On 04/13/2015 02:18 PM, Anshuman Khandual wrote: > On 04/10/2015 04:03 PM, Ulrich Weigand wrote: >> Anshuman Khandual wrote on 10.04.2015 >> 11:10:35: > > I believed it stores the check pointed MSR value which was in the register > before the transaction started. But then how it is different from the > ckpt_regs.msr, I am not sure. Mikey or Michael should be able to clarify > more on this. I can see "orig_msr" getting used in many places to hold the > check pointed value of MSR. tm_orig_msr is used during process context switch only. ckpt_regs gets used in the signal context where we save all userspace context. So ptrace would look into the saved MSR value correctly inside ckpt_regs.msr slot. I believe thats the check pointed MSR value we are interested in from the ptrace perspective not the tm_orig_msr which just gets used during process context switch. >> I may be misreading kernel code, but it seems the kernel does not >> actually >> use the ckpt_regs.msr slot at all, and therefore the corresponding slot >> of >> the NT_PPC_TM_CGPR regset is likewise undefined/unused. Would it not be >> more consistent to use that slot to pass the checkpointed MSR? > > Hmm. Its a valid point. Would like to get some more clarity on this from > Mikey whether that slot can be used for check pointed MSR value or not. > Then why did we have these two slots to hold the same check pointed MSR > value in the first place at all. Getting confused a bit. Using ckpt_regs.msr during process context switch instead of tm_orig_msr seems to be working fine and all the basic TM tests pass, in which case we can drop tm_orig_msr from thread_struct. Will post a patch on this and see whats the response from others. -- 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/