You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.adoc
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -505,14 +505,14 @@ The limitations are severe however:
505
505
* can't <<gdb,GDB step debug the kernel>>, since the source and cross toolchain with GDB are not available. Buildroot cannot easily use a host toolchain: <<prebuilt-toolchain>>.
506
506
+
507
507
Maybe we could work around this by just downloading the kernel source somehow, and using a host prebuilt GDB, but we felt that it would be too messy and unreliable.
508
-
* you won't get the latest version of this repository. Our <<travis>> attempt to automate builds failed, and storing a release for every commit would likely make GitHub mad at us.
508
+
* you won't get the latest version of this repository. Our <<travis>> attempt to automate builds failed, and storing a release for every commit would likely make GitHub mad at us anyways.
509
509
* <<gem5>> is not currently supported, although it should not be too hard to do. Annoyances:
510
510
+
511
511
** there is no Debian package for it, so you have to compile your own, so you might as well just build the image itself
512
512
** it does not handle <<gem5-qcow2,qcow2>>, and we haven't gotten <<squashfs>> to work yet, therefore we would have to either distribute large ext2 images, or constantly fight with <<br2_target_rootfs_ext2_size>>
513
513
** QEMU uses `bzImage` and gem5 the raw `vmlinux`, and we don't want to distribute the same thing twice...
514
514
+
515
-
And our attempt at using link:https://github.com/torvalds/linux/blob/master/scripts/extract-vmlinux[`extract-vmlinux`] failed for `aarch64` with:
515
+
Our attempt at using link:https://github.com/torvalds/linux/blob/master/scripts/extract-vmlinux[`extract-vmlinux`] to convert between them failed for `aarch64` with:
516
516
+
517
517
....
518
518
run-detectors: unable to find an interpreter for
@@ -2824,7 +2824,9 @@ gem5 can generate DTBs on ARM with `--generate-dtb`, but we don't use that featu
2824
2824
2825
2825
== KVM
2826
2826
2827
-
You can make QEMU or gem5 <<benchmark-linux-kernel-boot,run faster>> by passing enabling KVM with:
2827
+
link:https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine[KVM] is Linux kernel interface that <<benchmark-linux-kernel-boot,greatly speeds up>> execution of virtual machines.
2828
+
2829
+
You can make QEMU or gem5 by passing enabling KVM with:
2828
2830
2829
2831
....
2830
2832
./run --kvm
@@ -2836,21 +2838,19 @@ but it was broken in gem5 with pending patches: https://www.mail-archive.com/gem
2836
2838
panic: KVM: Failed to enter virtualized mode (hw reason: 0x80000021)
2837
2839
....
2838
2840
2839
-
KVM uses the link:https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine[KVM Linux kernel feature] of the host to run most instructions natively.
2841
+
KVM works by running userland instructions natively directly on the real hardware instead of running a software simulation of those instructions.
2842
+
2843
+
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 link:https://www.youtube.com/watch?v=8ItXpmLsINs[running an ARM desktop for some weird reason] :-)
2840
2844
2841
2845
We don't enable KVM by default because:
2842
2846
2843
-
* only works if the architecture of the guest equals that of the host.
2844
-
+
2845
-
We have only tested / supported it on x86, but it is rumoured that QEMU and gem5 also have ARM KVM support if you are link:https://www.youtube.com/watch?v=8ItXpmLsINs[running an ARM desktop for some weird reason] :-)
2846
-
* limits visibility, since more things are running natively:
2847
+
* it limits visibility, since more things are running natively:
2847
2848
** can't use GDB
2848
2849
** can't do instruction tracing
2849
-
* kernel boots are already fast enough without `-enable-kvm`
2850
-
2851
-
The main use case for `-enable-kvm` in this repository is to test if something that takes a long time to run is functionally correct.
2850
+
** on gem5, you lose cycle counts and therefor any notion of performance
2851
+
* QEMU kernel boots are already fast enough for most purposes without it
2852
2852
2853
-
For example, when porting a benchmark to Buildroot, you can first use QEMU's KVM to test that benchmarks is producing the correct results, before analysing them more deeply in gem5, which runs much slower.
2853
+
One important use case for KVM is to fast forward gem5 execution, often to skip boot, take a <<gem5-checkpoint>>, and then move on to a more detailed and slow simulation
0 commit comments