From c908dbc70358e0cb339590a52aac6cf88c3dec17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Mon, 31 Jul 2023 16:48:33 +0200 Subject: [PATCH 1/3] README: Put SMP, memory on individual lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fd50b779..03baf5a5 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ Boot a hermit application: ``` $ qemu-system-x86_64 \ -cpu qemu64,apic,fsgsbase,fxsr,rdrand,rdtscp,xsave,xsaveopt \ - -smp 1 -m 64M \ + -smp 1 \ + -m 64M \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 \ -display none -serial stdio \ -kernel \ @@ -43,7 +44,9 @@ On AArch64, the base command is as follows: ``` $ qemu-system-aarch64 \ -machine virt,gic-version=3 \ - -cpu cortex-a76 -smp 1 -m 512M \ + -cpu cortex-a76 \ + -smp 1 \ + -m 512M \ -semihosting \ -display none -serial stdio \ -kernel \ From dec932512d2d0055a13f4f7786c4e548318fa8b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Mon, 31 Jul 2023 16:49:38 +0200 Subject: [PATCH 2/3] README: Increase memory to QEMU default (128M) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 03baf5a5..1bea4535 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Boot a hermit application: $ qemu-system-x86_64 \ -cpu qemu64,apic,fsgsbase,fxsr,rdrand,rdtscp,xsave,xsaveopt \ -smp 1 \ - -m 64M \ + -m 128M \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 \ -display none -serial stdio \ -kernel \ From 018a7e684a6caa4a9cc712a1f5597f6ae17f62bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Mon, 31 Jul 2023 16:51:57 +0200 Subject: [PATCH 3/3] README: Remove qemu64 CPU, add KVM & invtsc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1bea4535..37c930a8 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,14 @@ Afterward, the loader is located at `target//release/rusty-loader`. ## Running -Boot a hermit application: +### x86-64 + +On x86-64 Linux with KVM, you can boot Hermit like this: ``` $ qemu-system-x86_64 \ - -cpu qemu64,apic,fsgsbase,fxsr,rdrand,rdtscp,xsave,xsaveopt \ + -enable-kvm \ + -cpu host \ -smp 1 \ -m 128M \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 \ @@ -32,13 +35,25 @@ $ qemu-system-x86_64 \ -initrd ``` -Arguments can be provided like this: +#### No KVM + +If you want to emulate x86-64 instead of using KVM, omit `-enable-kvm` and set the CPU explicitly to a model of your choice, for example `-cpu Skylake-Client`. + +#### Benchmarking + +If you want to benchmark Hermit, make sure to enable the _invariant TSC_ (`invtsc`) feature by setting `-cpu host,migratable=no,+invtsc,enforce`. + +#### Providing Arguments + +Unikernel arguments can be provided like this: ``` $ qemu-system-x86_64 ... \ -append "[KERNEL_ARGS] [--] [APP_ARGS]" ``` +### AArch64 + On AArch64, the base command is as follows: ```