From mboxrd@z Thu Jan 1 00:00:00 1970 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 11D37C433F5 for ; Thu, 25 Nov 2021 20:32:19 +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:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=n38aPAfDVO0YicisHFHLNwNv3JZcxCA/SZbZpoIhkAk=; b=BaeFbnE2nK1H4btgmjqsabsMOK QhWwQzn83BwDVlNitHNOoskZxT3TDdi7wfJ/TF6EsAAz/JrikbOIDhiOLmj3alBD7YXK1SvGuJ5ro HWi+7SEl3+czl30ShC6NxtHurNR8YVPGF7RW9XjApKu2XI5YFnoy1UrTF5jWPxho9J37G6sRl9Y0N GsL3K9IkD+Y0h2qgsL4ReOkG4OtvHTVgOOQjRmtR0FGmiYTb3Cfy9AFMLSaosMxBaxmPMBKH7brzu EPdCC0vcWc841+NEkvNP9xzwze4zYgvrVggxVZHUF6opFvliF8Eq+3WItYAl6aGgWoWVGgg47+CP1 PgZcgmVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqLON-008b25-Ez; Thu, 25 Nov 2021 20:30:51 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqLOG-008b0x-49 for linux-arm-kernel@lists.infradead.org; Thu, 25 Nov 2021 20:30:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637872243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ShhUEy+E07PE6bTnG2bcJwf8K2GrtR8GlOvuCWDf3g=; b=KqyeoOBxozCyL1CnxbtHDDHqn+WAhO2c3tdfOpaURvXJ4w6nYhJecWUAr+ESZnBmSOUb3S OLKNrR/jTp4+Rf5O1PY1oq7TGNGGq9wt0CGC3+iS4OUcL+TsrQwRz2+4h+AHxcUnvLdJPC 8rjQPJdacWSfb1lSkCxjBEGXEfgWMDQ= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-518-Q8dzyAX8N3KPPAP1Rx6zIg-1; Thu, 25 Nov 2021 15:30:40 -0500 X-MC-Unique: Q8dzyAX8N3KPPAP1Rx6zIg-1 Received: by mail-wm1-f72.google.com with SMTP id 187-20020a1c02c4000000b003335872db8dso3770716wmc.2 for ; Thu, 25 Nov 2021 12:30:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2ShhUEy+E07PE6bTnG2bcJwf8K2GrtR8GlOvuCWDf3g=; b=BdqAyzgLQhpRUcC1k4uYqfY24aT1RZsmmCGxg/oDvDRexE5PUUSinyaNpFewjXpK6U /8/q9VhHG2B/6e/u5T12EVLRmzo1Al2G417mDMMpXCb8se9Sui8uhITY/msNvyARe+xg IYJv6w0U3rhPjGHBgHGvuJPI6Uw13IIGNnGviBvIGR4ndYFS32YoNeW/zZYSKoHwipD6 t0F8FMOk15gS2p/TYwFobbFPldVuplQKAFyQWUCpUCBQlCUQHE3d82D5/y6HmXAoVLHz fsW5len1jzJ0dCbmOp961FeTGyzbV75fLt3ZeCiwzR7mqPqNSnervZJw0yA7kp26AMou nq/w== X-Gm-Message-State: AOAM533lPg7Xji9K+xgc4waTSn0hdM5GDgfOA1HtI6tTfuehAGKxBWot gcYoZ0vDDtxwpNaxitw/yGc69F5pIl/tCnN2Gy1KKGhK1evWNKOiaRumI6qk5MSzuGlDVcoNtAa 8sIQw522Fd83Ml96O4tUP/soBHyXq5yGzoR0= X-Received: by 2002:adf:dd0a:: with SMTP id a10mr9806971wrm.60.1637872238919; Thu, 25 Nov 2021 12:30:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoQfLwsVNStdvgHx055e1d9E4GwQpVIsWLlaEilliddpDqSQaqHalFf+ziOP3Fem0ERY7sCw== X-Received: by 2002:adf:dd0a:: with SMTP id a10mr9806937wrm.60.1637872238693; Thu, 25 Nov 2021 12:30:38 -0800 (PST) Received: from ?IPv6:2a01:e0a:59e:9d80:527b:9dff:feef:3874? ([2a01:e0a:59e:9d80:527b:9dff:feef:3874]) by smtp.gmail.com with ESMTPSA id d8sm3719945wrm.76.2021.11.25.12.30.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Nov 2021 12:30:38 -0800 (PST) Subject: Re: [RFC PATCH v3 12/29] KVM: arm64: Make ID_DFR1_EL1 writable To: Reiji Watanabe , Marc Zyngier , kvmarm@lists.cs.columbia.edu Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse , Alexandru Elisei , Suzuki K Poulose , Paolo Bonzini , Will Deacon , Andrew Jones , Peng Liang , Peter Shier , Ricardo Koller , Oliver Upton , Jing Zhang , Raghavendra Rao Anata References: <20211117064359.2362060-1-reijiw@google.com> <20211117064359.2362060-13-reijiw@google.com> From: Eric Auger Message-ID: <44073484-639e-3d23-2068-ae5c2cac3276@redhat.com> Date: Thu, 25 Nov 2021 21:30:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20211117064359.2362060-13-reijiw@google.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eauger@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211125_123044_419208_82BFD452 X-CRM114-Status: GOOD ( 19.83 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Reiji, On 11/17/21 7:43 AM, Reiji Watanabe wrote: > This patch adds id_reg_info for ID_DFR1_EL1 to make it writable > by userspace. > > Signed-off-by: Reiji Watanabe > --- > arch/arm64/kvm/sys_regs.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c > index fbd335ac5e6b..dda7001959f6 100644 > --- a/arch/arm64/kvm/sys_regs.c > +++ b/arch/arm64/kvm/sys_regs.c > @@ -859,6 +859,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), what about the 0xF value which indicates the MTPMU is not implemented? Eric > +}; > + > /* > * 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. > @@ -869,6 +874,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, > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel