cwfletcher / stt

BSD 3-Clause "New" or "Revised" License
34 stars 11 forks source link

Full system simulation capability #2

Open sabbaghm opened 4 years ago

sabbaghm commented 4 years ago

How can we perform a full system simulation with STT add-ons? Is it supported?

I tried different kernel versions through the regular full system simulation flow and the simulation runs into boot panic.

jiyongyu commented 4 years ago

Yes we did full system simulation with STT-gem5 and did not run into any problem. The kernel and disk image we used is this: http://www.cs.utexas.edu/~cart/parsec_m5/ I suggest you try the full system simulation on the gem5 commit that STT starts from, and then try it on STT.

sabbaghm commented 4 years ago

I tried the following command on both the original commit in the STT repo ("first commit") and the latest STT commit:

./build/X86_MESI_Two_Level/gem5.opt configs/example/fs.py --disk-image=/tmp/full-system-simulation/disks/x86root-parsec.img --kernel=/tmp/full-system-simulation/binaries/x86_64-vmlinux-2.6.28.4-smp

Both simulations stock at this status:

Global frequency set at 1000000000000 ticks per second warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes) info: kernel located at: /home/majid/apps/gem5/full-system-simulation/binaries/x86_64-vmlinux-2.6.28.4-smp Listening for com_1 connection on port 3456 0: rtc: Real-time clock set to Sun Jan 1 00:00:00 2012 0: system.remote_gdb: listening for remote gdb on port 7000 warn: Reading current count from inactive timer. REAL SIMULATION info: Entering event queue @ 0. Starting simulation... warn: Don't know what interrupt to clear for console. warn: instruction 'wbinvd' unimplemented warn: x86 cpuid: unknown family 0x4000 warn: x86 cpuid family 0x0000: unimplemented function 13

Any idea on how to resolve this? should I pass any special arguments to fs.py for this to boot up?




Kernel boot log:

WARNING: at arch/x86/kernel/cpu/mtrr/main.c:1604 mtrr_trim_uncached_memory+0x327/0x32b() WARNING: strange, CPU MTRRs all blank? Modules linked in: Pid: 0, comm: swapper Not tainted 2.6.28-rc4-dirty #5 Call Trace: [] warn_slowpath+0xc0/0x100 [] vsnprintf+0x268/0x6b0 [] vsnprintf+0x268/0x6b0 [] up+0xd/0x40 [] release_console_sem+0x1ae/0x200 [] post_set+0x20/0x40 [] mtrr_trim_uncached_memory+0x327/0x32b [] printk+0x40/0x45 [] setup_arch+0x381/0x5c3 [] start_kernel+0x6e/0x321 [] x86_64_start_kernel+0xd9/0xdd ---[ end trace 4eaa2a86a8e2da22 ]--- init_memory_mapping: 0000000000000000-0000000020000000 last_map_addr: 20000000 end: 20000000 (4 early reservations) ==> bootmem [0000000000 - 0020000000]

0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]

1 [0000006000 - 0000008000] TRAMPOLINE ==> [0000006000 - 0000008000]

2 [0000200000 - 00009b6da8] TEXT DATA BSS ==> [0000200000 - 00009b6da8]

3 [000009f000 - 0000100000] BIOS reserved ==> [000009f000 - 0000100000]

