From 57394620b89c1146399d64c86fcda0972a1b1379 Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Fri, 8 Sep 2017 15:57:10 +0100 Subject: [PATCH] cmd: On KVM/aarch64 add gic_version=host This picks the correct GIC version to be emulated. Without it you get an error on Thunder-X (and possibly others): KVM_SET_DEVICE_ATTR failed: No such device See also https://bugzilla.redhat.com/show_bug.cgi?id=1375571#c6 Fixes #2360 Signed-off-by: Rolf Neugebauer --- src/cmd/linuxkit/run_qemu.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cmd/linuxkit/run_qemu.go b/src/cmd/linuxkit/run_qemu.go index e5ccb3535..73bc54fab 100644 --- a/src/cmd/linuxkit/run_qemu.go +++ b/src/cmd/linuxkit/run_qemu.go @@ -504,10 +504,8 @@ func buildQemuCmdline(config QemuConfig) (QemuConfig, []string) { if config.KVM { qemuArgs = append(qemuArgs, "-enable-kvm") - // Remove the hardcode of virtual machine type for x86, since we will - // support aarch64 in future if config.Arch == "aarch64" { - qemuArgs = append(qemuArgs, "-machine", "virt") + qemuArgs = append(qemuArgs, "-machine", "virt,gic_version=host") } else { qemuArgs = append(qemuArgs, "-machine", "q35,accel=kvm:tcg") }