From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-228.mta1.migadu.com (out-228.mta1.migadu.com [95.215.58.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5CBE23D0 for ; Wed, 20 Sep 2023 18:33:44 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1695234822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rxcAU4+1eWHnwYCWqsThzWJE7cV1UIj8zg7uwm4NUtg=; b=HFOtAlFMR454kh5p8Mjuj3h4UaENfgMK5drqUjcmR+Lu9m1jP8ek/+WpBHnBWrrHHv/lqS PXXki27UYHoD+NQsAWqiYviJYHfnPTVSkPl0tORzM3LySubxVVG3kj7DpmgJ/pAYcded94 cpGMDw0kN0N+ge+F3498kSss6O9X1tg= From: Oliver Upton To: kvmarm@lists.linux.dev Cc: kvm@vger.kernel.org, Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Will Deacon , Cornelia Huck , Oliver Upton Subject: [PATCH v10 09/12] KVM: arm64: Allow userspace to change ID_AA64ZFR0_EL1 Date: Wed, 20 Sep 2023 18:33:06 +0000 Message-ID: <20230920183310.1163034-10-oliver.upton@linux.dev> In-Reply-To: <20230920183310.1163034-1-oliver.upton@linux.dev> References: <20230920183310.1163034-1-oliver.upton@linux.dev> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT All known fields in ID_AA64ZFR0_EL1 describe the unprivileged instructions supported by the PE's SVE implementation. Allow userspace to pick and choose the advertised feature set, though nothing stops the guest from using undisclosed instructions. Signed-off-by: Oliver Upton --- arch/arm64/kvm/sys_regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 8738b0a0cf5c..c74920063287 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -2071,7 +2071,7 @@ static const struct sys_reg_desc sys_reg_descs[] = { ID_SANITISED(ID_AA64PFR1_EL1), ID_UNALLOCATED(4,2), ID_UNALLOCATED(4,3), - ID_SANITISED(ID_AA64ZFR0_EL1), + ID_WRITABLE(ID_AA64ZFR0_EL1, ~ID_AA64ZFR0_EL1_RES0), ID_HIDDEN(ID_AA64SMFR0_EL1), ID_UNALLOCATED(4,6), ID_UNALLOCATED(4,7), -- 2.42.0.515.g380fc7ccd1-goog