qemu: Rename qemuDomain*IsVirt() to qemuDomain*IsARMVirt()

They're ARM specific.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Lubomir Rintel 2018-08-22 11:15:20 +02:00 committed by Andrea Bolognani
parent 95785c1c9d
commit fa95035bd4
5 changed files with 21 additions and 21 deletions

View File

@ -1788,10 +1788,10 @@ bool virQEMUCapsHasPCIMultiBus(virQEMUCapsPtr qemuCaps,
return false; return false;
} }
/* If 'virt' supports PCI, it supports multibus. /* If ARM 'virt' supports PCI, it supports multibus.
* No extra conditions here for simplicity. * No extra conditions here for simplicity.
*/ */
if (qemuDomainIsVirt(def)) if (qemuDomainIsARMVirt(def))
return true; return true;
return false; return false;
@ -5338,7 +5338,7 @@ virQEMUCapsFillDomainFeatureGICCaps(virQEMUCapsPtr qemuCaps,
virDomainCapsFeatureGICPtr gic = &domCaps->gic; virDomainCapsFeatureGICPtr gic = &domCaps->gic;
virGICVersion version; virGICVersion version;
if (!qemuDomainMachineIsVirt(domCaps->machine, domCaps->arch)) if (!qemuDomainMachineIsARMVirt(domCaps->machine, domCaps->arch))
return 0; return 0;
for (version = VIR_GIC_VERSION_LAST - 1; for (version = VIR_GIC_VERSION_LAST - 1;

View File

@ -3046,7 +3046,7 @@ qemuBuildControllerDevCommandLine(virCommandPtr cmd,
if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_USB && if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
cont->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_DEFAULT && cont->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_DEFAULT &&
!qemuDomainIsQ35(def) && !qemuDomainIsQ35(def) &&
!qemuDomainIsVirt(def)) { !qemuDomainIsARMVirt(def)) {
/* An appropriate default USB controller model should already /* An appropriate default USB controller model should already
* have been selected in qemuDomainDeviceDefPostParse(); if * have been selected in qemuDomainDeviceDefPostParse(); if
@ -3084,7 +3084,7 @@ qemuBuildControllerDevCommandLine(virCommandPtr cmd,
if (usbcontroller == 0 && if (usbcontroller == 0 &&
!qemuDomainIsQ35(def) && !qemuDomainIsQ35(def) &&
!qemuDomainIsVirt(def) && !qemuDomainIsARMVirt(def) &&
!ARCH_IS_S390(def->os.arch)) { !ARCH_IS_S390(def->os.arch)) {
/* We haven't added any USB controller yet, but we haven't been asked /* We haven't added any USB controller yet, but we haven't been asked
* not to add one either. Add a legacy USB controller, unless we're * not to add one either. Add a legacy USB controller, unless we're

View File

@ -3256,7 +3256,7 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
case VIR_ARCH_AARCH64: case VIR_ARCH_AARCH64:
addDefaultUSB = false; addDefaultUSB = false;
addDefaultMemballoon = false; addDefaultMemballoon = false;
if (qemuDomainIsVirt(def)) if (qemuDomainIsARMVirt(def))
addPCIeRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX); addPCIeRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX);
break; break;
@ -3437,7 +3437,7 @@ qemuDomainDefEnableDefaultFeatures(virDomainDefPtr def,
* was not included in the domain XML, we need to choose a suitable * was not included in the domain XML, we need to choose a suitable
* GIC version ourselves */ * GIC version ourselves */
if ((def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ABSENT && if ((def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ABSENT &&
qemuDomainIsVirt(def)) || qemuDomainIsARMVirt(def)) ||
(def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON && (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON &&
def->gic_version == VIR_GIC_VERSION_NONE)) { def->gic_version == VIR_GIC_VERSION_NONE)) {
virGICVersion version; virGICVersion version;
@ -3889,7 +3889,7 @@ qemuDomainDefValidateFeatures(const virDomainDef *def,
case VIR_DOMAIN_FEATURE_GIC: case VIR_DOMAIN_FEATURE_GIC:
if (def->features[i] == VIR_TRISTATE_SWITCH_ON && if (def->features[i] == VIR_TRISTATE_SWITCH_ON &&
!qemuDomainIsVirt(def)) { !qemuDomainIsARMVirt(def)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("The '%s' feature is not supported for " _("The '%s' feature is not supported for "
"architecture '%s' or machine type '%s'"), "architecture '%s' or machine type '%s'"),
@ -4302,7 +4302,7 @@ qemuDomainChrDefValidate(const virDomainChrDef *dev,
isCompatible = false; isCompatible = false;
} }
if (!qemuDomainIsVirt(def) && if (!qemuDomainIsARMVirt(def) &&
(dev->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SYSTEM || (dev->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SYSTEM ||
dev->targetModel == VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PL011)) { dev->targetModel == VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PL011)) {
isCompatible = false; isCompatible = false;
@ -5827,7 +5827,7 @@ qemuDomainDefaultNetModel(const virDomainDef *def,
if (STREQ(def->os.machine, "versatilepb")) if (STREQ(def->os.machine, "versatilepb"))
return "smc91c111"; return "smc91c111";
if (qemuDomainIsVirt(def)) if (qemuDomainIsARMVirt(def))
return "virtio"; return "virtio";
/* Incomplete. vexpress (and a few others) use this, but not all /* Incomplete. vexpress (and a few others) use this, but not all
@ -6127,7 +6127,7 @@ qemuDomainChrDefPostParse(virDomainChrDefPtr chr,
chr->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA; chr->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA;
} else if (qemuDomainIsPSeries(def)) { } else if (qemuDomainIsPSeries(def)) {
chr->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO; chr->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO;
} else if (qemuDomainIsVirt(def)) { } else if (qemuDomainIsARMVirt(def)) {
chr->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SYSTEM; chr->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SYSTEM;
} else if (ARCH_IS_S390(def->os.arch)) { } else if (ARCH_IS_S390(def->os.arch)) {
chr->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP; chr->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP;
@ -6321,7 +6321,7 @@ qemuDomainDeviceVideoDefPostParse(virDomainVideoDefPtr video,
if (video->type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT) { if (video->type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT) {
if (ARCH_IS_PPC64(def->os.arch)) if (ARCH_IS_PPC64(def->os.arch))
video->type = VIR_DOMAIN_VIDEO_TYPE_VGA; video->type = VIR_DOMAIN_VIDEO_TYPE_VGA;
else if (qemuDomainIsVirt(def) || ARCH_IS_S390(def->os.arch)) else if (qemuDomainIsARMVirt(def) || ARCH_IS_S390(def->os.arch))
video->type = VIR_DOMAIN_VIDEO_TYPE_VIRTIO; video->type = VIR_DOMAIN_VIDEO_TYPE_VIRTIO;
else else
video->type = VIR_DOMAIN_VIDEO_TYPE_CIRRUS; video->type = VIR_DOMAIN_VIDEO_TYPE_CIRRUS;
@ -9531,14 +9531,14 @@ qemuDomainMachineIsS390CCW(const char *machine)
bool bool
qemuDomainIsVirt(const virDomainDef *def) qemuDomainIsARMVirt(const virDomainDef *def)
{ {
return qemuDomainMachineIsVirt(def->os.machine, def->os.arch); return qemuDomainMachineIsARMVirt(def->os.machine, def->os.arch);
} }
bool bool
qemuDomainMachineIsVirt(const char *machine, qemuDomainMachineIsARMVirt(const char *machine,
const virArch arch) const virArch arch)
{ {
if (arch != VIR_ARCH_ARMV7L && if (arch != VIR_ARCH_ARMV7L &&

View File

@ -814,7 +814,7 @@ bool qemuDomainHasPCIRoot(const virDomainDef *def);
bool qemuDomainHasPCIeRoot(const virDomainDef *def); bool qemuDomainHasPCIeRoot(const virDomainDef *def);
bool qemuDomainNeedsFDC(const virDomainDef *def); bool qemuDomainNeedsFDC(const virDomainDef *def);
bool qemuDomainIsS390CCW(const virDomainDef *def); bool qemuDomainIsS390CCW(const virDomainDef *def);
bool qemuDomainIsVirt(const virDomainDef *def); bool qemuDomainIsARMVirt(const virDomainDef *def);
bool qemuDomainIsPSeries(const virDomainDef *def); bool qemuDomainIsPSeries(const virDomainDef *def);
bool qemuDomainHasBuiltinIDE(const virDomainDef *def); bool qemuDomainHasBuiltinIDE(const virDomainDef *def);
@ -822,7 +822,7 @@ bool qemuDomainMachineIsQ35(const char *machine);
bool qemuDomainMachineIsI440FX(const char *machine); bool qemuDomainMachineIsI440FX(const char *machine);
bool qemuDomainMachineNeedsFDC(const char *machine); bool qemuDomainMachineNeedsFDC(const char *machine);
bool qemuDomainMachineIsS390CCW(const char *machine); bool qemuDomainMachineIsS390CCW(const char *machine);
bool qemuDomainMachineIsVirt(const char *machine, bool qemuDomainMachineIsARMVirt(const char *machine,
const virArch arch); const virArch arch);
bool qemuDomainMachineIsPSeries(const char *machine, bool qemuDomainMachineIsPSeries(const char *machine,
const virArch arch); const virArch arch);

View File

@ -468,7 +468,7 @@ qemuDomainAssignARMVirtioMMIOAddresses(virDomainDefPtr def,
return; return;
if (!(STRPREFIX(def->os.machine, "vexpress-") || if (!(STRPREFIX(def->os.machine, "vexpress-") ||
qemuDomainIsVirt(def))) qemuDomainIsARMVirt(def)))
return; return;
/* We use virtio-mmio by default on mach-virt guests only if they already /* We use virtio-mmio by default on mach-virt guests only if they already
@ -2163,7 +2163,7 @@ qemuDomainSupportsPCI(virDomainDefPtr def,
if (STREQ(def->os.machine, "versatilepb")) if (STREQ(def->os.machine, "versatilepb"))
return true; return true;
if (qemuDomainIsVirt(def) && if (qemuDomainIsARMVirt(def) &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX)) virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX))
return true; return true;