Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3346208pxf; Mon, 22 Mar 2021 04:26:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzesVGOyKKiecLnKFhoXuSMUPNT7GAwIpMytnvd2bXr6+Y3CtSSw8bsekBf3FqZpNZEtRkR X-Received: by 2002:aa7:d448:: with SMTP id q8mr15551122edr.345.1616412405419; Mon, 22 Mar 2021 04:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616412405; cv=none; d=google.com; s=arc-20160816; b=Klsr87Fxstr/cgijx1EFUnwbtRqzTnGCfBCxw5eXrq8tLYnLXFz1weYqL68aOERo8R G2IKOBm1tUL4eEsV4OQ3G51z6mOgjoC8viFK4AUgYWLsii9fC6xclY0BTzpkdsNqt4nw aBDU8yiE/zQVTUEN1dQMOpMQFIsi9BHLdXvqMzk94KS6OM0GcrL+8JmMvExaDlygfjtv mF2KLAl1KbqNJ1AII4YJVYcdAowU2Sv1bSWY2d76e13ktIp2ZHTdHzvqW3lCaeOXk0OV kN06jStJj56MoxVE6ImvJ4YskV9a2+nlLTE9zip42R1HPC38BouJb0F2fAlOXzW8ZPl2 8m3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=NvH5XmonhDoDbM514SKHnkrJKCvE3424HRNsT1Ogsf4=; b=lTzSbywkIivk10atIJoBw2RHJeolXmkEaknowW8MJ6W5ZGqmPqPI+UVUyg58veDhZM BxUWprcJArxm7Pc+Yj1mvdh1kwUo0NsiPcBkpNSxN6XNGIee0yb0va1M96KdzKC4LIrb mpnmOh56p1lTsJyejFokTlOUpSBwEWpmks7AXUwkmsQ1pt7mzC8yo7aDQaLK5I1WJRB8 OfZOwK4Ql8ZA0202Er7sjwny/3RzpBtGwyUh83f6MivyPSQwwSgBsf+Qcd3D2IPdkk60 wLKf1NgbE2JZ1H+s+fBJibvORHBYYZM6kjq4Kg3c893tTEeqRfJesSoke5yd0ERYKL8P n7yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="X1/XGgKU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn25si11627293ejb.250.2021.03.22.04.26.21; Mon, 22 Mar 2021 04:26:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="X1/XGgKU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229992AbhCVLZM (ORCPT + 99 others); Mon, 22 Mar 2021 07:25:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:37244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229467AbhCVLYz (ORCPT ); Mon, 22 Mar 2021 07:24:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 971096191F; Mon, 22 Mar 2021 11:24:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616412295; bh=ZLi6Bd3+v6SEZ7BojqeGDRUBPIM44t1xQ82RsA0FR9E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=X1/XGgKUEwjQp5cnpZHom0FOv2Wv5aaJYB7D+9Rw0EKC2/dvDBwEJcrxiYyR97pDU eYn/PT/+WCDlABZbe8MpPobHdtfpAF8TYkAGpcCR8OJweh0kThjbcjPdgqZ6+yp8C6 bafuJ8IHT1lZ6KsjCHAipLHctHG91NWEMOK8h3E/xmoUC2T8/t23/Ft5yM0t7K6xqQ w5HhDuSR+/J9+l+Cn/QyRCrEd5qWcl181B1HdL4IPUQExefVoxRsXpztnn9/sAgvRB c624LvFnWaco433jFHovHRbtT6LhTK8h7dp+zoHh6jnJnEt3YrnzRqMTAE+uTqgHJM 2/yrTOk8JW+ZQ== Date: Mon, 22 Mar 2021 11:24:49 +0000 From: Will Deacon To: Quentin Perret Cc: catalin.marinas@arm.com, maz@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, android-kvm@google.com, seanjc@google.com, mate.toth-pal@arm.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, tabba@google.com, ardb@kernel.org, mark.rutland@arm.com, dbrazdil@google.com Subject: Re: [PATCH v6 13/38] KVM: arm64: Enable access to sanitized CPU features at EL2 Message-ID: <20210322112448.GA10318@willie-the-truck> References: <20210319100146.1149909-1-qperret@google.com> <20210319100146.1149909-14-qperret@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210319100146.1149909-14-qperret@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 19, 2021 at 10:01:21AM +0000, Quentin Perret wrote: > Introduce the infrastructure in KVM enabling to copy CPU feature > registers into EL2-owned data-structures, to allow reading sanitised > values directly at EL2 in nVHE. > > Given that only a subset of these features are being read by the > hypervisor, the ones that need to be copied are to be listed under > together with the name of the nVHE variable that > will hold the copy. This introduces only the infrastructure enabling > this copy. The first users will follow shortly. > > Signed-off-by: Quentin Perret > --- > arch/arm64/include/asm/cpufeature.h | 1 + > arch/arm64/include/asm/kvm_cpufeature.h | 22 ++++++++++++++++++++++ > arch/arm64/include/asm/kvm_host.h | 4 ++++ > arch/arm64/kernel/cpufeature.c | 13 +++++++++++++ > arch/arm64/kvm/sys_regs.c | 19 +++++++++++++++++++ > 5 files changed, 59 insertions(+) > create mode 100644 arch/arm64/include/asm/kvm_cpufeature.h Acked-by: Will Deacon Will