Thanks Pedro, It seems like you are getting an undefined instruction. What is probably happening is your host CPU having a feature which is not implemented in gem5, so when you switch to the guest(gem5) the sandboxing check is skipped and an exception is thrown. As you are happy with your current setup, I won't try to investigate further. In case you were interested on fixing it in the future, it should be relatively easy to debug it via gdb or with DFLAGS (by printing the instruction causing the undef exception)
I would be happy to provide further assistance in that case Kind Regards Giacomo > -----Original Message----- > From: Pedro Becker via gem5-users <gem5-users@gem5.org> > Sent: 02 June 2021 10:22 > To: gem5-users@gem5.org > Cc: Pedro Becker <pe...@ac.upc.edu> > Subject: [gem5-users] Re: Boot FS with kvm and multiple cores > > Modify guest binary so init script points to init.gem5.addr > > Then run: > > $ export M5_PATH=/scratch/pedro/aarch-system-20210904 > > $ ./build/ARM/gem5.opt configs/example/arm/fs_bigLITTLE.py --big-cpus 2 - > -little-cpus 0 --cpu-type kvm --disk /scratch/pedro/ubuntu-18.04-arm64- > 8gb.img --kernel /scratch/pedro/aarch-system- > 20210904/binaries/vmlinux.arm64 --bootscript configs/boot/my_script.rcS > > > > Hi again Giacomo, thanks for the suggestions. > > I had tried with fs_bigLITTLE.py before as well, although I haven't reported > it > here. > I just re-run it now to provide you the outputs. Here are the steps I > followed: > > i) Made sure init script points to init.gem5.addr in the Linux guest binary > so I > can use m5ops with KVM > > ii) clear m5out folder to remove any older data rm -rf m5out/* > > iii) export the M5_PATH in the terminal > export M5_PATH=/scratch/pedro/aarch-system-20210904 > > iv) run kvm multicore (2 cores in this case) script with kvm: > > ./build/ARM/gem5.opt configs/example/arm/fs_bigLITTLE.py --big-cpus 2 -- > little-cpus 0 --cpu-type kvm --disk /scratch/pedro/ubuntu-18.04-arm64- > 8gb.img --kernel /scratch/pedro/aarch-system- > 20210904/binaries/vmlinux.arm64 --bootscript configs/boot/my_script.rcS -- > kvm-userspace-gic > > v) restore the generated checkpoint with atomic cpu (left the --kvm- > userspace-gic just in case it kvm is necessary to perform the checkpoint > restoration) > > ./build/ARM/gem5.opt configs/example/arm/fs_bigLITTLE.py --big-cpus 2 -- > little-cpus 0 --cpu-type atomic --disk /scratch/pedro/ubuntu-18.04-arm64- > 8gb.img --kernel /scratch/pedro/aarch-system- > 20210904/binaries/vmlinux.arm64 --restore m5out/cpt.9399620558500 -- > kvm-userspace-gic > gem5 Simulator System. http://gem5.org > gem5 is copyrighted software; use the --copyright option for details. > > gem5 version [DEVELOP-FOR-V21.1] > gem5 compiled May 20 2021 19:51:48 > gem5 started Jun 2 2021 10:53:57 > gem5 executing on agx, pid 1893 > command line: ./build/ARM/gem5.opt configs/example/arm/fs_bigLITTLE.py > --big-cpus 2 --little-cpus 0 --cpu-type atomic --disk /scratch/pedro/ubuntu- > 18.04-arm64-8gb.img --kernel /scratch/pedro/aarch-system- > 20210904/binaries/vmlinux.arm64 --restore m5out/cpt.9399620558500 -- > kvm-userspace-gic > > Global frequency set at 1000000000000 ticks per second > info: Simulated platform: VExpress_GEM5_V1 > warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports` > warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports` > warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports` > warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports` > warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports` > warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports` > warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports` > warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports` > info: Restoring from checkpoint m5out/cpt.9399620558500 > warn: No dot file generated. Please install pydot to generate the dot file and > pdf. > build/ARM/sim/kernel_workload.cc:43: info: kernel located at: > /scratch/pedro/aarch-system-20210904/binaries/vmlinux.arm64 > system.vncserver: Listening for connections on port 5900 > system.terminal: Listening for connections on port 3456 > system.realview.uart1.device: Listening for connections on port 3457 > system.realview.uart2.device: Listening for connections on port 3458 > system.realview.uart3.device: Listening for connections on port 3459 > 0: system.remote_gdb: listening for remote gdb on port 7000 > 0: system.remote_gdb: listening for remote gdb on port 7001 > build/ARM/dev/arm/energy_ctrl.cc:249: warn: Existing EnergyCtrl, but no > enabled DVFSHandler found. > build/ARM/sim/simulate.cc:104: info: Entering event queue @ > 9400620568500. Starting simulation... > simulate() limit reached @ 18446744073709551615 > > > Output in m5out/system.terminal > > [ 8.886724] ------------[ cut here ]------------ > [ 8.886729] kernel BUG at /work/gem5- > scripts/submodules/linux/arch/arm64/kernel/entry.S:602! > [ 8.886735] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP > [ 8.886739] Modules linked in: > [ 8.886744] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.18.0+ #1 > [ 8.886749] Hardware name: V2P-CA15 (DT) > [ 8.886753] pstate: 80400085 (Nzcv daIf +PAN -UAO) > [ 8.886758] pc : el1_undef+0x10/0x14 > [ 8.886763] lr : el1_undef+0x10/0x14 > [ 8.886766] sp : ffffff8008ab3d60 > [ 8.886770] x29: ffffff8008ab3e90 x28: ffffffc07c492400 > [ 8.886777] x27: 0000000000000000 x26: ffffffc07c492960 > [ 8.886784] x25: ffffff800872a844 x24: 0000000000000000 > [ 8.886791] x23: 0000000060400085 x22: ffffff80080863cc > [ 8.886797] x21: ffffff8008ab3ea0 x20: 0000007fffffffff > [ 8.886804] x19: ffffffc07c45ec00 x18: 0000000000001800 > [ 8.886811] x17: 0000000000001400 x16: ffffffbf01ef9840 > [ 8.886818] x15: 0000000000000000 x14: 0000000000000000 > [ 8.886824] x13: 0000000000000000 x12: 0000000000000000 > [ 8.886831] x11: 0000000000000000 x10: 0000000000000000 > [ 8.886837] x9 : 0000000000000000 x8 : 0000000000000000 > [ 8.886844] x7 : 0000000000000000 x6 : ffffffc07bdef458 > [ 8.886851] x5 : 00000040765ec000 x4 : 0000000000000004 > [ 8.886857] x3 : 0000000000000003 x2 : 0000000000000003 > [ 8.886864] x1 : fc338aeb8215d100 x0 : 0000000000000000 > [ 8.886871] Process swapper/1 (pid: 0, stack limit = 0x(____ptrval____)) > [ 8.886875] Call trace: > [ 8.886880] el1_undef+0x10/0x14 > [ 8.886885] uao_thread_switch+0x14/0x20 > [ 8.886889] __schedule+0x198/0x538 > [ 8.886894] schedule_idle+0x1c/0x38 > [ 8.886899] do_idle+0x190/0x290 > [ 8.886904] cpu_startup_entry+0x20/0x28 > [ 8.886909] secondary_start_kernel+0x178/0x1b8 > [ 8.886913] ------------[ cut here ]------------ > [ 8.886918] kernel BUG at /work/gem5- > scripts/submodules/linux/arch/arm64/kernel/entry.S:602! > > > The file 'configs/boot/my_script.rcS' has the following: > > #!/bin/sh > echo "hello" > echo "test" > file.txt > sleep 5 > /sbin/m5 --addr 0x10010000 checkpoint > echo "hello again" > echo "test2" >> file.txt > /sbin/m5 --addr 0x10010000 writefile file.txt from_gem5_file.txt > /sbin/m5 --addr 0x10010000 exit > > In fact, the error occurs even if I set --big-cores 1. > > If I try it without --kvm-userspace-gic, then I'll get similar kernel BUG > output > if more than 1 core, or the simulation will never advance (without any output > in m5out/system.terminal) if a single core. > > So in summary I'm getting similar results to fs.py. > > But since you can do all of this, I must have some errors in my aarch64 setup. > For now, I'm going with x86 because it's working and my experiments with > gem5 (so far at least) will be more or less ISA independent. > But please let me know if you want more info from my setup. > > Again, thanks. > Pedro. > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an > email to gem5-users- > le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s