mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joey Gouly <joey.gouly@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>,
	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>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: arm64: Expose S1PIE to guests
Date: Tue, 8 Oct 2024 10:31:04 +0100	[thread overview]
Message-ID: <20241008093104.GA2623892@e124191.cambridge.arm.com> (raw)
In-Reply-To: <20241005-kvm-arm64-fix-s1pie-v1-1-5901f02de749@kernel.org>

Hi,

On Sat, Oct 05, 2024 at 12:19:37AM +0100, Mark Brown wrote:
> Prior to commit 70ed7238297f ("KVM: arm64: Sanitise ID_AA64MMFR3_EL1")
> we just exposed the santised view of ID_AA64MMFR3_EL1 to guests, meaning
> that they saw both TCRX and S1PIE if present on the host machine. That
> commit added VMM control over the contents of the register and exposed
> S1POE but removed S1PIE, meaning that the extension is no longer visible
> to guests. Reenable support for S1PIE with VMM control.
> 
> Fixes: 70ed7238297f ("KVM: arm64: Sanitise ID_AA64MMFR3_EL1")
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  arch/arm64/kvm/sys_regs.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
> index dad88e31f9537fe02e28b117d6a740f15572e0ba..d48f89ad6aa7139078e7991ce6c8ebc4a0543551 100644
> --- a/arch/arm64/kvm/sys_regs.c
> +++ b/arch/arm64/kvm/sys_regs.c
> @@ -1550,7 +1550,8 @@ static u64 __kvm_read_sanitised_id_reg(const struct kvm_vcpu *vcpu,
>  		val &= ~ID_AA64MMFR2_EL1_CCIDX_MASK;
>  		break;
>  	case SYS_ID_AA64MMFR3_EL1:
> -		val &= ID_AA64MMFR3_EL1_TCRX | ID_AA64MMFR3_EL1_S1POE;
> +		val &= ID_AA64MMFR3_EL1_TCRX | ID_AA64MMFR3_EL1_S1POE |
> +			ID_AA64MMFR3_EL1_S1PIE;
>  		break;
>  	case SYS_ID_MMFR4_EL1:
>  		val &= ~ARM64_FEATURE_MASK(ID_MMFR4_EL1_CCIDX);
> @@ -2433,6 +2434,7 @@ static const struct sys_reg_desc sys_reg_descs[] = {
>  					ID_AA64MMFR2_EL1_NV |
>  					ID_AA64MMFR2_EL1_CCIDX)),
>  	ID_WRITABLE(ID_AA64MMFR3_EL1, (ID_AA64MMFR3_EL1_TCRX	|
> +				       ID_AA64MMFR3_EL1_S1PIE   |
>  				       ID_AA64MMFR3_EL1_S1POE)),
>  	ID_SANITISED(ID_AA64MMFR4_EL1),
>  	ID_UNALLOCATED(7,5),
> 
> ---

Sorry, silly mistake by me.

Reviewed-by: Joey Gouly <joey.gouly@arm.com>

Thanks,
Joey

  reply	other threads:[~2024-10-08  9:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-04 23:19 Mark Brown
2024-10-08  9:31 ` Joey Gouly [this message]
2024-10-08 12:05 ` 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=20241008093104.GA2623892@e124191.cambridge.arm.com \
    --to=joey.gouly@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=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.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

all inboxes | Powered by JetHome®