Re: [PATCH] coresight: etm4x: Add config to exclude kernel mode tracing

From: Suzuki Poulose
Date: Fri Oct 16 2020 - 09:17:59 EST


On 10/16/20 2:14 PM, Leo Yan wrote:
On Fri, Oct 16, 2020 at 12:38:47PM +0100, Suzuki Kuruppassery Poulose wrote:

[...]

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 !)

Thanks for sharing thoughts, Suzuki.

I missed the device virtulisation. Here should virtualize all devices
(includes CoreSight ETM/funnel/ETR/ETF)? Or only need to virtualize
ETRs?

I wouldn't even think of virtualizing the components without sysreg
access. So let us not worry about it :-)

Cheers
Suzuki