[gem5-users] Question about pulling in the latest version of gem5 with the bootcamp 2022 files.

2023-07-22 Thread Beser, Nicholas D. via gem5-users
I am using the bootcamp examples to teach my computer architecture class about 
gem5. I would like to pull in the latest version of gem5 from the github 
location. The command I am using is:

git clone --recursive https://github.com/gem5bootcamp/gem5-bootcamp-env.git

When I compile gem5, Instead of version 23, I am getting gem5 version 22.0.0.0. 
Is there a recommended way of getting the latest version?

Nick
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: potential error in gem5 simulation?

2023-07-22 Thread An Chow Lai via gem5-users
To whom it may concern,

I'm new to gem5, I just downloaded gem5 to simulate some spec benchmarks,
but I encountered something which seems not making sense;
basically, the outcome of the program simulated by gem5 does not match the
outcome of the same program run directly on the machine. The results of two
runs are shown below.
I hope I can get help/corrections from you guys. Thank you.

Sincerely yours,
An-Chow

direct run (which is expected and looks correct to me):
-
../../exe/lbm_r_base.mytest-m64 30 reference.dat 0 0 100_100_130_ldc.of
MAIN_printInfo:
   grid size  : 100 x 100 x 130 = 1.30 * 10^6 Cells
   nTimeSteps : 30
   result file: reference.dat
   action : nothing
   simulation type: lid-driven cavity
   obstacle file  : 100_100_130_ldc.of

LBM_showGridStatistics:
   nObstacleCells:  112539 nAccelCells:   18432 nFluidCells: 1169029
   minRho: 1.00 maxRho: 1.00 Mass: 1.30e+06
   minU  : 0.00 maxU  : 0.00

LBM_showGridStatistics:
   nObstacleCells:  112539 nAccelCells:   18432 nFluidCells: 1169029
   minRho: 0.998947 maxRho: 1.001139 Mass: 1.30e+06
   minU  : 0.00 maxU  : 0.003548

gem5 simulated run (which does not match the direct run above):
--
~/Work/gem5/build/X86/gem5.opt ~/Work/gem5/configs/deprecated/example/se.py
--cmd="../../exe/lbm_r_base.mytest-m64" --option="30  reference.dat 0 0
100_100_130_ldc.of" --mem-size=8GB
gem5 Simulator System.  https://www.gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 23.0.0.1
gem5 compiled Jul 22 2023 09:57:33
gem5 started Jul 22 2023 12:50:00
gem5 executing on Oreo-II, pid 62021

warn: The `get_runtime_isa` function is deprecated. Please migrate away
from using this function.
warn: The se.py script is deprecated. It will be removed in future releases
of  gem5.
warn: The `get_runtime_isa` function is deprecated. Please migrate away
from using this function.
Global frequency set at 1 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file
and pdf.
src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy
stat is a stat that does not belong to any statistics::Group. Legacy stat
is deprecated.
system.remote_gdb: Listening for connections on port 7000
 REAL SIMULATION 
src/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting
simulation...
src/sim/mem_state.cc:443: info: Increasing stack size by one page.
src/sim/syscall_emul.cc:74: warn: ignoring syscall set_robust_list(...)
src/sim/syscall_emul.cc:74: warn: ignoring syscall rseq(...)
src/sim/syscall_emul.cc:74: warn: ignoring syscall mprotect(...)
src/sim/syscall_emul.cc:74: warn: ignoring syscall mprotect(...)
src/sim/syscall_emul.cc:74: warn: ignoring syscall mprotect(...)
src/sim/syscall_emul.cc:74: warn: ignoring syscall mprotect(...)
MAIN_printInfo:
   grid size  : 100 x 100 x 130 = 1.30 * 10^6 Cells
   nTimeSteps : 30
   result file: reference.dat
   action : nothing
   simulation type: lid-driven cavity
   obstacle file  : 100_100_130_ldc.of

LBM_showGridStatistics:
   nObstacleCells:  112539 nAccelCells:   18432 nFluidCells: 1169029
   minRho: 0.00 maxRho: 0.00 Mass: 0.00e+00
   minU  : 0.17 maxU  : 0.235702

LBM_showGridStatistics:
   nObstacleCells:  112539 nAccelCells:   18432 nFluidCells: 1169029
   minRho: 0.00 maxRho: 0.00 Mass: 0.00e+00
   minU  : -nan maxU  :  inf
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Is there any ways for the guest program to communicate with the GEM5 simulator?

