All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] arm64: Add workaround for Cavium erratum 27456
Date: Wed, 24 Feb 2016 13:40:16 +0000	[thread overview]
Message-ID: <20160224134016.GH28310@arm.com> (raw)
In-Reply-To: <1456272534-21692-1-git-send-email-ddaney.cavm@gmail.com>

On Tue, Feb 23, 2016 at 04:08:54PM -0800, David Daney wrote:
> From: Andrew Pinski <apinski@cavium.com>
> 
> On ThunderX T88 pass 1.x through 2.1 parts, broadcast TLBI
> instructions may cause the icache to become corrupted if it contains
> data for a non-current ASID.
> 
> This patch implements the workaround (which flushes the local icache
> when switching the mm) by using code patching.
> 
> Signed-off-by: Andrew Pinski <apinski@cavium.com>
> Signed-off-by: David Daney <david.daney@cavium.com>
> ---
>  Documentation/arm64/silicon-errata.txt |  1 +
>  arch/arm64/Kconfig                     | 11 +++++++++++
>  arch/arm64/include/asm/cpufeature.h    |  3 ++-
>  arch/arm64/kernel/cpu_errata.c         |  9 +++++++++
>  arch/arm64/mm/proc.S                   | 12 ++++++++++++
>  5 files changed, 35 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/arm64/silicon-errata.txt b/Documentation/arm64/silicon-errata.txt
> index 58b71dd..ba4b6ac 100644
> --- a/Documentation/arm64/silicon-errata.txt
> +++ b/Documentation/arm64/silicon-errata.txt
> @@ -56,3 +56,4 @@ stable kernels.
>  |                |                 |                 |                         |
>  | Cavium         | ThunderX ITS    | #22375, #24313  | CAVIUM_ERRATUM_22375    |
>  | Cavium         | ThunderX GICv3  | #23154          | CAVIUM_ERRATUM_23154    |
> +| Cavium         | ThunderX Core   | #27456          | CAVIUM_ERRATUM_27456    |
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 8cc6228..39f2203 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -432,6 +432,17 @@ config CAVIUM_ERRATUM_23154
>  
>  	  If unsure, say Y.
>  
> +config CAVIUM_ERRATUM_27456
> +	bool "Cavium erratum 27456: Broadcast TLBI instructions may cause the icache corruption"

Doesn't really make sense. Maybe just drop the "the"?

> +	default y
> +	help
> +	  On ThunderX T88 pass 1.x through 2.1 parts, broadcast TLBI
> +	  instructions may cause the icache to become corrupted if it
> +	  contains data for a non-current ASID.  The fix is to flush
> +	  the icache when changing the mm context.

s/flush/invalidate/

Anyway, the rest of the patch looks fine. I still don't have a good idea
as to whether or not KVM is affected by this, but I guess that's your
problem, so:

Reviewed-by: Will Deacon <will.deacon@arm.com>

(and Catalin, if you pick this up, watch out for the conflicts in
cpufeature.h)

Will

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: David Daney <ddaney.cavm@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Mark Rutland <mark.rutland@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	linux-kernel@vger.kernel.org, Andrew Pinski <apinski@cavium.com>,
	David Daney <david.daney@cavium.com>
Subject: Re: [PATCH v3] arm64: Add workaround for Cavium erratum 27456
Date: Wed, 24 Feb 2016 13:40:16 +0000	[thread overview]
Message-ID: <20160224134016.GH28310@arm.com> (raw)
In-Reply-To: <1456272534-21692-1-git-send-email-ddaney.cavm@gmail.com>

On Tue, Feb 23, 2016 at 04:08:54PM -0800, David Daney wrote:
> From: Andrew Pinski <apinski@cavium.com>
> 
> On ThunderX T88 pass 1.x through 2.1 parts, broadcast TLBI
> instructions may cause the icache to become corrupted if it contains
> data for a non-current ASID.
> 
> This patch implements the workaround (which flushes the local icache
> when switching the mm) by using code patching.
> 
> Signed-off-by: Andrew Pinski <apinski@cavium.com>
> Signed-off-by: David Daney <david.daney@cavium.com>
> ---
>  Documentation/arm64/silicon-errata.txt |  1 +
>  arch/arm64/Kconfig                     | 11 +++++++++++
>  arch/arm64/include/asm/cpufeature.h    |  3 ++-
>  arch/arm64/kernel/cpu_errata.c         |  9 +++++++++
>  arch/arm64/mm/proc.S                   | 12 ++++++++++++
>  5 files changed, 35 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/arm64/silicon-errata.txt b/Documentation/arm64/silicon-errata.txt
> index 58b71dd..ba4b6ac 100644
> --- a/Documentation/arm64/silicon-errata.txt
> +++ b/Documentation/arm64/silicon-errata.txt
> @@ -56,3 +56,4 @@ stable kernels.
>  |                |                 |                 |                         |
>  | Cavium         | ThunderX ITS    | #22375, #24313  | CAVIUM_ERRATUM_22375    |
>  | Cavium         | ThunderX GICv3  | #23154          | CAVIUM_ERRATUM_23154    |
> +| Cavium         | ThunderX Core   | #27456          | CAVIUM_ERRATUM_27456    |
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 8cc6228..39f2203 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -432,6 +432,17 @@ config CAVIUM_ERRATUM_23154
>  
>  	  If unsure, say Y.
>  
> +config CAVIUM_ERRATUM_27456
> +	bool "Cavium erratum 27456: Broadcast TLBI instructions may cause the icache corruption"

Doesn't really make sense. Maybe just drop the "the"?

> +	default y
> +	help
> +	  On ThunderX T88 pass 1.x through 2.1 parts, broadcast TLBI
> +	  instructions may cause the icache to become corrupted if it
> +	  contains data for a non-current ASID.  The fix is to flush
> +	  the icache when changing the mm context.

s/flush/invalidate/

Anyway, the rest of the patch looks fine. I still don't have a good idea
as to whether or not KVM is affected by this, but I guess that's your
problem, so:

Reviewed-by: Will Deacon <will.deacon@arm.com>

(and Catalin, if you pick this up, watch out for the conflicts in
cpufeature.h)

Will

  reply	other threads:[~2016-02-24 13:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24  0:08 [PATCH v3] arm64: Add workaround for Cavium erratum 27456 David Daney
2016-02-24  0:08 ` David Daney
2016-02-24 13:40 ` Will Deacon [this message]
2016-02-24 13:40   ` Will Deacon
2016-02-24 14:07   ` Marc Zyngier
2016-02-24 14:07     ` Marc Zyngier
2016-02-24 18:03     ` David Daney
2016-02-24 18:03       ` David Daney
2016-02-24 18:06       ` Will Deacon
2016-02-24 18:06         ` Will Deacon
2016-02-24 18:07         ` David Daney
2016-02-24 18:07           ` David Daney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160224134016.GH28310@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.