[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Ciro Santilli via gem5-users
You could download from: http://www.gem5.org/documentation/general_docs/fullsystem/guest_binaries section "Latest Linux Disk Images (recommended)" Personally I normally use Buildroot:

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Ciro Santilli via gem5-users
Can you also try to use the full path to vmlinux.arm64 instead of just basename? I suspect it is currently searching for it on M5_PATH (because not slashes in the path) and finding some broken image there. Better still, get rid of M5_PATH altogether if possible. My full non minimized CLI with

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Ciro Santilli via gem5-users
I don't know exactly what is going on, but I've tested aarch-system-201901106/binaries/vmlinux.arm64 in fs.py and it worked fine. So the exact same script works with the old kernel but not new one? Are you sure that the kernel exists at that path? Also try to GDB/PDB debug it a bit. On Sat, Apr

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Ciro Santilli via gem5-users
OK, also quick grep in kernel code and we can see that -8 and -13 are the same as exec syscall error numbers: #define ENOEXEC 8 /* Exec format error */ #define EACCES 13 /* Permission denied */ not 100% sure what those mean, but worth looking into as well. On Sat, Apr 25, 2020 at 7:13 PM Ciro

[gem5-users] Re: How to use GUEST BINARIES in fs?

2020-04-25 Thread Ciro Santilli via gem5-users
No worries. I would mount the image on host and ensure that the init you think is there is actually there, and that it seems to be right filetype (ISA is ARM, is executable, etc.). And ensure that you are pointing to it with init= kernel CLI parameter. If you don't understand from that, GDB step

[gem5-users] Re: increasing disk image size for full system simulation

2020-04-22 Thread Ciro Santilli via gem5-users
Try libguestfs-tools: https://askubuntu.com/questions/107228/how-to-resize-virtual-machine-disk/481887#481887 It is the easiest method. I think it boots QEMU, mounts the image, and does the resizing operations for you. You may need to add sudo to commands due to this bug:

[gem5-users] Re: Any way to add randomization into full system simulation?

2020-05-18 Thread Ciro Santilli via gem5-users
Maybe you want to look into: m5 readfile, 9P or use two disks as mentioned at: https://cirosantilli.com/linux-kernel-module-cheat/#gem5-restore-new-script On Sun, May 17, 2020 at 9:20 PM HENG ZHUO via gem5-users wrote: > > Hi, > > I am trying to run some benchmark on ARM full system simulation.

[gem5-users] Re: Traces of instructions only.

2020-05-06 Thread Ciro Santilli via gem5-users
Maybe did you mean to use -ExecMicro to remove microops rather than -ExecMacro? E.g. one STP generates 4 microops as shown at: https://cirosantilli.com/linux-kernel-module-cheat/#gem5-execall-trace-format On Wed, May 6, 2020 at 8:54 PM Øivind Harket Bakke via gem5-users wrote: > > Hi all, > >

[gem5-users] Re: Traces of instructions only.

2020-05-06 Thread Ciro Santilli via gem5-users
There is no stupid question around here, ask away :-) On Wed, May 6, 2020 at 10:33 PM Øivind Harket Bakke via gem5-users wrote: > > Dear Santilli, > > that fixed everything except my embarrassment. > Thank you very much, really appriciated! > > Best regards, > Øivind >

[gem5-users] Re: Segmentation fault in gem5,

2020-10-02 Thread Ciro Santilli via gem5-users
Can you provide the URL at which the avatar you refer to is showing? On Fri, Oct 2, 2020 at 6:55 AM 1154063264--- via gem5-users wrote: > > First of all, I thank him for answering my question. However, as a Chinese, > his profile picture does not respect our country. If my behavior affects >

[gem5-users] Re: SE Mode crashing with multithread workload

2020-10-16 Thread Ciro Santilli via gem5-users
One thing to try, that program looks like it needs --num-cpus=5 as it spawns 4 threads (so main + 4 total). From: Bobby Bruce via gem5-users Sent: Thursday, October 15, 2020 10:13 PM To: gem5 users mailing list Cc: Farhad Yusufali ; Bobby Bruce Subject:

[gem5-users] Re: Help in Understanding "Simple.py" Config File

2020-08-25 Thread Ciro Santilli via gem5-users
This gives some pointers on the SimObject Python/C++ interaction which might clarify things: https://stackoverflow.com/questions/62969566/attributes-of-system-object-in-gem5/62970092#62970092 On Tue, Aug 25, 2020 at 2:21 PM Dwaipayan Ray via gem5-users wrote: > > Hello Everyone, > > I am very

