From patchwork Mon Aug 7 16:22:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jing Zhang X-Patchwork-Id: 13344525 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F8A0C001DB for ; Mon, 7 Aug 2023 16:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BHiCk0iKgKDgV1/Qs13Jm1XeaQyemQLvrrawc/4+jM8=; b=FYg3lgnDawaTDP0Z3VcvfSc7S2 ZY1hmNdqYpl83Q7xymIiaoRkbdUdTzKFNeOJm8fh43/2WvH0I1mkiW/+DGAxoaXFnT2e0HWqpv5nb TejR7APjNSDrq+AH8Mezv+h7M/mTjSPf3sOESxl4V795RNhqjp4SAu2DE4qpKVGueCi1nwNUYMqWM xqAquV57Z7XqLFnwmHc51G4sFdWgwhGq5hmqKm/pAQx9/lXUVKOZLfolYSOIkE8B1SmP2wfi73x7P 6xVrG8YNIN6BGwHg3Qrz3W11+rQwwE5zdg63X8nsTeBsNaSAEriM6cAKNqZFwd4B7et6Jt1Ub2tBt QcoKwFmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qT306-000AVS-17; Mon, 07 Aug 2023 16:22:34 +0000 Received: from mail-pg1-x54a.google.com ([2607:f8b0:4864:20::54a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qT300-000AR2-1H for linux-arm-kernel@lists.infradead.org; Mon, 07 Aug 2023 16:22:29 +0000 Received: by mail-pg1-x54a.google.com with SMTP id 41be03b00d2f7-55c79a5565aso2950671a12.3 for ; Mon, 07 Aug 2023 09:22:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691425347; x=1692030147; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=zsRHDCZY2W1L20MGQ1R2mKjwnOTJ8T3owj8sO8mRlH0=; b=ul3/+AA3mfZTCSzCXHXqKJo+qoz6rCkjTR/ECKE9Rc5xOZKwgZ63NQYLu44YoP2btC peNlkHtCxfI/lHiqdULMPrppDLDhaIcckXUkJhkwN+trV71OjvS5UY55OCjc7nghCXGg GmgTl4SjlSvJx/lzbT4Mh990rclXx1i0mXn4L2Om+nnn86bsbcIQVkDM7X9hb9fvFgdD a+Moj19kZRedoANRQmjX4vEc1bqOxpWkcVvk0bmW4XFcIhmu+BFAkbY0LrOKXRjgsjc4 E6a8X2wlVeBmMML85hq+Ugg8hnaJwd/Hu0bZJ6wJm2tM36jTW05ackjsJ41Zn6H5endJ +QDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691425347; x=1692030147; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zsRHDCZY2W1L20MGQ1R2mKjwnOTJ8T3owj8sO8mRlH0=; b=OdNWv47fV9NBXZTIfeH0xcFKnJ2o6Zmg641fDHO091EWCCwzkCMK8olkmOwyStvXpD UX5T2KsaY0lCLnOJZ885Ww3ax4fEKxZzaDY60mLoVxCVDbHZaw6lYTubF2Vj1xMfupj0 G6GM2XMIu4lRLD/XJtOCMyJJ0Jn7aZhre0NfniSS03mdY03Xu+ICcv+YyVn3hRk0BTJG oDgmtJbFWhRE1GsTZDe+xdo8JsmT+Q67WhAGymYbB5UbhQH1XcaQkYq/OFc4GaLVRMyi kAOg00qlhzHpZ8jmbX7lVyZDhJOYj609Dh7n5FCgVHidITmJIhIBhsCVnZsiXrWdf7G0 nL5g== X-Gm-Message-State: AOJu0Yywjz91coNp5yoglLZ3tA+4OPkXucHjSVQdFIQSqpuO9fKAyvG1 hTguQIWJgk3A5hvOO6tasH+dW80kIbGySIyzSA== X-Google-Smtp-Source: AGHT+IG3XnLIiKJ/NUMDcWl6umTr9qjJJRjx5yVZZ6JF18BZmo4OJCxIDtWTWTVmYGcfj/jYasJjX0lUk38VyXqTvg== X-Received: from jgzg.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:1acf]) (user=jingzhangos job=sendgmr) by 2002:a63:b504:0:b0:564:9d36:f3e7 with SMTP id y4-20020a63b504000000b005649d36f3e7mr49888pge.0.1691425347349; Mon, 07 Aug 2023 09:22:27 -0700 (PDT) Date: Mon, 7 Aug 2023 09:22:05 -0700 In-Reply-To: <20230807162210.2528230-1-jingzhangos@google.com> Mime-Version: 1.0 References: <20230807162210.2528230-1-jingzhangos@google.com> X-Mailer: git-send-email 2.41.0.585.gd2178a4bd4-goog Message-ID: <20230807162210.2528230-8-jingzhangos@google.com> Subject: [PATCH v8 07/11] KVM: arm64: Enable writable for ID_AA64PFR0_EL1 From: Jing Zhang To: KVM , KVMARM , ARMLinux , Marc Zyngier , Oliver Upton Cc: Will Deacon , Paolo Bonzini , James Morse , Alexandru Elisei , Suzuki K Poulose , Fuad Tabba , Reiji Watanabe , Raghavendra Rao Ananta , Suraj Jitindar Singh , Cornelia Huck , Jing Zhang X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230807_092228_433579_DB7BBA70 X-CRM114-Status: GOOD ( 11.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org All valid fields in ID_AA64PFR0_EL1 are writable from usrespace with this change. Signed-off-by: Jing Zhang --- 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 879004fd37e5..392613bec560 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -2041,7 +2041,7 @@ static const struct sys_reg_desc sys_reg_descs[] = { .get_user = get_id_reg, .set_user = set_id_reg, .reset = read_sanitised_id_aa64pfr0_el1, - .val = ID_AA64PFR0_EL1_CSV2_MASK | ID_AA64PFR0_EL1_CSV3_MASK, }, + .val = GENMASK(63, 0), }, ID_SANITISED(ID_AA64PFR1_EL1), ID_UNALLOCATED(4,2), ID_UNALLOCATED(4,3),