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