@@ -1964,7 +1964,9 @@ sched_getcpu = 0
1964
1964
1965
1965
so we see that the affinity was restricted to the second core from the start.
1966
1966
1967
- Let's do a QEMU observation to justify this example being in the repository with <<gdb-step-debug-userland-non-init,userland breakpoints>>:
1967
+ Let's do a QEMU observation to justify this example being in the repository with <<gdb-step-debug-userland-non-init,userland breakpoints>>.
1968
+
1969
+ We will run our `/sched_getaffinity.out` infinitely many time, on core 0 and core 1 alternatively:
1968
1970
1969
1971
....
1970
1972
./run -c2 -d -F 'i=0; while true; do taskset -c $i,$i /sched_getaffinity.out; i=$((! $i)); done'
@@ -1991,7 +1993,7 @@ Then, inside GDB:
1991
1993
(gdb) c
1992
1994
....
1993
1995
1994
- So we observe that `info threads` shows the actual correct core on which the process was restricted to run by `taskset`!
1996
+ and we observe that `info threads` shows the actual correct core on which the process was restricted to run by `taskset`!
1995
1997
1996
1998
We should also try it out with kernel modules: https://stackoverflow.com/questions/28347876/set-cpu-affinity-on-a-loadable-linux-kernel-module
1997
1999
@@ -2316,6 +2318,25 @@ Bibliography:
2316
2318
* https://stackoverflow.com/questions/7415515/how-to-access-the-control-registers-cr0-cr2-cr3-from-a-program-getting-segmenta/7419306#7419306
2317
2319
* https://stackoverflow.com/questions/18717016/what-are-ring-0-and-ring-3-in-the-context-of-operating-systems/44483439#44483439
2318
2320
2321
+ === arm
2322
+
2323
+ ==== Run arm executable in aarch64
2324
+
2325
+ TODO Can you run arm executables in the aarch64 guest? https://stackoverflow.com/questions/22460589/armv8-running-legacy-32-bit-applications-on-64-bit-os/51466709#51466709
2326
+
2327
+ I've tried:
2328
+
2329
+ ....
2330
+ ./out/aarch64/buildroot/host/bin/aarch64-linux-gcc -static ~/test/hello_world.c -o data/9p/a.out
2331
+ ./run -aA -F '/mnt/9p/a.out'
2332
+ ....
2333
+
2334
+ but it fails with:
2335
+
2336
+ ....
2337
+ a.out: line 1: syntax error: unexpected word (expecting ")")
2338
+ ....
2339
+
2319
2340
=== mips64
2320
2341
2321
2342
Keep in mind that MIPS has the worst support compared to our other architectures due to the smaller community. Patches welcome as usual.
0 commit comments