diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng index 71a6db3bb4..9a63720ff7 100644 --- a/docs/schemas/basictypes.rng +++ b/docs/schemas/basictypes.rng @@ -406,6 +406,7 @@ aarch64 alpha + armv6l armv7l cris i686 diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 20a1a0c201..8cb50073b4 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -625,7 +625,7 @@ static const char *virQEMUCapsArchToString(virArch arch) { if (arch == VIR_ARCH_I686) return "i386"; - else if (arch == VIR_ARCH_ARMV7L) + else if (arch == VIR_ARCH_ARMV6L || arch == VIR_ARCH_ARMV7L) return "arm"; else if (arch == VIR_ARCH_OR32) return "or32"; @@ -2201,7 +2201,7 @@ static const char *preferredMachines[] = { NULL, /* VIR_ARCH_NONE (not a real arch :) */ "clipper", /* VIR_ARCH_ALPHA */ - NULL, /* VIR_ARCH_ARMV6L (no QEMU impl) */ + "integratorcp", /* VIR_ARCH_ARMV6L */ "integratorcp", /* VIR_ARCH_ARMV7L */ "integratorcp", /* VIR_ARCH_ARMV7B */ @@ -4179,6 +4179,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, /* GIC capabilities, eg. available GIC versions */ if ((qemuCaps->arch == VIR_ARCH_AARCH64 || + qemuCaps->arch == VIR_ARCH_ARMV6L || qemuCaps->arch == VIR_ARCH_ARMV7L) && virQEMUCapsProbeQMPGICCapabilities(qemuCaps, mon) < 0) goto cleanup; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 315419c71b..c36f8d44e3 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9223,7 +9223,9 @@ static bool qemuChrIsPlatformDevice(const virDomainDef *def, virDomainChrDefPtr chr) { - if (def->os.arch == VIR_ARCH_ARMV7L || def->os.arch == VIR_ARCH_AARCH64) { + if (def->os.arch == VIR_ARCH_ARMV6L || + def->os.arch == VIR_ARCH_ARMV7L || + def->os.arch == VIR_ARCH_AARCH64) { /* pl011 (used on mach-virt) is a platform device */ if (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL && diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ee61caa823..0a5fac2b24 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -6024,7 +6024,8 @@ qemuDomainDefaultNetModel(const virDomainDef *def, if (ARCH_IS_S390(def->os.arch)) return "virtio"; - if (def->os.arch == VIR_ARCH_ARMV7L || + if (def->os.arch == VIR_ARCH_ARMV6L || + def->os.arch == VIR_ARCH_ARMV7L || def->os.arch == VIR_ARCH_AARCH64) { if (STREQ(def->os.machine, "versatilepb")) return "smc91c111"; @@ -9807,7 +9808,8 @@ bool qemuDomainMachineIsARMVirt(const char *machine, const virArch arch) { - if (arch != VIR_ARCH_ARMV7L && + if (arch != VIR_ARCH_ARMV6L && + arch != VIR_ARCH_ARMV7L && arch != VIR_ARCH_AARCH64) return false; @@ -10613,7 +10615,8 @@ qemuDomainSupportsNicdev(virDomainDefPtr def, virDomainNetDefPtr net) { /* non-virtio ARM nics require legacy -net nic */ - if (((def->os.arch == VIR_ARCH_ARMV7L) || + if (((def->os.arch == VIR_ARCH_ARMV6L) || + (def->os.arch == VIR_ARCH_ARMV7L) || (def->os.arch == VIR_ARCH_AARCH64)) && net->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO && net->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 73ed9cc68c..4cee6633ac 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -468,7 +468,8 @@ static void qemuDomainAssignARMVirtioMMIOAddresses(virDomainDefPtr def, virQEMUCapsPtr qemuCaps) { - if (def->os.arch != VIR_ARCH_ARMV7L && + if (def->os.arch != VIR_ARCH_ARMV6L && + def->os.arch != VIR_ARCH_ARMV7L && def->os.arch != VIR_ARCH_AARCH64) return; @@ -2367,7 +2368,8 @@ static bool qemuDomainSupportsPCI(virDomainDefPtr def, virQEMUCapsPtr qemuCaps) { - if ((def->os.arch != VIR_ARCH_ARMV7L) && + if ((def->os.arch != VIR_ARCH_ARMV6L) && + (def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64) && !ARCH_IS_RISCV(def->os.arch)) return true; diff --git a/tests/capabilityschemadata/caps-qemu-kvm.xml b/tests/capabilityschemadata/caps-qemu-kvm.xml index 1aa98d140f..4b3895dbd1 100644 --- a/tests/capabilityschemadata/caps-qemu-kvm.xml +++ b/tests/capabilityschemadata/caps-qemu-kvm.xml @@ -81,6 +81,72 @@ + + hvm + + 32 + /usr/bin/qemu-system-arm + integratorcp + nuri + mps2-an511 + verdex + mps2-an505 + virt-3.0 + virt + ast2500-evb + smdkc210 + collie + imx25-pdk + spitz + realview-pbx-a9 + realview-eb + realview-pb-a8 + versatilepb + emcraft-sf2 + virt-2.9 + musicpal + z2 + akita + virt-2.7 + kzm + virt-2.8 + realview-eb-mpcore + mcimx7d-sabre + sx1 + sx1-v1 + virt-2.6 + cubieboard + highbank + raspi2 + netduino2 + terrier + n810 + mainstone + palmetto-bmc + sabrelite + midway + romulus-bmc + cheetah + tosa + borzoi + versatileab + lm3s6965evb + n800 + virt-2.10 + virt-2.11 + connex + virt-2.12 + witherspoon-bmc + xilinx-zynq-a9 + mps2-an385 + vexpress-a9 + vexpress-a15 + canon-a1100 + lm3s811evb + + + + hvm diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 0d3e9fc7e6..5add246162 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -392,7 +392,39 @@ static int testQemuAddS390Guest(virCapsPtr caps) return -1; } -static int testQemuAddArmGuest(virCapsPtr caps) +static int testQemuAddArm6Guest(virCapsPtr caps) +{ + static const char *machines[] = { "versatilepb" }; + virCapsGuestMachinePtr *capsmachines = NULL; + virCapsGuestPtr guest; + + capsmachines = virCapabilitiesAllocMachines(machines, + ARRAY_CARDINALITY(machines)); + if (!capsmachines) + goto error; + + guest = virCapabilitiesAddGuest(caps, VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_ARMV6L, + QEMUBinList[TEST_UTILS_QEMU_BIN_ARM], + NULL, + ARRAY_CARDINALITY(machines), + capsmachines); + if (!guest) + goto error; + + if (!virCapabilitiesAddGuestDomain(guest, VIR_DOMAIN_VIRT_QEMU, NULL, NULL, 0, NULL)) + goto error; + if (!virCapabilitiesAddGuestDomain(guest, VIR_DOMAIN_VIRT_KVM, + NULL, NULL, 0, NULL)) + goto error; + + return 0; + + error: + virCapabilitiesFreeMachines(capsmachines, ARRAY_CARDINALITY(machines)); + return -1; +} + +static int testQemuAddArm7Guest(virCapsPtr caps) { static const char *machines[] = { "vexpress-a9", "vexpress-a15", @@ -514,7 +546,10 @@ virCapsPtr testQemuCapsInit(void) if (testQemuAddS390Guest(caps)) goto cleanup; - if (testQemuAddArmGuest(caps)) + if (testQemuAddArm6Guest(caps)) + goto cleanup; + + if (testQemuAddArm7Guest(caps)) goto cleanup; if (testQemuAddAARCH64Guest(caps))