Matthew Poremba has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/56366 )
Change subject: sim-se: Initialize shared page table base upon clone
......................................................................
sim-se: Initialize shared page table base upon clone
When the clone syscall is called, a new process is created which
allocates a new page table. If clone was called with CLONE_THREAD, the
page table of that new process is then marked as shared. Next, initState
is called on the process which calls the page table's initState. For the
multi level page table, initState only sets the base pointer if shared
is false. This means that in this order the base pointer of the new page
table is not currently initialized causing spurious errors.
To fix this, the page table is explicitly initialized after the new
process and new page table are created but before the page table is
marked as shared. The process initState continues as normal and the new
page table's base pointer is not modified by further calls to initState
as it is already marked shared.
Change-Id: I4a533e13565fa572fb9153a926f70958bc7488b7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56366
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Reviewed-by: Matt Sinclair <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/sim/syscall_emul.hh
1 file changed, 29 insertions(+), 0 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
Matt Sinclair: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 546ae75..3fe1cf0 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -1672,6 +1672,7 @@
}
if (flags & OS::TGT_CLONE_THREAD) {
+ cp->pTable->initState();
cp->pTable->shared = true;
cp->useForClone = true;
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/56366
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I4a533e13565fa572fb9153a926f70958bc7488b7
Gerrit-Change-Number: 56366
Gerrit-PatchSet: 3
Gerrit-Owner: Matthew Poremba <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Kyle Roarty <[email protected]>
Gerrit-Reviewer: Matt Sinclair <[email protected]>
Gerrit-Reviewer: Matthew Poremba <[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