isa/caller: enable host-backed memory for scemu
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 18 Oct 2023 15:32:37 +0000 (18:32 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 22 Dec 2023 19:26:21 +0000 (19:26 +0000)
src/openpower/decoder/isa/caller.py

index 5a72880f3d7c8db993c009325ad87b47b7990425..0c9b0e601a876facee89f912658efc1f63de3532 100644 (file)
@@ -1169,7 +1169,13 @@ class ISACaller(ISACallerHelper, ISAFPHelpers, StepLoop):
                  insnlog=None,
                  use_mmap_mem=False,
                  use_syscall_emu=False):
-        self.syscall = SyscallEmulator(isacaller=self)
+        if use_syscall_emu:
+            self.syscall = SyscallEmulator(isacaller=self)
+            if not use_mmap_mem:
+                log("forcing use_mmap_mem due to use_syscall_emu active")
+                use_mmap_mem = True
+        else:
+            self.syscall = None
 
         # trace log file for model output. if None do nothing
         self.insnlog = insnlog