From: Marc Zyngier <maz@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Fuad Tabba <tabba@google.com>,
Oliver Upton <oliver.upton@linux.dev>,
James Morse <james.morse@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Dave Martin <Dave.Martin@arm.com>,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] KVM: arm64: Constrain the host to the maximum shared SVE VL with pKVM
Date: Thu, 12 Sep 2024 15:56:13 +0100 [thread overview]
Message-ID: <86ldzw7wfm.wl-maz@kernel.org> (raw)
In-Reply-To: <17cb5e48-ca96-433a-a351-639dd339dfb7@sirena.org.uk>
On Thu, 12 Sep 2024 15:45:27 +0100,
Mark Brown <broonie@kernel.org> wrote:
>
> [1 <text/plain; us-ascii (7bit)>]
> On Thu, Sep 12, 2024 at 03:21:43PM +0100, Fuad Tabba wrote:
>
> > One part that you haven't changed is setting ZCR_EL2 during el2 setup:
> > arch/arm64/include/asm/el2_setup.h: .Linit_sve_ : lines 290/291
>
> > I guess at that point it's not straightforward to figure sve_max_vl.
> > Is there a window after el2 setup where we might actually get the VL
> > implied by ZCR_ELx_LEN_MASK, or would it always get set to
> > sve_vq_from_vl(kvm_host_sve_max_vl) - 1 ?
>
> Yeah, at that point we have no idea what any other cores might look like
> and there's just generally a bootstrapping issue - we need to see the
> actual maximum VLs for the PEs to work out what the maximum VL for the
> system is so we can tell KVM what to enforce.
That's fine. By the time KVM initialises, all the "early" CPUs will be
on, and pKVM actively prevents any late onlining of CPUs.
The only gotcha would be if "something" snapshots the "large" VL in
between two CPU boots, but we really don't expect that sort of things.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2024-09-12 14:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 11:39 [PATCH v2] KVM: arm64: Constrain the host to the maximum shared SVE VL with pKVM Mark Brown
2024-09-12 14:21 ` Fuad Tabba
2024-09-12 14:45 ` Mark Brown
2024-09-12 14:56 ` Marc Zyngier [this message]
2024-10-01 14:28 ` Marc Zyngier
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=86ldzw7wfm.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=Dave.Martin@arm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.upton@linux.dev \
--cc=suzuki.poulose@arm.com \
--cc=tabba@google.com \
--cc=will@kernel.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).