[gem5-users] Re: Functional read failed while using pthread lock in program

2020-08-19 Thread Ciro Santilli via gem5-users
Functional reads in Ruby SE are a known and hard to solve problem, see https://gem5.atlassian.net/browse/GEM5-675 and https://gem5.atlassian.net/browse/GEM5-676 On Tue, Aug 18, 2020 at 6:33 PM VIPIN PATEL via gem5-users wrote: > > Hi All, > > I using the GEM5 simulator to collect statistics of a

[gem5-users] Re: [ARM system] Question about the cleassic cache system

2020-08-21 Thread Ciro Santilli via gem5-users
I'm not sure about the cache hierarchy issue. But about Ruby support, I don't think there's any known ARM specific problem, and ARM contributors have been specifically pushing Ruby recently, see e.g. see Tiago's CHI announcement: https://www.gem5.org/2020/05/29/flexible-cache.html

[gem5-users] Re: Segmentation fault in gem5,

2020-10-01 Thread Ciro Santilli via gem5-users
Please provide fuller reproduction details. On Thu, Oct 1, 2020 at 8:39 AM 1154063264--- via gem5-users wrote: > > I am trying to run parsec in MESI_Three_Level-gem5.opt for ARM architecture > in FS mode, but I am getting a segmentation fault. > > info: Entering event queue @ 25592214185500.

[gem5-users] Re: Segmentation fault in gem5,

