diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index a788cf0742..bad63c5238 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -818,7 +818,8 @@ qemuDomainDefaultNetModel(const virDomainDef *def) def->os.arch == VIR_ARCH_S390X) return "virtio"; - if (def->os.arch == VIR_ARCH_ARMV7L) { + if (def->os.arch == VIR_ARCH_ARMV7L || + def->os.arch == VIR_ARCH_AARCH64) { if (STREQ(def->os.machine, "versatilepb")) return "smc91c111"; diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args new file mode 100644 index 0000000000..d4d403b771 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args @@ -0,0 +1,6 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-aarch64 -S -M virt -m 1024 -smp 1 -nographic \ +-nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \ +-boot c -kernel /aarch64.kernel -initrd /aarch64.initrd -append console=ttyAMA0 \ +-usb -device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \ +-net user,vlan=0,name=hostnet0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.xml new file mode 100644 index 0000000000..868de9497a --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.xml @@ -0,0 +1,22 @@ + + aarch64-virt-default-nic + 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f + 1048576 + 1048576 + 1 + + + + + hvm + /aarch64.kernel + /aarch64.initrd + console=ttyAMA0 + + + /usr/bin/qemu-system-aarch64 + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 23b56524d0..55548513d5 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1338,6 +1338,9 @@ mymain(void) QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); + DO_TEST("aarch64-virt-default-nic", + QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_DEVICE_VIRTIO_MMIO); DO_TEST("kvm-pit-device", QEMU_CAPS_KVM_PIT_TICK_POLICY); DO_TEST("kvm-pit-delay", QEMU_CAPS_NO_KVM_PIT);