Open Yujie-Cui opened 1 year ago
Hi Yujie,
I'm sorry I don't have enough time to properly review exactly how your setup is failing, but I recommend the two following approaches:
thank you very much!!! You've helped me with several questions. I really appreciate it.
I didn't know that I could use QEMU to run images. It is always stuck when running with gem5.
I tried what you wrote.
I found that it was the image problem. I have successfully run fs mode. And I successfully generated checkpoint. But I still have some confusion.
The following is my command to generate checkpoint.
/usr/local/src/gem5/build/X86/gem5.opt /usr/local/src/gem5/configs/example/fs.py --kernel=/usr/local/src/gem5/full_system_image/binaries/vmlinux-
4.19.83 --disk-image=/usr/local/src/gem5/full_system_image/disks/boot-exit.img --checkpoint-dir=/usr/local/src/gem5/runScripts/attack_spectre/fs_
mode/../checkpoint/fs_checkpoint_simple --script=/home/gem5/run.sh
-- restore_ with_ CPU
option, I must use AtomicSimpleCPU. Otherwise, segment error will be reported directly. When I use -- restore_ with_ CPU
and -- cpu_ Type
at the same time, if the two options are inconsistent, segment errors will occur directly. When the two options are the same, I can use other CPU types. I also see your answer here(https://stackoverflow.com/questions/49011096/how-to-switch-cpu-models-in-gem5-after-restoring-a-checkpoint-and-then-observe-t). But I still don't understand the difference between the two options. Here are the commands I ran successfully./usr/local/src/gem5/build/X86/gem5.opt /usr/local/src/gem5/configs/example/fs.py --kernel=/usr/local/src/gem5/full_system_image/binaries/vmlinux-4.19.83 --disk-image=/usr/local/src/gem5/full_system_image/disks/gem5-boot.img --checkpoint-dir=/usr/local/src/gem5/runScripts/attack_spectre/fs_mode/../checkpoint/fs_checkpoint_simple --checkpoint-restore=1 --l1d_size=32kB --restore-with-cpu=DerivO3CPU --cpu-type=DerivO3CPU --l1d_assoc=8 --l1i_size=32kB --l1i_assoc=4 --l2_assoc=16 --l2_size=2MB --caches --l2cache --script=/home/gem5/run.sh
Really Thanks!!!
Hi,
I'm trying to use the full system to do some experiments.
I used the boot-exit image and vmlinux-5.4.49 provided by this website(https://gem5art.readthedocs.io/en/latest/tutorials/boot-tutorial.html)
I first tried using the terminal script that comes with gem5.
In one of the terminals I execute:
I execute in another terminal:
util/term/m5term localhost 3456
After that, I successfully entered, although I waited for dozens of minutes.
I can enter commands normally.
. But i want to run my program. I don't want to have to enter the terminal every time, that would be too slow.
For boot-exit images:
/root/init.sh
instruction at the end of /root/.bashrc file. In this way, the init.sh script will be executed every time the system is entered.I executed the following command:
/usr/local/src/gem5/build/X86/gem5.opt --debug-flags=CacheAll --debug-file=/usr/local/src/gem5/runScripts/attack_spectre/trace2.out /usr/local/src/gem5/configs/example/fs.py --kernel=../../full_system_image/binaries/vmlinux-4.19.83 --disk-image=../../full_system_image/disks/boot-exit.img --l1d_replacement=LRU --mem-size=4GB --l1d_size=32kB --l1d_assoc=8 --l1i_size=32kB --l1i_assoc=4 --l2_assoc=16 --l2_size=2MB --caches --l2cache --cpu-type=DerivO3CPU --script=/root/run_hello.sh
The process will always be stuck here.
It seems to keep waiting for a terminal connection.
If I don't connect, it just waits until. When I connect(
util/term/m5term localhost 3456
), it will show that there is a terminal connected.When I type m5 exit in the connected terminal, it ends on both sides.
What should I do to run my code without connecting to a terminal?
thank you very much! ! !