aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Egorenkov <Alexander.Egorenkov@ibm.com>2020-10-30 20:34:23 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-10-31 08:21:25 +0100
commita72ed5b74114ecd508d31548ced7b2f829eb55cc (patch)
tree182d6584af1ca5e34b080d296cfdbb8e030b5f62
parent18e33098d58c8738cc3b678346141b74d34d4e30 (diff)
vm/qemu: use virtio-rng-ccw on s390x arch
MSI-X support is mandatory for any PCI device on s390x but virtio-rng-pci doesn't support it. Fixes the following error on s390x: qemu-system-s390x: -device virtio-rng-pci: MSI-X support is mandatory in the S390 architecture The problem was introduced in commit 36e8b020 ("vm/qemu: enable virtio-rng-pci"). Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
-rw-r--r--vm/qemu/qemu.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go
index 6c439dbb4..7b2061c20 100644
--- a/vm/qemu/qemu.go
+++ b/vm/qemu/qemu.go
@@ -379,10 +379,14 @@ func (inst *instance) boot() error {
"-mon", "chardev=SOCKSYZ,mode=control",
"-display", "none",
"-serial", "stdio",
- "-device", "virtio-rng-pci",
"-no-reboot",
"-name", fmt.Sprintf("VM-%v", inst.index),
}
+ if inst.target.Arch == targets.S390x {
+ args = append(args, "-device", "virtio-rng-ccw")
+ } else {
+ args = append(args, "-device", "virtio-rng-pci")
+ }
templateDir := filepath.Join(inst.workdir, "template")
args = append(args, splitArgs(inst.cfg.QemuArgs, templateDir, inst.index)...)
args = append(args,