Message ID | 20211103062520.1445832-14-reijiw@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=8DV1=PW=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87B19C433EF for <linux-arm-kernel@archiver.kernel.org>; Wed, 3 Nov 2021 06:37:22 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4342361139 for <linux-arm-kernel@archiver.kernel.org>; Wed, 3 Nov 2021 06:37:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4342361139 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:References: Mime-Version:Message-Id: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=oSZT/j8Tz5aRdgN856Gci48H3RX84D9LN0fxhq/JVKc=; b=2P0fur/+V/O3CLTj8vDL+5H/Ai gRvGVviGcZhLEKSgJRuzKidOAt8hPbPDduv+OKR8kVrKk1KvyvvS9MbplWRjBA5u50K8FKn6bewWP wSWA+X3nfdAgsSfvT/xOeaItHfcKXAikUgxgAaLRNRpBmG9NlohjXVjICDb7Ejgeiv3l5PLcvzn1B 8jY31+TwMEyjG3U75sQBkwMqoyQLW2FHB0NE2T/vgp0OJXUrF62/RX6IB2Gv8JxGwQIU5P6CiC4ys nEempuUlM742XHPMHmU78MWWzxAeFQC8+tNr1kG9NYqSUdIsHHY1s2kKVJgwaN8lFpD/Gz+OzYUVX S77tlr4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mi9qq-004FIV-7y; Wed, 03 Nov 2021 06:34:25 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mi9l1-004CPn-6R for linux-arm-kernel@lists.infradead.org; Wed, 03 Nov 2021 06:28:25 +0000 Received: by mail-yb1-xb49.google.com with SMTP id z65-20020a256544000000b005c21b35717dso2706636ybb.10 for <linux-arm-kernel@lists.infradead.org>; Tue, 02 Nov 2021 23:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=VrJ07b06nc9KbJLXSj5zehnLehuxuLDRP/US8C6hfE0=; b=ZAVnIZTP+LHKUx7NfjJFSSU8Rs4NWQlt+WSmFir11XcrpVf8vIvANzLB94WHJ6Bf60 k5sOQZOlmPiZcIyPnZc5h1IMa4HEIbaZcPfZylu7pLpRq3Wo7z+BnTX0y7I5wYkCFuoG +eGMgfwCzcXcJHpSeGXyJ+tSsUCHmpwt6ur6pHCiVAdNfjEHT3yYhu+lsxVQ5D2V2KIC qvaK+4T5DbMnZpK3Z7YkucwN2EtSX/SR0NY/oCqRV2gxlQCjWzPRe4HiWqu2PEQkt71B aKqnarAD6+0QHqmgo1zo2USfPJbv7FQerLfy1iC4jnm1iC7S985cSaZMnGyUSznXz1F/ su2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=VrJ07b06nc9KbJLXSj5zehnLehuxuLDRP/US8C6hfE0=; b=yx6t+eg7gnUsNVtLYjJnShRyTF6awGxZXQD6ZEx3fNsmyJWwmBBh4HEa55IXs0bhNI r59yKcuJqpNLF9xSdrLqWgjlPQ0gFsjCVpl6AoIGQZDcfOGMiTWvsk9aRxn4LoFZaT3y ZYvSA0P4U5ZdsLVlemOAUyn1unqV3S3w4FhRsp/+eBDwXew9OwryFJ7DJXdEAwHCAe+D nbEDHafZpddIOStvYa+Pp/8VzxyRTY8oT5GmpTpY2JC5HqOlUahHCTJ1WWjkZvrDwM/F bScHw5KnzJ0/2IJ+E1QNy/69j/me5HCVV/QW66/f7/0MvZG47fuFlhM0tGPrvenjffHW w/Tw== X-Gm-Message-State: AOAM530GczOeVMp3dUkjdRzq+/aOuYwWQ79eIgBnOOqw6+cv1q7V0KXe 2KQ8wM+AaVbgyleN8k30/wuwanGmFlM= X-Google-Smtp-Source: ABdhPJynSsKsRymAV6oD+adfOhHtjHV5sbxdoRvZmrjUVSSHvV6cZcysjNYwYVj1A9HptlBdbRlQUwIXynU= X-Received: from reiji-vws-sp.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:3d59]) (user=reijiw job=sendgmr) by 2002:a25:5d08:: with SMTP id r8mr43342773ybb.227.1635920896128; Tue, 02 Nov 2021 23:28:16 -0700 (PDT) Date: Tue, 2 Nov 2021 23:25:05 -0700 In-Reply-To: <20211103062520.1445832-1-reijiw@google.com> Message-Id: <20211103062520.1445832-14-reijiw@google.com> Mime-Version: 1.0 References: <20211103062520.1445832-1-reijiw@google.com> X-Mailer: git-send-email 2.33.1.1089.g2158813163f-goog Subject: [RFC PATCH v2 13/28] KVM: arm64: Make ID_DFR1_EL1 writable From: Reiji Watanabe <reijiw@google.com> To: Marc Zyngier <maz@kernel.org>, kvmarm@lists.cs.columbia.edu Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse <james.morse@arm.com>, Alexandru Elisei <alexandru.elisei@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Paolo Bonzini <pbonzini@redhat.com>, Will Deacon <will@kernel.org>, Andrew Jones <drjones@redhat.com>, Peng Liang <liangpeng10@huawei.com>, Peter Shier <pshier@google.com>, Ricardo Koller <ricarkol@google.com>, Oliver Upton <oupton@google.com>, Jing Zhang <jingzhangos@google.com>, Raghavendra Rao Anata <rananta@google.com>, Reiji Watanabe <reijiw@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211102_232823_275421_D4186446 X-CRM114-Status: GOOD ( 11.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
KVM: arm64: Make CPU ID registers writable by userspace
|
expand
|
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 8abd3f6fd667..f04067fdaa85 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -835,6 +835,11 @@ static struct id_reg_info id_dfr0_el1_info = { .get_reset_val = get_reset_id_dfr0_el1, }; +static struct id_reg_info id_dfr1_el1_info = { + .sys_reg = SYS_ID_DFR1_EL1, + .ftr_check_types = S_FCT(ID_DFR1_MTPMU_SHIFT, FCT_LOWER_SAFE), +}; + /* * An ID register that needs special handling to control the value for the * guest must have its own id_reg_info in id_reg_info_table. @@ -845,6 +850,7 @@ static struct id_reg_info id_dfr0_el1_info = { #define GET_ID_REG_INFO(id) (id_reg_info_table[IDREG_IDX(id)]) static struct id_reg_info *id_reg_info_table[KVM_ARM_ID_REG_MAX_NUM] = { [IDREG_IDX(SYS_ID_DFR0_EL1)] = &id_dfr0_el1_info, + [IDREG_IDX(SYS_ID_DFR1_EL1)] = &id_dfr1_el1_info, [IDREG_IDX(SYS_ID_AA64PFR0_EL1)] = &id_aa64pfr0_el1_info, [IDREG_IDX(SYS_ID_AA64PFR1_EL1)] = &id_aa64pfr1_el1_info, [IDREG_IDX(SYS_ID_AA64DFR0_EL1)] = &id_aa64dfr0_el1_info,
This patch adds id_reg_info for ID_DFR1_EL1 to make it writable by userspace. Signed-off-by: Reiji Watanabe <reijiw@google.com> --- arch/arm64/kvm/sys_regs.c | 6 ++++++ 1 file changed, 6 insertions(+)