2023-07-22 Thread Foobat via gem5-users
I’m profiling an JIT compiler with GEM5 syscall emulation mode. The lifecycle 
of the JIT compiler has several phases: parsing the code, compiling the code, 
setting up runtime environment, running the compiled code, and cleaning up. I 
need to know the cost and some performance statistics of each phase, to find 
out which part needs more optimization. So the guest program need to tell the 
simulator, for example, “I have set up the runtime environment and I’m about to 
run the code”. Dose gem5 provide any ways to do this? Can the guest program 
communicate with the simulator by executing a special instruction, writing to a 
special memory address, or making a special syscall?
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-users] Re: Meltdown simulation & analysis in FS mode using fs.py

2023-07-22 Thread reverent.green--- via gem5-users
Thanks for your replys,

 

I updated my gem5 version to the latest stable branch and the "palignr" warning is gone.

 

@Jason

U mentioned, that gem5 may not even be vulnerable to meltdown. Do you think it is feasible to change some parts of the O3 code in order to make it vulnerable and after that analyze meltdown code?

 

That also means in some runs, gem5 aborts after a few chars and sometimes it does not even leak one char before it aborts.

Maybe I can experiment with debug flags a bit more.

 

Kind regards,

Robin

 
 

Gesendet: Donnerstag, 20. Juli 2023 um 22:38 Uhr
Von: "Hoa Nguyen via gem5-users" 
An: "The gem5 Users mailing list" 
Cc: reverent.gr...@web.de, "Jason Lowe-Power" , "Hoa Nguyen" 
Betreff: [gem5-users] Re: Meltdown simulation & analysis in FS mode using fs.py


Hi all,
 

It appears that you're using an older version of gem5 that does not have the palignr instructions implemented. The current stable branch has those instructions implemented.

 

I'm not sure if this is a problem in your setup or related to this problem, but I wanted to add that I was not able to boot Ubuntu server 22.04 with the previous version of gem5 (v22 I think). I'm able to boot the OS using gem5 v23.

 

Regards,

Hoa Nguyen

 


On Thu, Jul 20, 2023, 09:33 Jason Lowe-Power via gem5-users  wrote:


Hi Robin,
 

This may be helpful: http://www.lowepower.com/jason/visualizing-spectre-with-gem5.html

 

For `warn: instruction 'palignr_Vdq_Wdq_Ib' unimplemented`, this is an AVX (or SSE) instruction that gem5 doesn't implement. 

 

Overall, I'm not sure if gem5 is vulnerable to meltdown. I think that the instruction is squashed when the TLB detects a page table fault and it does not proceed to memory. You can check the O3 code to be sure, though.

 

Cheers,

Jason

 


On Thu, Jul 20, 2023 at 2:52 AM reverent.green--- via gem5-users  wrote:




Hello everyone,

 

I am currently working on a meltdown simulation & analysis using the fs.py script. Using se.py is not possible, because there is no kernel space mapping.

As for the meltdown test code, I'm using this repo: https://github.com/IAIK/meltdown

 

After playing a bit with the multiple parameter options, my current command line call is:

"./build/X86/gem5.opt configs/example/fs.py --cpu-type=X86O3CPU --bp-type=LTAGE --caches --l2cache -n 8 --kernel=fs_stuff/vmlinux-5.4.49 --disk-image=fs_stuff/x86-ubuntu.img --script=fs_stuff/test"

 

As you can see here, I am using the X86O3CPU and the branch predictor LTAGE (mainly because spectre only works using LTAGE). In theory, this should work and the test binary is executed in the simulation, but unfortunately the simulation either stops right before the leak or during the leakage (not at an exact point everytime, sometimes 1 char, sometimes 4 chars). The simulation does not abort by itself but looks like it's stuck somewhere. I waited for over one hour, but there was no extra char leaked.

First I thought something is missing to even leak anything here, but after some tries do in fact leak some parts of the secret before stopping, there should be another problem.

 

When the meltdown code is executed, the console log is spammed with "warn: instruction 'palignr_Vdq_Wdq_Ib' unimplemented"". At first I thought this could be the missing piece, but even with these warnings, some parts of the secret were leaked in some tries.

My first goal is to get the complete leak in the result including a normal exit of the gem5 simulation.

 

Does anyone here have an idea or experience at this topic? It would be very helpful to discuss possible problems and solutions.

 

Thank you very much in advance.

 

Kind regards 

Robin


___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

___ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org


___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org