InvisiSpec-1.0 icon indicating copy to clipboard operation
InvisiSpec-1.0 copied to clipboard

How to use the example scripts?

Open mytbk opened this issue 6 years ago • 2 comments

I'm currently doing some research on defending against Spectre. I'd like to reproduce the results of InvisiSpec. I'm new to gem5. Sorry for asking you about using the experiment environment.

I saw in the example script run_spec_from_ckpt.sh that you use --checkpoint-restore=10000000000. Does this mean the skip the first 10 billion instructions; then, we simulate 1 billion instructions in the paper? And if I use --take-checkpoints=10000000000 to take a checkpoint running the unsafe baseline processor, can I use this checkpoint to run on other processors like IS-Sp?

mytbk avatar Feb 25 '19 14:02 mytbk

Sorry for replying late.

Yes, you can use different configurations IS-Sp/Fu-Sp etc on the same checkpoints. You can generate a checkpoint using "--take-checkpoints=N --at-instruction" if you want to skip the first N instructions. Please consult complete commands you should use from the gem5 mannual website. Then you can do detailed simulation using "--checkpoint-restore=N --at-instruction --maxinsts=M" if you want to do detailed simulation for M instructions. Hope it helps.

mjyan0720 avatar Mar 21 '19 02:03 mjyan0720

Thanks. I'm now using AtomicSimpleCPU to make a checkpoint. I think it's also needed to set the ruby cache parameters, I think the configuration in the paper is:

diff --git a/configs/ruby/MESI_Two_Level.py b/configs/ruby/MESI_Two_Level.py
index 65d711e5e..44118be2d 100644
--- a/configs/ruby/MESI_Two_Level.py
+++ b/configs/ruby/MESI_Two_Level.py
@@ -37,8 +37,13 @@ from Ruby import send_evicts
 #
 # Declare caches used by the protocol
 #
-class L1Cache(RubyCache): pass
-class L2Cache(RubyCache): pass
+class L1Cache(RubyCache):
+    tagAccessLatency = 1
+    dataAccessLatency = 1
+
+class L2Cache(RubyCache):
+    tagAccessLatency = 8
+    dataAccessLatency = 8
 
 def define_options(parser):
     return

mytbk avatar Apr 23 '19 01:04 mytbk