linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: James Clark <james.clark@linaro.org>
Cc: suzuki.poulose@arm.com, coresight@lists.linaro.org,
	kvmarm@lists.linux.dev, Marc Zyngier <maz@kernel.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>,
	Fuad Tabba <tabba@google.com>, James Morse <james.morse@arm.com>,
	Shiqi Liu <shiqiliu@hust.edu.cn>, Mark Brown <broonie@kernel.org>,
	Raghavendra Rao Ananta <rananta@google.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 07/12] KVM: arm64: arm_spe: Give SPE enabled state to KVM
Date: Wed, 20 Nov 2024 09:16:37 +0000	[thread overview]
Message-ID: <Zz2o9XryCezwAf61@linux.dev> (raw)
In-Reply-To: <20241112103717.589952-8-james.clark@linaro.org>

Hi James,

On Tue, Nov 12, 2024 at 10:37:06AM +0000, James Clark wrote:
> Currently in nVHE, KVM has to check if SPE is enabled on every guest
> switch even if it was never used. Because it's a debug feature and is
> more likely to not be used than used, give KVM the SPE buffer status to
> allow a much simpler and faster do-nothing path in the hyp.
> 
> This is always called with preemption disabled except for probe/hotplug
> which gets wrapped with preempt_disable().

Unless the performance penalty of checking if SPE is measurably bad, I'd
rather we keep things as-is.

Folks that want to go fast are probably using VHE to begin with. As you
note below, we need the hypervisor to decide if SPE is enabled based on
hardware in protected mode anyway. Using a common flow for protected and
non-protected configs keeps complexity down and increases the likelihood
SPE save/restore code actually gets tested.

-- 
Thanks,
Oliver


  reply	other threads:[~2024-11-20  9:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-12 10:36 [PATCH v7 00/12] kvm/coresight: Support exclude guest and exclude host James Clark
2024-11-12 10:37 ` [PATCH v7 01/12] arm64/sysreg: Add a comment that the sysreg file should be sorted James Clark
2024-11-12 10:37 ` [PATCH v7 02/12] tools: arm64: Update sysreg.h header files James Clark
2024-11-12 10:37 ` [PATCH v7 03/12] arm64/sysreg/tools: Move TRFCR definitions to sysreg James Clark
2024-11-12 10:37 ` [PATCH v7 04/12] KVM: arm64: Make vcpu flag macros more generic James Clark
2024-11-18  9:00   ` Marc Zyngier
2024-11-18  9:22     ` James Clark
2024-11-12 10:37 ` [PATCH v7 05/12] KVM: arm64: Move SPE and TRBE flags to host data James Clark
2024-11-12 10:37 ` [PATCH v7 06/12] KVM: arm64: Add flag for FEAT_TRF James Clark
2024-11-12 10:37 ` [PATCH v7 07/12] KVM: arm64: arm_spe: Give SPE enabled state to KVM James Clark
2024-11-20  9:16   ` Oliver Upton [this message]
2024-11-20  9:43     ` James Clark
2024-11-12 10:37 ` [PATCH v7 08/12] KVM: arm64: Don't hit sysregs to see if SPE is enabled or not James Clark
2024-11-12 10:37 ` [PATCH v7 09/12] KVM: arm64: coresight: Give TRBE enabled state to KVM James Clark
2024-11-12 10:37 ` [PATCH v7 10/12] KVM: arm64: Don't hit sysregs to see if TRBE is enabled or not James Clark
2024-11-12 10:37 ` [PATCH v7 11/12] KVM: arm64: Swap TRFCR on guest switch James Clark
2024-11-20 17:31   ` Oliver Upton
2024-11-21 12:50     ` James Clark
2024-11-26 16:23       ` Oliver Upton
2024-11-27 10:08         ` James Clark
2024-11-12 10:37 ` [PATCH v7 12/12] coresight: Pass guest TRFCR value to KVM 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=Zz2o9XryCezwAf61@linux.dev \
    --to=oliver.upton@linux.dev \
    --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=maz@kernel.org \
    --cc=mike.leach@linaro.org \
    --cc=rananta@google.com \
    --cc=shiqiliu@hust.edu.cn \
    --cc=suzuki.poulose@arm.com \
    --cc=tabba@google.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 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).