From efecaa99d5b6223ea89af21597666bdb309d1234 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 27 Jun 2021 08:05:11 -0700 Subject: simplify Qemu instructions Turns out we don't need a special case for KVM. https://qemu.readthedocs.io/en/latest/system/invocation.html --- shell/README.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/shell/README.md b/shell/README.md index 7720fdaf..d48c5d85 100644 --- a/shell/README.md +++ b/shell/README.md @@ -41,25 +41,23 @@ Currently runs a tiny dialect of Lisp. Steps to run it from the top-level: results. Hit `ctrl-m` to focus on the `...` after a run, and browse how the _trace_ of how the results were computed. [Here's a 2-minute demo](https://archive.org/details/akkartik-mu-2021-05-31). -3. If your Qemu installation supports them, one of these commandline arguments - may speed up emulation: +3. If your Qemu installation supports them, an `-accel` arguments + will speed up emulation. Try `-accel help` to list your options. - - `-enable-kvm` - - `-accel ___` (run with `-accel help` for a list of available options) + Once you select an accelerator, I recommend also adjusting the `responsiveness` + mask in shell/evaluate.mu, which controls how frequently the fake screen + updates within the REPL. Smaller values will seem more responsive, larger + values will leave more time to run your programs. I like to see the screen + update about once a second. Some suggested values depending on how fast your + Qemu is running: - If you do this, I recommend also adjusting the `responsiveness` mask in - shell/evaluate.mu, which controls how frequently the fake screen updates. - Smaller values will seem more responsive, larger values will leave more time - to run your programs. I like to see the screen update about once a second. - Some suggested values depending on how fast your Qemu is running: - - - `-enable-kvm` on a T420s running Linux: `0xffff/responsiveness=64k` + - `-accel kvm` on a T420s running Linux: `0xffff/responsiveness=64k` - `-accel tcg` on a 2019 Mac: `0xfff/responsiveness=4k` Putting it all together, here's the command I typically use on Linux: ``` - qemu-system-i386 -m 2G -enable-kvm -hda code.img -hdb data.img + qemu-system-i386 -m 2G -accel kvm -hda code.img -hdb data.img ``` ### Indent-sensitivity -- cgit 1.4.1-2-gfad0