From: Suzuki Poulose <suzuki.poulose@arm.com>
To: Leo Yan <leo.yan@linaro.org>,
Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Cc: Denis Nikitin <denik@chromium.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
linux-arm-msm@vger.kernel.org, coresight@lists.linaro.org,
linux-kernel@vger.kernel.org, Stephen Boyd <swboyd@chromium.org>,
linux-arm-kernel@lists.infradead.org,
Mike Leach <mike.leach@linaro.org>
Subject: Re: [PATCH] coresight: etm4x: Add config to exclude kernel mode tracing
Date: Fri, 16 Oct 2020 12:38:47 +0100 [thread overview]
Message-ID: <f6ee4156-664c-7bff-8e35-5cd1acdbaa84@arm.com> (raw)
In-Reply-To: <20201016092450.GG4646@leoy-ThinkPad-X240s>
On 10/16/20 10:24 AM, Leo Yan wrote:
> Hi Sai,
>
> On Fri, Oct 16, 2020 at 02:10:47PM +0530, Sai Prakash Ranjan wrote:
>> Hi Leo,
>>
>> On 2020-10-16 12:54, Leo Yan wrote:
>>> On Thu, Oct 15, 2020 at 11:40:05PM -0700, Denis Nikitin wrote:
>>>> Hi Mathieu,
>>>>
>>>> I think one of the use cases could be VMs.
>>>> Is there isolation between EL1 guest kernels which we can control
>>>> from perf
>>>> in a system wide mode?
>>>
>>> Sorry for suddenly jumping in.
>>>
>>> For KVM, I think we need to implement mechanism for saving/restoring
>>> CoreSight context for every guest OS, the CPU PMUs has implemented
>>> related features [1].
>>>
>>> Thanks,
>>> Leo
>>>
>>> [1]
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/kvm/pmu.c
>>>
Its not as easy as the CPU PMU for virtualizing the ETMs (with memory
mapped access only), i.e supporting ETMs from VMs.
We could definitely stop/resume on guest entry/exit, to support
attr.exclude_guest.
>>
>> What happens to the sysfs mode of tracing? For that we would still
>> need a config right to exclude kernel mode tracing completely.
>
> IIUC, sysfs mode and perf mode both can apply the same approach, the
> guest OS runs a thread context for the host, so when a guest OS is
> switched in or out, the hypervisor can save/restore the context for
> the guest OS; thus every guest OS will have its dedicated context and
> trace data ideally.
I don't think Guest Context is something we can support as mentioned
above, at least for systems without sysreg access for ETMs (and
virtualizing ETRs is a different story !)
Cheers
Suzuki
next prev parent reply other threads:[~2020-10-16 11:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 12:45 [PATCH] coresight: etm4x: Add config to exclude kernel mode tracing Sai Prakash Ranjan
2020-10-15 14:27 ` Suzuki K Poulose
2020-10-16 8:30 ` Sai Prakash Ranjan
2020-10-15 16:02 ` Mathieu Poirier
[not found] ` <CADDJ8CXS8gGuXL45vR6xiHwJhZNcUJPvHMVYSGR6LDETRPJFiQ@mail.gmail.com>
2020-10-16 7:24 ` Leo Yan
2020-10-16 8:40 ` Sai Prakash Ranjan
2020-10-16 9:24 ` Leo Yan
2020-10-16 10:30 ` Sai Prakash Ranjan
2020-10-16 11:38 ` Suzuki Poulose [this message]
2020-10-16 13:14 ` Leo Yan
2020-10-16 13:17 ` Suzuki Poulose
2020-10-16 11:11 ` Suzuki Poulose
2021-01-15 5:46 ` Sai Prakash Ranjan
2021-01-18 14:47 ` Mattias Nissler
2021-01-19 5:12 ` Sai Prakash Ranjan
2021-01-18 20:23 ` Mathieu Poirier
2021-01-19 5:21 ` Sai Prakash Ranjan
2021-01-19 8:36 ` Al Grant
2021-01-19 9:51 ` Sai Prakash Ranjan
2021-01-19 10:33 ` Suzuki K Poulose
2021-01-19 11:56 ` Al Grant
2021-01-20 5:13 ` Sai Prakash Ranjan
2021-01-19 12:00 ` Sai Prakash Ranjan
2021-01-20 18:48 ` Mathieu Poirier
2021-01-21 6:03 ` Sai Prakash Ranjan
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=f6ee4156-664c-7bff-8e35-5cd1acdbaa84@arm.com \
--to=suzuki.poulose@arm.com \
--cc=coresight@lists.linaro.org \
--cc=denik@chromium.org \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mike.leach@linaro.org \
--cc=saiprakash.ranjan@codeaurora.org \
--cc=swboyd@chromium.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).