2020-10-03 Thread Ciro Santilli via gem5-users
GEM5/issues) to >>>> see if anything similar has been >>>> reported. If you can't find any similar issues, we welcome your >>>> question, but it's most helpful when we can reproduce the problem :). >>>> 4. The gem5 project has a code of conduct ( >>>

[gem5-users] Re: Segmentation fault in gem5,

2020-10-03 Thread Ciro Santilli via gem5-users
e can reproduce the problem :). >>> 4. The gem5 project has a code of conduct ( >>> https://gem5.googlesource.com/public/gem5/+/refs/heads/stable/CODE-OF-CONDUCT.md). >>> Specifically it says our standards include "Demonstrating empathy and >>> kindness towa

[gem5-users] Re: Tracking read()/write() system calls in gem5

2020-09-23 Thread Ciro Santilli via gem5-users
Also have a look at --debug-flags SyscallBase,SyscallVerbose On Tue, Sep 22, 2020 at 8:26 PM ABD ALRHMAN ABO ALKHEEL via gem5-users wrote: > > Hi All, can I track the read()/write() system calls in GEM5 in SE mode? If > so, how I can do that? Any help would be appreciated. Thanks >

[gem5-users] Re: How to use the new libm5.a

2020-10-27 Thread Ciro Santilli via gem5-users
Hi Wenqi, Have you tried: https://stackoverflow.com/questions/62757008/how-to-use-m5-in-gem5-20/62759204#62759204 or has something changed since then too? Seems to work on develop just now. From: wqyin--- via gem5-users Sent: Sunday, October 25, 2020 7:36 PM

[gem5-users] Re: track the write syscall in the kernel

2020-10-27 Thread Ciro Santilli via gem5-users
On full system you can also try to instrument the syscall function symbol, we do something analogous for panic detection: https://github.com/gem5/gem5/blob/f28b2e773f2ee97bf9c755b33aef9befc052d281/src/arch/arm/linux/fs_workload.cc#L207 From: ABD ALRHMAN ABO

[gem5-users] How to use the memory address version of m5ops such as m5_exit_addr in an external C progam?

2020-10-27 Thread Ciro Santilli via gem5-users
Hi, I have m5_exit working on a C program at https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/simple/m5_exit.c#41 but now I wanted to create one using the memory address version. We already have a m5_exit_addr symbol defined in the library, but I couldn't find it

[gem5-users] Re: Need help in compiling the kernel

2020-07-22 Thread Ciro Santilli via gem5-users
To compile kernel see e.g.: https://raspberrypi.stackexchange.com/questions/192/how-do-i-cross-compile-the-kernel-on-a-ubuntu-host but replace arm with arm64 and the compile with the aarch64 one for 64-bit arm. All other ISAs are analogous. The ARM configs are in-tree of the official arm gem5

[gem5-users] Re: gem5 aborted when increase mem-size in FS mode

2020-08-06 Thread Ciro Santilli via gem5-users
Does it crash immediately? If so, provide to us and look at the backtrace to try and determine which allocation fails. If that doesn't help, you can also try techniques mentioned at: https://stackoverflow.com/questions/6261201/how-to-find-memory-leak-in-a-c-code-project/57877190#57877190 On Thu,

[gem5-users] Re: Error only occurs with higher number of clusters and cpus

2020-08-07 Thread Ciro Santilli via gem5-users
It might be the same as: https://gem5.atlassian.net/browse/GEM5-711 I want to investigate that soon hopefully. If you try Ruby and it fails, please open a separate bug, we want it to work as well  From: Sebastian Block via gem5-users Sent: Friday, August 7,

[gem5-users] Re: Supplementing experiment Data///答复: How to make scheduleInstStop() function to stop simulate at an accurate expected instructions counts for one core KVM/ATOMIC/O3 CPU simulation?

2020-08-10 Thread Ciro Santilli via gem5-users
Hi Yichao, How are you counting the instructions? --debug-flags ExecAll? If so, are you excluding pseudo instructions with --debug-flags ExecAll,ExecMicro? From: Liyichao via gem5-users Sent: Monday, August 10, 2020 5:29 AM To: gem5-users@gem5.org Cc: Liyichao

[gem5-users] Re: Memory Addresses in Gem5

2020-08-12 Thread Ciro Santilli via gem5-users
I recommend that you have a look at the source of how AtomicSimpleCPU does an ifetch under Eclipse. It should be easy to understand everything quickly from there. The Packet address is physical (which notably what caches and DRAM work on), just have a look at the constructor of packet:

[gem5-users] Re: Error only occurs with higher number of clusters and cpus

2020-08-11 Thread Ciro Santilli via gem5-users
We have to understand the root cause to be sure, it often happens that memory errors are just hidden by random changes. Let's move all discussion to that ticket. I've started dumping some logs for it and linked to the ticket BTW. From: Sebastian Block Sent:

[gem5-users] Re: ARM full-system simulation error during checkpoint: rcu_preempt detected stalls on CPUs/tasks

2020-07-09 Thread Ciro Santilli via gem5-users
I'm not aware of this, please provide further reproduction details on JIRA (which kernel, full gem5 CLIs, gem5 git version) and we'll have a look. From: Choe, Jiwon via gem5-users Sent: Wednesday, July 8, 2020 5:35 PM To: gem5 users mailing list Cc: Choe, Jiwon

[gem5-users] Re: What is miscellaneous register

2020-07-08 Thread Ciro Santilli via gem5-users
Also, in ARM more specifically, you can see miscregs at https://github.com/gem5/gem5/blob/cc3e12b504c20b3bc78db52059d3f4f9b02dfbe8/src/arch/arm/miscregs.hh#L56 Most are what the ARM manuals call "System Registers", but a few others are just convenient ways to implement other ISA features like

[gem5-users] Re: 2 level TLB in ARM Full System with Ruby

2020-07-08 Thread Ciro Santilli via gem5-users
Shehab, sorry for the delay, I had to check a few things about this, First, are you aware that there is a not-yet-merged patch that implements a two level TLB at: https://github.com/giactra/gem5/commit/3022ecc8a06a9182b2cf1936941901a785c1b21d ? It hasn't been merged because we noticed that it

[gem5-users] Re: Benchmark terminating early

2020-07-13 Thread Ciro Santilli via gem5-users
SE I suppose? It seems that the benchmark ends normally with an exit syscall, I would start by looking at --debug-flags SyscallBase to double check that. Then if that is the case, the only explanation is that some value is getting corrupted somewhere due to a gem5 bug. So I would try to: 1)

[gem5-users] Re: How to check ...

2020-07-03 Thread Ciro Santilli via gem5-users
Describe your model briefly here/discuss on a review request if you already have code? :-) On Thu, Jul 2, 2020 at 11:39 PM Anuj Falcon via gem5-users wrote: > > How to know if my CPU model qualifies to be upstreamed with the rest of the > CPU models in gem 5 ? >

[gem5-users] Fwd: How to check ...

2020-07-03 Thread Ciro Santilli via gem5-users
Forwarding reply to mailing list. -- Forwarded message - From: Anuj Falcon Date: Fri, Jul 3, 2020 at 8:05 AM Subject: Re: [gem5-users] How to check ... To: Ciro Santilli Below is the link to the GEM5 model. (Public) https://gitlab.com/shaktiproject/tools/core-models-gem5 On