found SMP MP-table at [ffff8800000f0050] 000f0050 Zone PFN ranges: DMA 0x00000000 -> 0x00001000 DMA32 0x00001000 -> 0x00100000 Normal 0x00100000 -> 0x00100000 Movable zone start PFN for each node early_node_map[2] active PFN ranges 0: 0x00000000 -> 0x0000009f 0: 0x00000100 -> 0x00020000 Intel MultiProcessor Specification v1.4 MPTABLE: OEM ID: MPTABLE: Product ID: MPTABLE: APIC at: 0xFEE00000 Processor #0 (Bootup-CPU) I/O APIC #1 Version 17 at 0xFEC00000. Processors: 1 SMP: Allowing 1 CPUs, 0 hotplug CPUs Allocating PCI resources starting at c4000000 (gap: c0000000:3fff0000) PERCPU: Allocating 53248 bytes of per cpu data Built 1 zonelists in Zone order, mobility grouping on. Total pages: 127107 Kernel command line: earlyprintk=ttyS0 console=ttyS0 lpj=7999923 root=/dev/hda1 Initializing CPU#0 FP/SSE not shown under xsave features 0xd ------------[ cut here ]------------ kernel BUG at arch/x86/kernel/xsave.c:323! invalid opcode: 0000 [#1] SMP last sysfs file: CPU 0 Modules linked in: Pid: 0, comm: swapper Tainted: G W 2.6.28-rc4-dirty #5 RIP: 0010:[] [] xsave_cntxt_init+0x35/0x130 RSP: 0018:ffffffff808c3f18 EFLAGS: 000000b8 RAX: 000000000000002d RBX: ffffffff808c3f48 RCX: 00000000ffffffff RDX: ffffffff807c3c38 RSI: 0000000000000074 RDI: ffffffff8094a5f4 RBP: 0000000000000000 R08: 00000000ffffffff R09: 00000000000003fd R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff807a8340 R13: 0000000000000005 R14: 00000000ffff8800 R15: ffff88000100a000 FS: 0000000000000000(0000) GS:ffffffff808bd980(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000000201000 CR4: 00000000000006a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000000 Process swapper (pid: 0, threadinfo ffffffff808c2000, task ffffffff807a8340) Stack: ffffffff808c3f48 ffffffff8060e2b1 0000000000000010 ffffffff8060fa3f 0000000000000020 fffffff000000000 01008900e9802087 00000000ffff8800 ffffffff808c3f88 ffffffffffffffff 0000000000000040 ffffffff808f7700 Call Trace: [] fpu_init+0x4a/0x97 [] cpu_init+0x319/0x33f [] start_kernel+0x1b2/0x321 [] x86_64_start_kernel+0xd9/0xdd Code: 48 c1 e2 20 89 c0 48 8d 34 02 48 89 f0 48 89 35 90 96 05 00 83 e0 03 48 83 f8 03 74 12 48 c7 c7 10 82 71 80 31 c0 e8 4d e6 d3 ff <0f> 0b eb fe f6 05 b5 70 fe ff 04 48 c7 05 63 96 05 00 03 00 00 RIP [] xsave_cntxt_init+0x35/0x130 RSP ---[ end trace 4eaa2a86a8e2da22 ]--- Kernel panic - not syncing: Attempted to kill the idle task! ------------[ cut here ]------------ WARNING: at kernel/smp.c:333 smp_call_function_mask+0x1de/0x250() Modules linked in: Pid: 0, comm: swapper Tainted: G D W 2.6.28-rc4-dirty #5 Call Trace: [] warn_on_slowpath+0x62/0xa0 [] vsnprintf+0x449/0x6b0 [] string+0x34/0xf0 [] vsnprintf+0x408/0x6b0 [] up+0xd/0x40 [] release_console_sem+0x1ae/0x200 [] stop_this_cpu+0x0/0x30 [] smp_call_function_mask+0x1de/0x250 [] vsnprintf+0x268/0x6b0 [] printk+0x40/0x45 [] native_smp_send_stop+0x20/0x30 [] panic+0x82/0x129 [] do_exit+0x7de/0x890 [] printk+0x40/0x45 [] oops_end+0x7a/0xc0 [] do_invalid_op+0x84/0xa0 [] xsave_cntxt_init+0x35/0x130 [] release_console_sem+0x1ae/0x200 [] up+0xd/0x40 [] error_exit+0x0/0x51 [] xsave_cntxt_init+0x35/0x130 [] xsave_cntxt_init+0x35/0x130 [] fpu_init+0x4a/0x97 [] cpu_init+0x319/0x33f [] start_kernel+0x1b2/0x321 [] x86_64_start_kernel+0xd9/0xdd ---[ end trace 4eaa2a86a8e2da22 ]---

jiyongyu commented 4 years ago

Hi,

Our full-system simulation used ARM instead (so it should be scons build/ARM_MESI_Two_Level/gem5.opt then use fs.py to run gem5.opt) Based on your error message I think it may be because some instructions are not supported in this version of gem5.

sabbaghm commented 4 years ago

I see. Thank you!

So STT is only evaluated on ARM ISA? (Also, I could not find the PARSEC disk and binaries for ARM in the page you suggested earlier)

jiyongyu commented 4 years ago

Hi,

Sorry I used the kernel and disk image directly provided by InvisiSpec for STT. And I apologize to point you to an incorrect page (that UMich website only has x86 and alpha).

These are the kernel and image disk files that we use for STT (which is the same as InvisiSpec): --machine-type=VExpress_EMM64 \ --kernel=$M5_PATH/binaries/vmlinux.aarch64.20140821 \ --dtb-file=$M5_PATH/binaries/vexpress.aarch64.20140821.dtb \ --disk-image=$M5_PATH/disks/aarch64-ubuntu-trusty-headless.img \

And I think you can find these files here: http://www.m5sim.org/dist/current/arm/

Let me know if you have more questions.

pluviophilee commented 3 years ago

@jiyongyu

Hi, I am running the full system simulation with parsec benchmark. But it occurs an error: Exiting @ tick 18446744073709551615 because simulate() limit reached Do you have any idea to solve it? Looking forward your reply. Thanks.

Detailed log as following:

warn: You are trying to use Ruby on ARM, which is not working properly yet. gem5 Simulator System. http://gem5.org gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Nov 9 2020 22:15:47 gem5 started Nov 10 2020 00:00:16 gem5 executing on xiaoni-System-Product-Name, pid 4704 command line: /home/xiaoni/stt_update_l3_2/build/ARM/gem5.opt --outdir=/home/xiaoni/stt_update_l3_2/output/blackscholes-8-test-arm-FuturisticSafeInvisibleSpec /home/xiaoni/stt_update_l3_2/configs/example/fs.py --machine-type=VExpress_EMM64 --kernel=/home/xiaoni/parsec_full_system_images/system/binaries/vmlinux.aarch64.20140821 --dtb-file=/home/xiaoni/parsec_full_system_images/system/binaries/vexpress.aarch64.20140821.dtb --disk-image=/home/xiaoni/parsec_full_system_images/system/disks/aarch64-ubuntu-trusty-headless.img --num-cpus=8 --mem-size=2GB --num-dirs=8 --script=/home/xiaoni/parsec_full_system_images/system/blackscholes_8c_simsmall.rcS --threat_model=UnsafeBaseline --needsTSO=1 --STT=1 --implicit_channel=0 --l1d_assoc=8 --l2_assoc=16 --l1i_assoc=4 --ruby --cpu-type=DerivO3CPU

info: Standard input is not a terminal, disabling listeners. Global frequency set at 1000000000000 ticks per second warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (256 Mbytes) warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (256 Mbytes) warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (256 Mbytes) warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (256 Mbytes) warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (256 Mbytes) warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (256 Mbytes) warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (256 Mbytes) warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (256 Mbytes) info: kernel located at: /home/xiaoni/parsec_full_system_images/system/binaries/vmlinux.aarch64.20140821 warn: Highest ARM exception-level set to AArch32 but bootloader is for AArch64. Assuming you wanted these to match. Info: simulation uses threatModel: UnsafeBaseline; needsTSO=0 applySTT = 0, implicit_channel = 0, ifPrintROB = 0, moreTransmitInsts = 0 Info: simulation uses threatModel: UnsafeBaseline; needsTSO=0 applySTT = 0, implicit_channel = 0, ifPrintROB = 0, moreTransmitInsts = 0 Info: simulation uses threatModel: UnsafeBaseline; needsTSO=0 applySTT = 0, implicit_channel = 0, ifPrintROB = 0, moreTransmitInsts = 0 Info: simulation uses threatModel: UnsafeBaseline; needsTSO=0 applySTT = 0, implicit_channel = 0, ifPrintROB = 0, moreTransmitInsts = 0 Info: simulation uses threatModel: UnsafeBaseline; needsTSO=0 applySTT = 0, implicit_channel = 0, ifPrintROB = 0, moreTransmitInsts = 0 Info: simulation uses threatModel: UnsafeBaseline; needsTSO=0 applySTT = 0, implicit_channel = 0, ifPrintROB = 0, moreTransmitInsts = 0 Info: simulation uses threatModel: UnsafeBaseline; needsTSO=0 applySTT = 0, implicit_channel = 0, ifPrintROB = 0, moreTransmitInsts = 0 Info: simulation uses threatModel: UnsafeBaseline; needsTSO=0 applySTT = 0, implicit_channel = 0, ifPrintROB = 0, moreTransmitInsts = 0 warn: Sockets disabled, not accepting vnc client connections warn: Sockets disabled, not accepting terminal connections warn: Sockets disabled, not accepting gdb connections info: Using bootloader at address 0x10 info: Using kernel entry physical address at 0x80080000 info: Loading DTB file: /home/xiaoni/parsec_full_system_images/system/binaries/vexpress.aarch64.20140821.dtb at address 0x88000000 REAL SIMULATION warn: Existing EnergyCtrl, but no enabled DVFSHandler found. info: Entering event queue @ 0. Starting simulation... warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch warn: Address 0 is outside of physical memory, stopping fetch Exiting @ tick 18446744073709551615 because simulate() limit reached

Hi,

Sorry I used the kernel and disk image directly provided by InvisiSpec for STT. And I apologize to point you to an incorrect page (that UMich website only has x86 and alpha).

These are the kernel and image disk files that we use for STT (which is the same as InvisiSpec): --machine-type=VExpress_EMM64 --kernel=$M5_PATH/binaries/vmlinux.aarch64.20140821 --dtb-file=$M5_PATH/binaries/vexpress.aarch64.20140821.dtb --disk-image=$M5_PATH/disks/aarch64-ubuntu-trusty-headless.img \

And I think you can find these files here: http://www.m5sim.org/dist/current/arm/

Let me know if you have more questions.