[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z-LX5H5mjGyTQ9N4@linux.dev>
Date: Tue, 25 Mar 2025 09:20:52 -0700
From: Oliver Upton <oliver.upton@...ux.dev>
To: Jinqian Yang <yangjinqian1@...wei.com>
Cc: maz@...nel.org, yuzenghui@...wei.com,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev,
linux-kernel@...r.kernel.org, wangzhou1@...ilicon.com,
shameerali.kolothum.thodi@...wei.com, liuyonglong@...wei.com,
jiangkunkun@...wei.com
Subject: Re: [PATCH] KVM: arm64: Make HCX writable from userspace
Hi Jinqian,
On Tue, Mar 25, 2025 at 08:11:26PM +0800, Jinqian Yang wrote:
> Allow userspace to modify guest visible value for HCX in
> ID_AA64MMFR1_EL1.
>
> Signed-off-by: Jinqian Yang <yangjinqian1@...wei.com>
This is fine, but I would rather we handle all the features like FEAT_HCX
instead of a trickle of one-off patches.
So, could you please:
- Identify all of the features that describe an *EL2* feature which
we've exposed to non-nested VMs
- Implement patch(es) to make those fields writable (i.e. allow them to
be downgraded)
- Add corresponding test cases to the set_id_regs selftest
Thanks,
Oliver
> ---
> arch/arm64/kvm/sys_regs.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
> index 82430c1e1dd0..b105f156bdf6 100644
> --- a/arch/arm64/kvm/sys_regs.c
> +++ b/arch/arm64/kvm/sys_regs.c
> @@ -2666,7 +2666,6 @@ static const struct sys_reg_desc sys_reg_descs[] = {
> ID_AA64MMFR0_EL1_TGRAN16_2 |
> ID_AA64MMFR0_EL1_ASIDBITS)),
> ID_WRITABLE(ID_AA64MMFR1_EL1, ~(ID_AA64MMFR1_EL1_RES0 |
> - ID_AA64MMFR1_EL1_HCX |
> ID_AA64MMFR1_EL1_TWED |
> ID_AA64MMFR1_EL1_XNX |
> ID_AA64MMFR1_EL1_VH |
> --
> 2.33.0
>
Powered by blists - more mailing lists