[gem5-users] Re: Using hack_back_ckpt for checkpoint restoring

2020-07-10 Thread Ciro Santilli via gem5-users
Related: https://stackoverflow.com/questions/58886672/bad-function-call-m5-event-simulateargs-kwargs-when-running-full-system-b On Fri, Jul 10, 2020 at 1:44 AM Aditya Narayan via gem5-users wrote: > > Hi, > > I am running into issues when using the script "hack_back_ckpt.rcS" to create > a

[gem5-users] Re: dump out the register value of each instruction

2020-07-09 Thread Ciro Santilli via gem5-users
One option might be to --debug-flags Registers and look up to latest register modification. See also --debug-help. On Thu, Jul 9, 2020 at 6:19 PM Shougang Yuan via gem5-users wrote: > > Hi, All, > > I want to dump out the source register and destination register value of each > instruction.

[gem5-users] Re: How to add shared libs that used by benchmarks to the simulator

2020-06-08 Thread Ciro Santilli via gem5-users
Syscall emulation or full system? On Sun, Jun 7, 2020 at 10:01 PM Shougang Yuan via gem5-users wrote: > > HI, All, > > I am trying to run some benchmarks that need some shared libs, and these > shared libs are imported by setting the environment variables > "LD_LIBRARY_PATH" if I run it on

[gem5-users] Re: How to add shared libs that used by benchmarks to the simulator

2020-06-08 Thread Ciro Santilli via gem5-users
--redirects can be used multiple times. But not 100% sure it will be able to replace LD_LIBRARY_PATH. Just one thing worth trying along --redirects /path/in/ld/libray/path=/usr/lib --env does change env vars, but not 100% sure is it enough to make LD_LIBRARY_PATH work. In theory it might, but not

[gem5-users] Re: How to add shared libs that used by benchmarks to the simulator

2020-06-08 Thread Ciro Santilli via gem5-users
Have you tried --redirects as mentioned at https://stackoverflow.com/questions/5054/how-to-run-a-dynamically-linked-executable-syscall-emulation-mode-se-py-in-gem5/50696098#50696098 ? On Mon, Jun 8, 2020 at 2:31 PM Shougang Yuan wrote: > > In syscall emulation mode. I tried to use --env

[gem5-users] Re: How to add shared libs that used by benchmarks to the simulator

2020-06-08 Thread Ciro Santilli via gem5-users
OK, the previous --redirects idea makes no sense, nevermind, I wish I could edit emails. On Mon, Jun 8, 2020 at 4:39 PM Ciro Santilli wrote: > > --redirects can be used multiple times. But not 100% sure it will be > able to replace LD_LIBRARY_PATH. Just one thing worth trying along > --redirects

[gem5-users] Re: How to modify the simulator to load shared libs

2020-06-09 Thread Ciro Santilli via gem5-users
--redirects /lib64=/path/to/where/you/symlinked/everything The linker will search in /lib64 normally, then gem5 will redirect that file read to the path with all symlinks. On Tue, Jun 9, 2020 at 3:26 PM Shougang Yuan wrote: > > Hi, Crio, > > Could you please give more hints about redirect

[gem5-users] Re: How to modify the simulator to load shared libs

2020-06-09 Thread Ciro Santilli via gem5-users
Hmmm, it is there on develop: https://github.com/gem5/gem5/blob/96fce476785a834f102ae69a895e661cf08e47cd/configs/common/Options.py#L402 On Tue, Jun 9, 2020 at 4:31 PM Shougang Yuan wrote: > > I tried as you said, but the error message is "error: no such option: > --redirects", and I check the

[gem5-users] Re: Newly copied files are truncated in gem5 FS mode

2020-06-04 Thread Ciro Santilli via gem5-users
Are you mounting and modifying the disk on the host while gem5 is using it at the same time? That likey cannot work because the Linux kernel representation of guest and host will differ. Also gem5 does not write back to disk. The file sharing mechanisms I know to modify guest visible files from

[gem5-users] Re: Running Gem5/Ruby tests

2020-06-02 Thread Ciro Santilli via gem5-users
It does look like your host's library is not compatible with whatever was used to compile that C hello world. You can't in general download and run dynamically linked programs built for other toolchains, you either have to build it yourself (often the easiest thing to do) or somehow obtain a

[gem5-users] Re: How to modify the simulator to load shared libs

