All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: James Clark <james.clark@linaro.org>
Cc: kvmarm@lists.linux.dev, oliver.upton@linux.dev,
	suzuki.poulose@arm.com, coresight@lists.linaro.org,
	Joey Gouly <joey.gouly@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Mike Leach <mike.leach@linaro.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Shiqi Liu <shiqiliu@hust.edu.cn>,
	James Morse <james.morse@arm.com>,
	Mark Brown <broonie@kernel.org>,
	"Rob Herring (Arm)" <robh@kernel.org>,
	Raghavendra Rao Ananta <rananta@google.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v9 0/7] kvm/coresight: Support exclude guest and exclude host
Date: Mon, 06 Jan 2025 14:48:56 +0000	[thread overview]
Message-ID: <865xmsov53.wl-maz@kernel.org> (raw)
In-Reply-To: <20250106142446.628923-1-james.clark@linaro.org>

On Mon, 06 Jan 2025 14:24:35 +0000,
James Clark <james.clark@linaro.org> wrote:
> 
> FEAT_TRF is a Coresight feature that allows trace capture to be
> completely filtered at different exception levels, unlike the existing
> TRCVICTLR controls which may still emit target addresses of branches,
> even if the following trace is filtered.
> 
> Without FEAT_TRF, it was possible to start a trace session on a host and
> also collect trace from the guest as TRCVICTLR was never programmed to
> exclude guests (and it could still emit target addresses even if it
> was).
> 
> With FEAT_TRF, the current behavior of trace in guests exists depends on
> whether nVHE or VHE are being used. Both of the examples below are from
> the host's point of view, as Coresight isn't accessible from guests.
> This patchset is only relevant to when FEAT_TRF exists, otherwise there
> is no change.
> 
> Current behavior:
> 
>   nVHE/pKVM:
> 
>   Because the host and the guest are both using TRFCR_EL1, trace will be
>   generated in guests depending on the same filter rules the host is
>   using. For example if the host is tracing userspace only, then guest
>   userspace trace will also be collected.
> 
>   (This is further limited by whether TRBE is used because an issue
>   with TRBE means that it's completely disabled in nVHE guests, but it's
>   possible to have other tracing components.)
> 
>   VHE:
> 
>   With VHE, the host filters will be in TRFCR_EL2, but the filters in
>   TRFCR_EL1 will be active when the guest is running. Because we don't
>   write to TRFCR_EL1, guest trace will be completely disabled.
> 
> New behavior:
> 
> The guest filtering rules from the Perf session are now honored for both
> nVHE and VHE modes. This is done by either writing to TRFCR_EL12 at the
> start of the Perf session and doing nothing else further, or caching the
> guest value and writing it at guest switch for nVHE. In pKVM, trace is
> now be disabled for both protected and unprotected guests.
> 
> There is also an optimization where the Coresight drivers pass their
> enabled state to KVM. This means in the common case KVM doesn't have to
> touch any sysregs when the feature isn't in use.
> 
> Applies to kvmarm/next (00163be8bb59).

Can you *PLEASE* stop this absolutely nonsense of posting patches
based on top of random commits? Please look at how we integrate new
developments: they are *always* based on an early -rc tag (usually
-rc3).

If you depend on other patches, add them to your series and post the
whole thing.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  parent reply	other threads:[~2025-01-06 14:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06 14:24 [PATCH v9 0/7] kvm/coresight: Support exclude guest and exclude host James Clark
2025-01-06 14:24 ` [PATCH v9 1/7] arm64/sysreg: Add a comment that the sysreg file should be sorted James Clark
2025-01-06 14:24 ` [PATCH v9 2/7] tools: arm64: Update sysreg.h header files James Clark
2025-01-13 15:07   ` Mark Brown
2025-01-13 15:28     ` Marc Zyngier
2025-01-13 15:43       ` James Clark
2025-01-06 14:24 ` [PATCH v9 3/7] arm64/sysreg/tools: Move TRFCR definitions to sysreg James Clark
2025-01-06 14:24 ` [PATCH v9 4/7] coresight: trbe: Remove redundant disable call James Clark
2025-01-06 14:24 ` [PATCH v9 5/7] KVM: arm64: coresight: Give TRBE enabled state to KVM James Clark
2025-01-06 14:24 ` [PATCH v9 6/7] KVM: arm64: Support trace filtering for guests James Clark
2025-01-06 14:24 ` [PATCH v9 7/7] coresight: Pass guest TRFCR value to KVM James Clark
2025-01-06 14:48 ` Marc Zyngier [this message]
2025-01-07 11:37   ` [PATCH v9 0/7] kvm/coresight: Support exclude guest and exclude host James Clark

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=865xmsov53.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=anshuman.khandual@arm.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=coresight@lists.linaro.org \
    --cc=james.clark@linaro.org \
    --cc=james.morse@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mike.leach@linaro.org \
    --cc=oliver.upton@linux.dev \
    --cc=rananta@google.com \
    --cc=robh@kernel.org \
    --cc=shiqiliu@hust.edu.cn \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.