Bobby R. Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/43143 )

Change subject: arch-arm: Fix atomics permission checks in TLB
......................................................................

arch-arm: Fix atomics permission checks in TLB

For stage 2 translations, atomic accesses were not checking the
access permission bits in the page table descriptors, and were
instead wrongly using the nature of the request itself
(r/w booleans).

Cherry-picked from:
https://gem5-review.googlesource.com/c/public/gem5/+/42073

Change-Id: I919a08b690287b03426d9124a61887e521f47823
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43143
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/arm/tlb.cc
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc
index 413a13e..a09c953 100644
--- a/src/arch/arm/tlb.cc
+++ b/src/arch/arm/tlb.cc
@@ -772,8 +772,7 @@
             // sctlr.wxn overrides the xn bit
             grant = !wxn && !xn;
         } else if (is_atomic) {
-            grant = r && w;
-            grant_read = r;
+            grant = hap;
         } else if (is_write) {
             grant = hap & 0x2;
         } else { // is_read

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/43143
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: hotfix-v20-1-0-5
Gerrit-Change-Id: I919a08b690287b03426d9124a61887e521f47823
Gerrit-Change-Number: 43143
Gerrit-PatchSet: 3
Gerrit-Owner: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to