From 811b04c3f858fc24d681617d88b65ae8836fd808 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: Fri, 25 Oct 2019 00:00:01 +0000 Subject: [PATCH] gem5 kvm section --- README.adoc | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/README.adoc b/README.adoc index 5117de3..dbd86f2 100644 --- a/README.adoc +++ b/README.adoc @@ -3500,18 +3500,12 @@ gem5 can generate DTBs on ARM with `--generate-dtb`. The generated DTB is placed https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine[KVM] is Linux kernel interface that <> execution of virtual machines. -You can make QEMU or gem5 by passing enabling KVM with: +You can make QEMU or <> by passing enabling KVM with: .... ./run --kvm .... -but it was broken in gem5 with pending patches: https://www.mail-archive.com/gem5-users@gem5.org/msg15046.html It fails immediately on: - -.... -panic: KVM: Failed to enter virtualized mode (hw reason: 0x80000021) -.... - KVM works by running userland instructions natively directly on the real hardware instead of running a software simulation of those instructions. Therefore, KVM only works if you the host architecture is the same as the guest architecture. This means that this will likely only work for x86 guests since almost all development machines are x86 nowadays. Unless you are https://www.youtube.com/watch?v=8ItXpmLsINs[running an ARM desktop for some weird reason] :-) @@ -3551,6 +3545,20 @@ We don't want to build the full Buildroot image inside the VM as that would be w TODO: do the right thing and cross compile QEMU and gem5. gem5's Python parts might be a pain. QEMU should be easy: https://stackoverflow.com/questions/26514252/cross-compile-qemu-for-arm +=== gem5 KVM + +While gem5 does have KVM, as of 2019 its support has not been very good, because debugging it is harder and people haven't focused intensively on it. + +X86 was broken with pending patches: https://www.mail-archive.com/gem5-users@gem5.org/msg15046.html It failed immediately on: + +.... +panic: KVM: Failed to enter virtualized mode (hw reason: 0x80000021) +.... + +Bibliography: + +* ARM thread: https://stackoverflow.com/questions/53523087/how-to-run-gem5-on-kvm-on-arm-with-multiple-cores + == User mode simulation Both QEMU and gem5 have an user mode simulation mode in addition to full system simulation that we consider elsewhere in this project. @@ -12442,6 +12450,8 @@ Implementations: Useful to <>. * `TimingSimpleCPU`: memory accesses are realistic, but the CPU has no pipeline. The simulation is faster than detailed models, but slower than `AtomicSimpleCPU`. TODO: application? +<> are an alternative way of fast forwarding boot when they work. + ==== gem5 MinorCPU Generic in-order core that does not model any specific CPU.