mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 12:35:20 +00:00
tests: define QEMU driver capabilities for sparc architecture
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
a46ca90d27
commit
04dd749a5f
@ -31,7 +31,8 @@ static const char *qemu_emulators[VIR_ARCH_LAST] = {
|
|||||||
[VIR_ARCH_PPC] = "/usr/bin/qemu-system-ppc",
|
[VIR_ARCH_PPC] = "/usr/bin/qemu-system-ppc",
|
||||||
[VIR_ARCH_RISCV32] = "/usr/bin/qemu-system-riscv32",
|
[VIR_ARCH_RISCV32] = "/usr/bin/qemu-system-riscv32",
|
||||||
[VIR_ARCH_RISCV64] = "/usr/bin/qemu-system-riscv64",
|
[VIR_ARCH_RISCV64] = "/usr/bin/qemu-system-riscv64",
|
||||||
[VIR_ARCH_S390X] = "/usr/bin/qemu-system-s390x"
|
[VIR_ARCH_S390X] = "/usr/bin/qemu-system-s390x",
|
||||||
|
[VIR_ARCH_SPARC] = "/usr/bin/qemu-system-sparc",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const virArch arch_alias[VIR_ARCH_LAST] = {
|
static const virArch arch_alias[VIR_ARCH_LAST] = {
|
||||||
@ -74,6 +75,11 @@ static const char *const riscv64_machines[] = {
|
|||||||
static const char *const s390x_machines[] = {
|
static const char *const s390x_machines[] = {
|
||||||
"s390-virtio", "s390-ccw-virtio", "s390-ccw", NULL
|
"s390-virtio", "s390-ccw-virtio", "s390-ccw", NULL
|
||||||
};
|
};
|
||||||
|
static const char *const sparc_machines[] = {
|
||||||
|
"SS-5", "LX", "SPARCClassic", "SPARCbook",
|
||||||
|
"SS-10", "SS-20", "SS-4", "SS-600MP",
|
||||||
|
"Voyager", "leon3_generic", NULL
|
||||||
|
};
|
||||||
|
|
||||||
static const char *const *qemu_machines[VIR_ARCH_LAST] = {
|
static const char *const *qemu_machines[VIR_ARCH_LAST] = {
|
||||||
[VIR_ARCH_I686] = i386_machines,
|
[VIR_ARCH_I686] = i386_machines,
|
||||||
@ -85,6 +91,7 @@ static const char *const *qemu_machines[VIR_ARCH_LAST] = {
|
|||||||
[VIR_ARCH_RISCV32] = riscv32_machines,
|
[VIR_ARCH_RISCV32] = riscv32_machines,
|
||||||
[VIR_ARCH_RISCV64] = riscv64_machines,
|
[VIR_ARCH_RISCV64] = riscv64_machines,
|
||||||
[VIR_ARCH_S390X] = s390x_machines,
|
[VIR_ARCH_S390X] = s390x_machines,
|
||||||
|
[VIR_ARCH_SPARC] = sparc_machines,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *const *kvm_machines[VIR_ARCH_LAST] = {
|
static const char *const *kvm_machines[VIR_ARCH_LAST] = {
|
||||||
@ -106,7 +113,8 @@ static const char *qemu_default_ram_id[VIR_ARCH_LAST] = {
|
|||||||
[VIR_ARCH_ARMV7L] = "vexpress.highmem",
|
[VIR_ARCH_ARMV7L] = "vexpress.highmem",
|
||||||
[VIR_ARCH_PPC64] = "ppc_spapr.ram",
|
[VIR_ARCH_PPC64] = "ppc_spapr.ram",
|
||||||
[VIR_ARCH_PPC] = "ppc_spapr.ram",
|
[VIR_ARCH_PPC] = "ppc_spapr.ram",
|
||||||
[VIR_ARCH_S390X] = "s390.ram"
|
[VIR_ARCH_S390X] = "s390.ram",
|
||||||
|
[VIR_ARCH_SPARC] = "sun4m.ram",
|
||||||
};
|
};
|
||||||
|
|
||||||
char *
|
char *
|
||||||
@ -181,6 +189,7 @@ testQemuAddGuest(virCapsPtr caps,
|
|||||||
NULL))
|
NULL))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
if (kvm_machines[emu_arch] != NULL) {
|
||||||
nmachines = g_strv_length((char **)kvm_machines[emu_arch]);
|
nmachines = g_strv_length((char **)kvm_machines[emu_arch]);
|
||||||
machines = virCapabilitiesAllocMachines(kvm_machines[emu_arch],
|
machines = virCapabilitiesAllocMachines(kvm_machines[emu_arch],
|
||||||
nmachines);
|
nmachines);
|
||||||
@ -194,6 +203,7 @@ testQemuAddGuest(virCapsPtr caps,
|
|||||||
nmachines,
|
nmachines,
|
||||||
machines))
|
machines))
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -363,6 +373,7 @@ int qemuTestCapsCacheInsert(virFileCachePtr cache,
|
|||||||
defaultRAMid);
|
defaultRAMid);
|
||||||
virQEMUCapsSet(tmpCaps, QEMU_CAPS_TCG);
|
virQEMUCapsSet(tmpCaps, QEMU_CAPS_TCG);
|
||||||
}
|
}
|
||||||
|
if (kvm_machines[i] != NULL) {
|
||||||
for (j = 0; kvm_machines[i][j] != NULL; j++) {
|
for (j = 0; kvm_machines[i][j] != NULL; j++) {
|
||||||
virQEMUCapsAddMachine(tmpCaps,
|
virQEMUCapsAddMachine(tmpCaps,
|
||||||
VIR_DOMAIN_VIRT_KVM,
|
VIR_DOMAIN_VIRT_KVM,
|
||||||
@ -377,6 +388,7 @@ int qemuTestCapsCacheInsert(virFileCachePtr cache,
|
|||||||
virQEMUCapsSet(tmpCaps, QEMU_CAPS_KVM);
|
virQEMUCapsSet(tmpCaps, QEMU_CAPS_KVM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (virFileCacheInsertData(cache, qemu_emulators[i], tmpCaps) < 0) {
|
if (virFileCacheInsertData(cache, qemu_emulators[i], tmpCaps) < 0) {
|
||||||
virObjectUnref(tmpCaps);
|
virObjectUnref(tmpCaps);
|
||||||
|
Loading…
Reference in New Issue
Block a user