From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Paul Mackerras <paulus@ozlabs.org>,
Steven Rostedt <rostedt@goodmis.org>
Cc: Anton Blanchard <anton@samba.org>,
linuxppc-dev@lists.ozlabs.org,
Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [RFC PATCH 1/1] powerpc/ftrace: Exclude real mode code from
Date: Fri, 09 Mar 2018 17:35:25 +0530 [thread overview]
Message-ID: <1520595927.fm6mw6c4zi.naveen@linux.ibm.com> (raw)
In-Reply-To: <87ina5v91g.fsf@concordia.ellerman.id.au>
Michael Ellerman wrote:
> "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> writes:
>> My earlier assumption was that we have other scenarios when we are in=20
>> realmode (specifically with MSR_RI unset) where we won't be able to=20
>> recover from a trap, during function tracing (*). I did a set of=20
>> experiments yesterday to verify that, but I was not able to uncover=20
>> any such scenarios with my brief testing. So, we seem to be=20
>> functioning just fine while tracing realmode C code, except for KVM.
>=20
> Hmm. If MSR_RI is clear then that should indicate that you can't recover
> from an interrupt, typically because you'd lose state in SRR0/1. So I
> would expect things to go badly in that case.
Yes, so it looks like we aren't calling into any C code (that isn't=20
already annotated with 'notrace') with MSR_RI unset. At least, with the=20
usual interrupt handling on powernv. I tested this by putting a 'trap'=20
in the function tracer callback after the recursion test. This forces a=20
trap for each function that we trace non-recursively.
There may be other paths where we do so, but it isn't as pervasive as I=20
previously thought. So, we should be able to exclude those paths using=20
the paca field, as and when we find them.
- Naveen
=
prev parent reply other threads:[~2018-03-09 12:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 16:46 [RFC PATCH 0/1] Exclude real mode code from ftrace Naveen N. Rao
2018-03-07 16:46 ` [RFC PATCH 1/1] powerpc/ftrace: Exclude real mode code from Naveen N. Rao
2018-03-07 17:45 ` Steven Rostedt
2018-03-07 18:37 ` Naveen N. Rao
2018-03-07 19:02 ` Steven Rostedt
2018-03-09 8:17 ` Naveen N. Rao
2018-03-08 3:03 ` Michael Ellerman
2018-03-09 8:15 ` Naveen N. Rao
2018-03-09 10:27 ` Michael Ellerman
2018-03-09 12:05 ` Naveen N. Rao [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=1520595927.fm6mw6c4zi.naveen@linux.ibm.com \
--to=naveen.n.rao@linux.vnet.ibm.com \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=paulus@ozlabs.org \
--cc=rostedt@goodmis.org \
/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).