From: Oliver Upton <oliver.upton@linux.dev>
To: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
maz@kernel.org, will@kernel.org, catalin.marinas@arm.com,
james.morse@arm.com, suzuki.poulose@arm.com,
yuzenghui@huawei.com, wangzhou1@hisilicon.com,
linuxarm@huawei.com
Subject: Re: [PATCH] KVM: arm64: Disable OS double lock visibility by default and ignore VMM writes
Date: Thu, 8 Aug 2024 17:39:48 +0000 [thread overview]
Message-ID: <ZrUC5O8XUuvlLJcc@linux.dev> (raw)
In-Reply-To: <20240808125711.14368-1-shameerali.kolothum.thodi@huawei.com>
Hi Shameer,
I find myself asking *why* we need this, could you share some details
on the issue you're encountering?
Indeed, RAZ/WI is not a faithful implementation of FEAT_DoubleLock, but
I wouldn't expect it to be used in a VM in the first place.
On Thu, Aug 08, 2024 at 01:57:11PM +0100, Shameer Kolothum wrote:
> KVM exposes the OS double lock feature bit to Guests but returns
> RAZ/WI on Guest OSDLR_EL1 access. Make sure we are hiding OS double
> lock from Guests now. However we can't hide DoubleLock if the reported
> DebugVer is < 8.2. So report a minimum DebugVer of 8.2 to Guests.
What if a user wanted to virtualize an exact CPU model that only
implemented v8.0?
> All this may break migration from the older kernels. Take care of
> that by ignoring VMM writes for these values.
Ignoring userspace writes is a pretty big hammer. In situations where
KVM had advertised a feature that was outright not supported (e.g. IMP DEF
PMUs) it _might_ make sense. But with this change we're messing with a
CPU feature we *do* support.
Would allowing userspace to downgrade ID_AA664DFR0_EL1.DoubleLock to
0b1111 be enough?
--
Thanks,
Oliver
next prev parent reply other threads:[~2024-08-08 17:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 12:57 [PATCH] KVM: arm64: Disable OS double lock visibility by default and ignore VMM writes Shameer Kolothum
2024-08-08 17:39 ` Oliver Upton [this message]
2024-08-08 18:10 ` Shameerali Kolothum Thodi
2024-08-08 18:31 ` Oliver Upton
2024-08-08 18:38 ` Shameerali Kolothum Thodi
2024-08-08 23:19 ` Oliver Upton
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=ZrUC5O8XUuvlLJcc@linux.dev \
--to=oliver.upton@linux.dev \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linuxarm@huawei.com \
--cc=maz@kernel.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=suzuki.poulose@arm.com \
--cc=wangzhou1@hisilicon.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).