Skip to contentSkip to conversation

xen/arm: Implement workaround for Cortex A-57 and Cortex A72 AT speculate

PATCH Superseded Julien Grall 2 participants 3 messages Sep 24, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/arm: Implement workaround for Cortex A-57 and Cortex A72 AT speculate

Both Cortex-A57 (erratum 1319537) and Cortex-A72 (erratum 1319367) can end with corrupt TLBs if they speculate an AT instruction while S1/S2 system registers in inconsistent state.

The workaround is the same as for Cortex A-76 implemented by commit a18be06aca "xen/arm: Implement workaround for Cortex-A76 erratum 1165522", so it is only necessary to plumb in the cpuerrata framework.

---
 docs/misc/arm/silicon-errata.txt |  2 ++
 xen/arch/arm/cpuerrata.c         | 10 ++++++++++
 2 files changed, 12 insertions(+)
docs/misc/arm/silicon-errata.txt +2 -0
index 6cd1366f15..cf193a6d4d 100644
@@ -48,5 +48,7 @@ stable hypervisors.
 | ARM            | Cortex-A57      | #852523         | N/A                     |
 | ARM            | Cortex-A57      | #832075         | ARM64_ERRATUM_832075    |
 | ARM            | Cortex-A57      | #834220         | ARM64_ERRATUM_834220    |
+| ARM            | Cortex-A57      | #1319537        | N/A
+| ARM            | Cortex-A72      | #1319367        | N/A
 | ARM            | Cortex-A76      | #1165522        | N/A                     |
 | ARM            | MMU-500         | #842869         | N/A                     |
xen/arch/arm/cpuerrata.c +10 -0
index 6f483b2d8d..da72b02442 100644
@@ -481,6 +481,16 @@ static const struct arm_cpu_capabilities arm_errata[] = {
         .capability = ARM64_WORKAROUND_AT_SPECULATE,
         MIDR_RANGE(MIDR_CORTEX_A76, 0, 2 << MIDR_VARIANT_SHIFT),
     },
+    {
+        .desc = "ARM erratum 1319537",
+        .capability = ARM64_WORKAROUND_AT_SPECULATE,
+        MIDR_ALL_VERSIONS(MIDR_CORTEX_A72),
+    },
+    {
+        .desc = "ARM erratum 1319367",
+        .capability = ARM64_WORKAROUND_AT_SPECULATE,
+        MIDR_ALL_VERSIONS(MIDR_CORTEX_A57),
+    },
     {},
 };
 
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Julien Grall

Both Cortex-A57 (erratum 1319537) and Cortex-A72 (erratum 1319367) can end with corrupt TLBs if they speculate an AT instruction while S1/S2 system registers in inconsistent state.

The workaround is the same as for Cortex A-76 implemented by commit a18be06aca "xen/arm: Implement workaround for Cortex-A76 erratum 1165522", so it is only necessary to plumb in the cpuerrata framework.

With a few nits:

Quoted 10 lines
---
 docs/misc/arm/silicon-errata.txt |  2 ++
 xen/arch/arm/cpuerrata.c         | 10 ++++++++++
 2 files changed, 12 insertions(+)
docs/misc/arm/silicon-errata.txt +0 -0
index 6cd1366f15..cf193a6d4d 100644

docs/misc/arm/silicon-errata.txt stable hypervisors. · line 52

Quoted 5 lines
docs/misc/arm/silicon-errata.txt +2 -0
@@ -48,5 +48,7 @@ stable hypervisors.
 | ARM            | Cortex-A57      | #852523         | N/A                     |
 | ARM            | Cortex-A57      | #832075         | ARM64_ERRATUM_832075    |
 | ARM            | Cortex-A57      | #834220         | ARM64_ERRATUM_834220    |
+| ARM            | Cortex-A57      | #1319537        | N/A
+| ARM            | Cortex-A72      | #1319367        | N/A

Looks like you missed the last |.

Also, is this "ARM" or "Arm"? I believe you asked me to user the latter.

Quoted 22 lines
docs/misc/arm/silicon-errata.txt +0 -0
 | ARM            | Cortex-A76      | #1165522        | N/A                     |
 | ARM            | MMU-500         | #842869         | N/A                     |