2020-06-09 Thread Ciro Santilli via gem5-users
One thing to try if you are desperate: symlink every needed shared library into a directory, and then redirect /lib64 or that directory. I'm pretty sure this should work. I'm not sure why LD_LIBRARY_PATH does not work. I would dig dieeper and try to understand that, theoretically it feels like it

[gem5-users] Re: Resume checkpoint generation from another checkpoint

2020-07-25 Thread Ciro Santilli via gem5-users
Why wouldn't it work :-)? Have you tried/how it fails? How did execution terminate Ctrl + C or a guest event? On Sat, Jul 25, 2020 at 7:13 AM as3mx--- via gem5-users wrote: > > Hi > > I wanted to know if it is possible to resume the checkpoint generation from > the last checkpoint generated.

[gem5-users] Re: Fwd: How calculate power in gem5?

2020-07-26 Thread Ciro Santilli via gem5-users
Hi, is this different from: https://www.mail-archive.com/gem5-users@gem5.org/msg18093.html If not, please don't repost so soon, and ping previous thread instead. I'm preparing to learn/ask around if no one replies. On Sun, Jul 26, 2020 at 9:08 AM faridehziaee via gem5-users wrote: > > > > Hi

[gem5-users] Re: Current status of gem5 capabilities regarding multicores full system simulation

2020-07-28 Thread Ciro Santilli via gem5-users
Welcome back Nathanael! We put great importance on ARM Linux kernel boot, and we try to make it so that it either works or at least we have a bug report for it. I reproduce the problem with VExpress_GEM5_V2 but not VExpress_GEM5_V1, opening a but for V2 at:

[gem5-users] Re: How to use eclipse or any other IDE to debug user code in GEM5

2020-07-21 Thread Ciro Santilli via gem5-users
https://stackoverflow.com/questions/61656709/how-to-setup-eclipse-ide-for-gem5-development On Mon, Jul 20, 2020 at 12:25 PM Muhammad Aamir via gem5-users wrote: > > Hi everyone, > > I have been following this >

[gem5-users] Re: Restoring from checkpoint in gem5 x86 FS

2020-08-15 Thread Ciro Santilli via gem5-users
On Sat, Aug 15, 2020 at 6:44 PM Chandrahas Tirumalasetty via gem5-users wrote: > > Hello, > I am trying to restore from a checkpoint (created with AtomicSimpleCPU) with > cpu-type DerivO3CPU in my gem5 setup. I have two questions mainly > > Is it allowed to create a checkpoint with

[gem5-users] Re: Memory Addresses in Gem5

2020-08-15 Thread Ciro Santilli via gem5-users
On Sat, Aug 15, 2020 at 9:54 PM ABD ALRHMAN ABO ALKHEEL wrote: > > Hi Ciro, > > Could you tell me where can i find the file that does an ifetch for > AtomicsimpleCPU in gem5? > https://github.com/gem5/gem5/blob/fa70478413e4650d0058cbfe81fd5ce362101994/src/cpu/simple/atomic.cc#L673 up to

[gem5-users] Re: How to use the new libm5.a

2020-11-02 Thread Ciro Santilli via gem5-users
BTW I pushed a patch exposing m5_exit_addr at: https://gem5-review.googlesource.com/c/public/gem5/+/36896 And after that this should work on KVM https://gem5-review.googlesource.com/c/public/gem5-resources/+/36677/1 From: Gabe Black via gem5-users Sent:

[gem5-users] Re: SE Mode and Std::thread

2020-11-02 Thread Ciro Santilli via gem5-users
Daniel, if you manage to reproduce on clean develop, please also open an issue at https://gem5.atlassian.net/jira/software/c/projects/GEM5/issues I'd also be curious to see if it reproduces on se.py (so I could see if it also happens on ARM). We've had some ARM-specific SE issues e.g. at

[gem5-users] Re: File sizes of simulators generated by test script are much larger than those built by manual scons commands

2020-11-02 Thread Ciro Santilli via gem5-users
Yes, I had also previously observed that debug symbols make the huge majority of the executable's size, and for some reason much more so in .opt than in debug (presumably it takes more information to map back optimized code to source). You can confirm that by using strip gem5.opt or gcc- s

[gem5-users] Re: How to create serial terminal when creating disk images?

2020-11-05 Thread Ciro Santilli via gem5-users
This is one of the things I've never had the patience to figure out, some ideas: * investigate in QEMU first as it is much faster * look into busybox's init code From: Chao Fu via gem5-users Sent: Wednesday, November 4, 2020 3:12 PM To: