From 3105b1ee3d89f3cab919e124781139141b261861 Mon Sep 17 00:00:00 2001 From: Valentine Sinitsyn Date: Sun, 28 Sep 2014 14:02:41 +0600 Subject: [PATCH] Documentation: Update README and other resources Outline Jailhouse AMD-V system requirements and nested SVM setup instructions in the qemu-vm.cell config and README file. As Linux 3.17 is already released, reflect this in aforementioned files as well. Also remove "AMD-V support" item from the TODO list and add AMD IOMMU to it. Signed-off-by: Valentine Sinitsyn [Jan: raise host-kernel requirement to 3.18 for AMD] Signed-off-by: Jan Kiszka --- README | 34 +++++++++++++++++++++++++--------- TODO | 2 +- configs/qemu-vm.c | 7 +++++++ 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/README b/README index 3facafa..6ae6331 100644 --- a/README +++ b/README @@ -49,6 +49,11 @@ currently: - preemption timer - Intel IOMMU (VT-d) with interrupt remapping support (except when running inside QEMU) + or + - AMD x86 processor with support for 64-bit and SVM (AMD-V), and also + - NPT (nested page tables); required + - Decode Assists; recommended + - AMD IOMMU (AMD-Vi) is unsupported now but will be required in future - at least 2 logical CPUs - x86-64 Linux kernel (tested against >= 3.9) - VT-d IOMMU usage (DMAR) has to be disabled in the Linux kernel, e.g. via @@ -90,15 +95,17 @@ Demonstration in QEMU/KVM ------------------------- The included system configuration qemu-vm.c can be used to run Jailhouse in -QEMU/KVM virtual machine on Intel x86 hosts. Currently it requires kvm.git, -next branch on the host. 3.17 is expected to include all necessary features -for this setup. QEMU is required in a recent version (2.1) as well if you want -to use the configuration file included in the source tree. +QEMU/KVM virtual machine on x86 hosts (Intel and AMD are supported). Currently +it requires Linux 3.18 or newer on the host side (Intel is fine with 3.17). +QEMU is required in a recent version (2.1) as well if you want to use the +configuration file included in the source tree. You also need a Linux guest image with a recent kernel (tested with >= 3.9) and -the ability to build a module for this kernel. Make sure the kvm-intel module -was loaded with nested=1 to enable nested VMX support. Start the virtual -machine as follows: +the ability to build a module for this kernel. Further steps depend on the type +of CPU you have on your system. + +For Intel CPUs: Make sure the kvm-intel module was loaded with nested=1 to +enable nested VMX support. Start the virtual machine as follows: qemu-system-x86_64 -machine q35 -m 1G -enable-kvm -smp 4 \ -cpu kvm64,-kvm_pv_eoi,-kvm_steal_time,-kvm_asyncpf,-kvmclock,+vmx,+x2apic \ @@ -106,8 +113,17 @@ machine as follows: -device ide-hd,drive=disk -serial stdio -serial vc \ -device intel-hda,addr=1b.0 -device hda-duplex -Inside the VM, make sure that jailhouse.bin, generated by the build process, -is available for firmware loading (typically /lib/firmware), see above for +For AMD CPUs: Make sure the kvm-amd module was loaded with nested=1 to enable +nested SVM support. Start the virtual machine as follows: + + qemu-system-x86_64 -machine q35 -m 1G -enable-kvm -smp 4 \ + -cpu host,-kvm_pv_eoi,-kvm_steal_time,-kvm_asyncpf,-kvmclock,+svm,+x2apic \ + -drive file=LinuxInstallation.img,id=disk,if=none \ + -device ide-hd,drive=disk -serial stdio -serial vc \ + -device intel-hda,addr=1b.0 -device hda-duplex + +Inside the VM, make sure that jailhouse-*.bin, generated by the build process, +are available for firmware loading (typically /lib/firmware), see above for installation steps. The hypervisor requires a contiguous piece of RAM for itself and each diff --git a/TODO b/TODO index 3f80894..cc665a7 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,7 @@ Things to be addressed, at some point. Unsorted, unprioritized, incomplete. o x86 support - - AMD64 (SVM) [WIP] + - AMD IOMMU support [WIP] - power management - block - allow per cell (managing inter-core/inter-cell impacts) diff --git a/configs/qemu-vm.c b/configs/qemu-vm.c index dceff5c..b5a7167 100644 --- a/configs/qemu-vm.c +++ b/configs/qemu-vm.c @@ -3,11 +3,18 @@ * * Test configuration for QEMU Q35 VM, 1 GB RAM, 64 MB hypervisor (-192K ACPI) * Command line: + * + * For Intel-based setup: * qemu-system-x86_64 -machine q35 -m 1G -enable-kvm -smp 4 \ * -drive file=/path/to/image,id=disk,if=none -device ide-hd,drive=disk \ * -virtfs local,path=/local/path,security_model=passthrough,mount_tag=host \ * -cpu kvm64,-kvm_pv_eoi,-kvm_steal_time,-kvm_asyncpf,-kvmclock,+vmx,+x2apic * + * For AMD-based setups: + * qemu-system-x86_64 /path/to/image -m 1G -enable-kvm -smp 4 \ + * -virtfs local,path=/local/path,security_model=passthrough,mount_tag=host \ + * -cpu host,-kvm_pv_eoi,-kvm_steal_time,-kvm_asyncpf,-kvmclock,+svm,+x2apic + * * Copyright (c) Siemens AG, 2013 * * Authors: -- 2.39.2