xen/arch/arm/cpuerrata.c +10 -0
index 6f483b2d8d..da72b02442 100644
@@ -481,6 +481,16 @@ static const struct arm_cpu_capabilities arm_errata[] = {
         .capability = ARM64_WORKAROUND_AT_SPECULATE,
         MIDR_RANGE(MIDR_CORTEX_A76, 0, 2 << MIDR_VARIANT_SHIFT),
     },
+    {
+        .desc = "ARM erratum 1319537",
+        .capability = ARM64_WORKAROUND_AT_SPECULATE,
+        MIDR_ALL_VERSIONS(MIDR_CORTEX_A72),
+    },
+    {
+        .desc = "ARM erratum 1319367",
+        .capability = ARM64_WORKAROUND_AT_SPECULATE,
+        MIDR_ALL_VERSIONS(MIDR_CORTEX_A57),
+    },
     {},
 };
Signature · 5 lines
Volodymyr Babchuk at EPAM
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#2 lore raw

Hi Volodymyr,

Quoted 22 lines · Volodymyr Babchuk
Quoted 9 lines · Julien Grall

Both Cortex-A57 (erratum 1319537) and Cortex-A72 (erratum 1319367) can end with corrupt TLBs if they speculate an AT instruction while S1/S2 system registers in inconsistent state.

The workaround is the same as for Cortex A-76 implemented by commit a18be06aca "xen/arm: Implement workaround for Cortex-A76 erratum 1165522", so it is only necessary to plumb in the cpuerrata framework.

With a few nits:

Quoted 5 lines
---
  docs/misc/arm/silicon-errata.txt |  2 ++
  xen/arch/arm/cpuerrata.c         | 10 ++++++++++
  2 files changed, 12 insertions(+)
Quoted 11 lines

docs/misc/arm/silicon-errata.txt stable hypervisors. · line 52

Quoted 10 lines
docs/misc/arm/silicon-errata.txt +2 -0
index 6cd1366f15..cf193a6d4d 100644
@@ -48,5 +48,7 @@ stable hypervisors.
  | ARM            | Cortex-A57      | #852523         | N/A                     |
  | ARM            | Cortex-A57      | #832075         | ARM64_ERRATUM_832075    |
  | ARM            | Cortex-A57      | #834220         | ARM64_ERRATUM_834220    |
+| ARM            | Cortex-A57      | #1319537        | N/A
+| ARM            | Cortex-A72      | #1319367        | N/A

Looks like you missed the last |.

I will do it.

Quoted 2 lines

Also, is this "ARM" or "Arm"? I believe you asked me to user the latter.

This patch needs to be backported, so I felt it was better to keep consistency for now. I can add a patch on top to rename all of them.

Quoted 15 lines
Quoted 15 lines
docs/misc/arm/silicon-errata.txt +0 -0
  | ARM            | Cortex-A76      | #1165522        | N/A                     |
  | ARM            | MMU-500         | #842869         | N/A                     |
xen/arch/arm/cpuerrata.c +4 -0
index 6f483b2d8d..da72b02442 100644
@@ -481,6 +481,16 @@ static const struct arm_cpu_capabilities arm_errata[] = {
          .capability = ARM64_WORKAROUND_AT_SPECULATE,
          MIDR_RANGE(MIDR_CORTEX_A76, 0, 2 << MIDR_VARIANT_SHIFT),
      },
+    {
+        .desc = "ARM erratum 1319537",
+        .capability = ARM64_WORKAROUND_AT_SPECULATE,
+        MIDR_ALL_VERSIONS(MIDR_CORTEX_A72),
Quoted 10 lines

xen/arch/arm/cpuerrata.c static const struct arm_cpu_capabilities arm_errata[] = { · line 495

Quoted 8 lines
xen/arch/arm/cpuerrata.c +6 -0
+    },
+    {
+        .desc = "ARM erratum 1319367",
+        .capability = ARM64_WORKAROUND_AT_SPECULATE,
+        MIDR_ALL_VERSIONS(MIDR_CORTEX_A57),
+    },
      {},
  };

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel