From 7f332f241247fa8f1cebd4641fcafbb68c7222b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Sat, 25 Apr 2020 01:00:00 +0000 Subject: [PATCH] gem5: take one quick failed shot at se.py --smt --- README.adoc | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 06446f0..d49f860 100644 --- a/README.adoc +++ b/README.adoc @@ -4150,7 +4150,7 @@ and then <> by replacing: with: .... - --cmd '/home/ciro/bak/git/linux-kernel-module-cheat/out/userland/default/aarch64/posix/getpid.out;/home/ciro/bak/git/linux-kernel-module-cheat/out/userland/default/aarch64/posix/getpid.out' \ + --cmd '/path/to/linux-kernel-module-cheat/out/userland/default/aarch64/posix/getpid.out;/path/to/linux-kernel-module-cheat/out/userland/default/aarch64/posix/getpid.out' \ --param 'system.cpu[:].workload[:].release = "5.4.3"' \ .... @@ -4190,6 +4190,29 @@ which starts with: and therefore shows one instruction running on each CPU for each process at the same time. +===== gem5 syscall emulation --smt + +gem5 b1623cb2087873f64197e503ab8894b5e4d4c7b4 syscall emulation has an `--smt` option presumably for <> but it has been neglected forever it seems: https://github.com/cirosantilli/linux-kernel-module-cheat/issues/104 + +If we start from the manually hacked working command from <> and try to add: + +.... +--cpu 1 --cpu-type Derivo3CPU --caches +.... + +We choose <> because of the se.py assert: + +.... +example/se.py:115: assert(options.cpu_type == "DerivO3CPU") +.... + +But then that fails with: + +.... +gem5.opt: /path/to/linux-kernel-module-cheat/out/gem5/master3/build/ARM/cpu/o3/cpu.cc:205: FullO3CPU::FullO3CPU(DerivO3CPUParams*) [with Impl = O3CPUImpl]: Assertion `params->numPhysVecPredRegs >= numThreads * TheISA::NumVecPredRegs' failed. +Program aborted at tick 0 +.... + === QEMU user mode quirks ==== QEMU user mode does not show stdout immediately @@ -22499,7 +22522,7 @@ Intel name: "Hyperthreading" * https://stackoverflow.com/questions/5593328/software-threads-vs-hardware-threads/61415402#61415402 * https://superuser.com/questions/122536/what-is-hyper-threading-and-how-does-it-work -gem5 appears to possibly have attempted to implement hardware threads in <>: https://github.com/cirosantilli/linux-kernel-module-cheat/issues/104 when using <>. +gem5 appears to possibly have attempted to implement hardware threads in <> as mentioned at <>. On fs.py it is not exposed in any in-tree config however, and as pointed by the above issue O3 FS has an assert that prevents it in https://github.com/gem5/gem5/blob/377898c4034c72b84b2662ed252fa25079a4ea62/src/cpu/o3/cpu.cc#L313[src/cpu/o3/cpu.cc]: