@@ -2889,7 +2889,7 @@ virQEMUCapsSupportsChardev(virDomainDefPtr def,
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
return false;
- if (def->os.arch != VIR_ARCH_ARMV7L)
+ if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64))
return true;
/* This may not be true for all ARM machine types, but at least
@@ -427,7 +427,8 @@ qemuDomainSupportsNicdev(virDomainDefPtr def,
return false;
/* non-virtio ARM nics require legacy -net nic */
- if (def->os.arch == VIR_ARCH_ARMV7L &&
+ if (((def->os.arch == VIR_ARCH_ARMV7L) ||
+ (def->os.arch == VIR_ARCH_AARCH64)) &&
net->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO)
return false;
@@ -1340,7 +1341,8 @@ static int
qemuDomainAssignARMVirtioMMIOAddresses(virDomainDefPtr def,
virQEMUCapsPtr qemuCaps)
{
- if (def->os.arch == VIR_ARCH_ARMV7L &&
+ if (((def->os.arch == VIR_ARCH_ARMV7L) ||
+ (def->os.arch == VIR_ARCH_AARCH64)) &&
(STRPREFIX(def->os.machine, "vexpress-") ||
STREQ(def->os.machine, "virt")) &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MMIO)) {
@@ -1872,7 +1874,7 @@ cleanup:
static bool
qemuDomainSupportsPCI(virDomainDefPtr def) {
- if (def->os.arch != VIR_ARCH_ARMV7L)
+ if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64))
return true;
if (STREQ(def->os.machine, "versatilepb"))
@@ -727,6 +727,10 @@ qemuDomainDefPostParse(virDomainDefPtr def,
addDefaultUSB = false;
addDefaultMemballoon = false;
break;
+ case VIR_ARCH_AARCH64:
+ addDefaultUSB = false;
+ addDefaultMemballoon = false;
+ break;
case VIR_ARCH_ALPHA:
case VIR_ARCH_PPC:
new file mode 100644
@@ -0,0 +1,14 @@
+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 \
+'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
+-dtb /aarch64.dtb -device virtio-serial-device,id=virtio-serial0 -usb \
+-drive file=/aarch64.raw,if=none,id=drive-virtio-disk0 \
+-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 \
+-device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \
+-net user,vlan=0,name=hostnet0 -serial pty -chardev pty,id=charconsole1 \
+-device virtconsole,chardev=charconsole1,id=console1 \
+-device virtio-balloon-device,id=balloon0 \
+-object rng-random,id=rng0,filename=/dev/random \
+-device virtio-rng-device,rng=rng0
new file mode 100644
@@ -0,0 +1,45 @@
+<domain type="qemu">
+ <name>aarch64test</name>
+ <uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid>
+ <memory>1048576</memory>
+ <currentMemory>1048576</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch="aarch64" machine="virt">hvm</type>
+ <kernel>/aarch64.kernel</kernel>
+ <initrd>/aarch64.initrd</initrd>
+ <dtb>/aarch64.dtb</dtb>
+ <cmdline>earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait</cmdline>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <clock offset="utc"/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
+ <disk type='file' device='disk'>
+ <source file='/aarch64.raw'/>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ <model type='virtio'/>
+ </interface>
+ <console type='pty'/>
+ <console type='pty'>
+ <target type='virtio' port='0'/>
+ </console>
+ <memballoon model='virtio'/>
+ <!--
+ This actually doesn't work in practice because vexpress only has
+ 4 virtio slots available, rng makes 5 -->
+ <rng model='virtio'>
+ <backend model='random'>/dev/random</backend>
+ </rng>
+ </devices>
+</domain>
@@ -1299,6 +1299,10 @@ 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-virtio",
+ 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("kvm-pit-device", QEMU_CAPS_KVM_PIT_TICK_POLICY);
DO_TEST("kvm-pit-delay", QEMU_CAPS_NO_KVM_PIT);