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 X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC1B1C433DF for ; Fri, 31 Jul 2020 22:57:25 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 B429A2072A for ; Fri, 31 Jul 2020 22:57:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="i9YCUxI4"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="yz3cQ0qa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B429A2072A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kevDSoZR27PywL1ef8kK1aUSMcwnKnKWhDMDnF9uUxM=; b=i9YCUxI4gqiNUEgbFidg+UeIB zuuavd0ood4/LSPXpP5uvgXTJsvjxaMeDCJRqbAD2i7X//9NDSpDK6ku2uw2dAIEP3tk9vqe2Qaxs xKI811HAkM1i64KzI8QMbkITPxfeGiUIUYHXYujzuhc5I1mlp3szZvyG3jOMPXpgSOaVsk7m0sdFD NGTa5/7dvjGHZC5G1d9AYSx9H9g9WzCbt2NMoQlJnMnS6Q5q4dvgCPv3DWsOzDlNOAC1SQ4s3vPNJ 0HTpzF4G3IZr6Nxc+fYncmKuYwPqQFfoArWbB+yLPAiUdowCCCLrn8rS9e3gSc2X961w+sw8dSudB KwUgglA0A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1dwH-0006G2-Qq; Fri, 31 Jul 2020 22:55:45 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1dwB-0006F4-VE for linux-arm-kernel@lists.infradead.org; Fri, 31 Jul 2020 22:55:42 +0000 Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1D2DC2072A for ; Fri, 31 Jul 2020 22:55:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596236139; bh=ghMEH1GO6ahQLU9bD4XySRrfpoyCy8rcO1rNgTMBIe0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=yz3cQ0qaR6fmr9rUc2QwUjqWwf4dAD+TgulADL03tT+NMBexpOC2RJIbGbWX+fQ+u yB+SkUcdMatRT38ZNKJPZ4+yUiezlfAxxtk9ZomTpxFoEym1R3cKvVQ8FSEmCAHOxD SlYsRj/9yOZMPBasJ/vu2K5676benp0bk69jem2g= Received: by mail-oo1-f51.google.com with SMTP id t6so6216568ooh.4 for ; Fri, 31 Jul 2020 15:55:39 -0700 (PDT) X-Gm-Message-State: AOAM53263SMtuph5IaJG9KHUSfPqqN6fx4ZDyCbuyerQQ3uKf/nkivUm vdpbiTLhXuPRoi9A2W2k7pQFZPvTn7zyX8DM/w== X-Google-Smtp-Source: ABdhPJxlJLtEGIpm/+Zqu84tYvc+2GV7B03TFpdIhESEDSUxef1FFIW4eI6IM8vt5auvi+1oYO79sm4gwMnETv7iLTQ= X-Received: by 2002:a4a:9c0f:: with SMTP id y15mr5040222ooj.81.1596236138482; Fri, 31 Jul 2020 15:55:38 -0700 (PDT) MIME-Version: 1.0 References: <20200717205233.903344-1-robh@kernel.org> <20200717205233.903344-4-robh@kernel.org> <20200729163800.GA24572@gaia> <20200730082227.GA24095@willie-the-truck> In-Reply-To: <20200730082227.GA24095@willie-the-truck> From: Rob Herring Date: Fri, 31 Jul 2020 16:55:26 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 3/3] arm64: Add workaround for Arm Cortex-A77 erratum 1508412 To: Will Deacon X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200731_185540_092803_E9FC7931 X-CRM114-Status: GOOD ( 20.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Suzuki K Poulose , Catalin Marinas , James Morse , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Marc Zyngier , kvmarm@lists.cs.columbia.edu, Julien Thierry 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 On Thu, Jul 30, 2020 at 2:22 AM Will Deacon wrote: > > On Wed, Jul 29, 2020 at 05:38:00PM +0100, Catalin Marinas wrote: > > On Fri, Jul 17, 2020 at 02:52:33PM -0600, Rob Herring wrote: > > > diff --git a/arch/arm64/include/asm/kvm_hyp.h b/arch/arm64/include/asm/kvm_hyp.h > > > index ce3080834bfa..ce5b0d9b12bf 100644 > > > --- a/arch/arm64/include/asm/kvm_hyp.h > > > +++ b/arch/arm64/include/asm/kvm_hyp.h > > > @@ -46,6 +46,17 @@ > > > #define read_sysreg_el2(r) read_sysreg_elx(r, _EL2, _EL1) > > > #define write_sysreg_el2(v,r) write_sysreg_elx(v, r, _EL2, _EL1) > > > > > > +static inline u64 __hyp_text read_sysreg_par(void) > > > +{ > > > + u64 par; > > > + if (cpus_have_const_cap(ARM64_WORKAROUND_1508412)) > > > + dmb(sy); > > > + par = read_sysreg(par_el1); > > > + if (cpus_have_const_cap(ARM64_WORKAROUND_1508412)) > > > + dmb(sy); > > > + return par; > > > +} > > > > Even if that's not always called on a critical path, I agree with Andrew > > that we could use alternatives here for dmb(sy). > > Even then, I'm not sure how this helps if the CPU can speculatively branch > to the PAR access without executing the DMB. Is that not possible on A77? I'm told by the h/w folks speculation is not possible in this case. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel