AArch64 qemu has similar behavior as armv7l, like use of mmio etc.
This patch adds similar bypass checks what we have for armv7l to aarch64.
E.g. we are enabling mmio transport for Nicdev.
Making addDefaultUSB and addDefaultMemballoon to false etc.
Signed-off-by: Anup Patel <anup.patel(a)linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar(a)linaro.org>
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_command.c | 8 +++++---
src/qemu/qemu_domain.c | 5 ++++-
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 1eae4ba..74a1690 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -2872,7 +2872,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
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 22cc5f2..1c4de84 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -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;
@@ -1339,7 +1340,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-") &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MMIO)) {
qemuDomainPrimeVirtioDeviceAddresses(
@@ -1870,7 +1872,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"))
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 968e323..f4986d7 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -727,7 +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:
case VIR_ARCH_PPC64:
--
1.7.9.5