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 <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer 2017-09-08 15:57:10 +01:00
parent c89af36c36
commit 57394620b8

View File

@ -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")
}