mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
qemu: Add arch parameter to qemuDomainMachine*()
We want the signatures to be consistent, and also we're going to start using the additional parameter next. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
4028d7a46a
commit
9a5ce5cb29
@ -5243,7 +5243,7 @@ virQEMUCapsFillDomainDeviceDiskCaps(virQEMUCapsPtr qemuCaps,
|
||||
VIR_DOMAIN_CAPS_ENUM_SET(disk->bus, VIR_DOMAIN_DISK_BUS_FDC);
|
||||
}
|
||||
|
||||
if (qemuDomainMachineHasBuiltinIDE(machine))
|
||||
if (qemuDomainMachineHasBuiltinIDE(machine, qemuCaps->arch))
|
||||
VIR_DOMAIN_CAPS_ENUM_SET(disk->bus, VIR_DOMAIN_DISK_BUS_IDE);
|
||||
|
||||
VIR_DOMAIN_CAPS_ENUM_SET(disk->bus,
|
||||
|
@ -9876,7 +9876,8 @@ qemuFindAgentConfig(virDomainDefPtr def)
|
||||
|
||||
|
||||
bool
|
||||
qemuDomainMachineIsQ35(const char *machine)
|
||||
qemuDomainMachineIsQ35(const char *machine,
|
||||
const virArch arch ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return (STRPREFIX(machine, "pc-q35-") ||
|
||||
STREQ(machine, "q35"));
|
||||
@ -9884,7 +9885,8 @@ qemuDomainMachineIsQ35(const char *machine)
|
||||
|
||||
|
||||
bool
|
||||
qemuDomainMachineIsI440FX(const char *machine)
|
||||
qemuDomainMachineIsI440FX(const char *machine,
|
||||
const virArch arch ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return (STREQ(machine, "pc") ||
|
||||
STRPREFIX(machine, "pc-0.") ||
|
||||
@ -9895,7 +9897,8 @@ qemuDomainMachineIsI440FX(const char *machine)
|
||||
|
||||
|
||||
bool
|
||||
qemuDomainMachineIsS390CCW(const char *machine)
|
||||
qemuDomainMachineIsS390CCW(const char *machine,
|
||||
const virArch arch ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return STRPREFIX(machine, "s390-ccw");
|
||||
}
|
||||
@ -9949,9 +9952,10 @@ qemuDomainMachineIsPSeries(const char *machine,
|
||||
|
||||
|
||||
bool
|
||||
qemuDomainMachineHasBuiltinIDE(const char *machine)
|
||||
qemuDomainMachineHasBuiltinIDE(const char *machine,
|
||||
const virArch arch)
|
||||
{
|
||||
return qemuDomainMachineIsI440FX(machine) ||
|
||||
return qemuDomainMachineIsI440FX(machine, arch) ||
|
||||
STREQ(machine, "malta") ||
|
||||
STREQ(machine, "sun4u") ||
|
||||
STREQ(machine, "g3beige");
|
||||
@ -9959,7 +9963,8 @@ qemuDomainMachineHasBuiltinIDE(const char *machine)
|
||||
|
||||
|
||||
bool
|
||||
qemuDomainMachineNeedsFDC(const char *machine)
|
||||
qemuDomainMachineNeedsFDC(const char *machine,
|
||||
const virArch arch ATTRIBUTE_UNUSED)
|
||||
{
|
||||
const char *p = STRSKIP(machine, "pc-q35-");
|
||||
|
||||
@ -9979,21 +9984,21 @@ qemuDomainMachineNeedsFDC(const char *machine)
|
||||
bool
|
||||
qemuDomainIsQ35(const virDomainDef *def)
|
||||
{
|
||||
return qemuDomainMachineIsQ35(def->os.machine);
|
||||
return qemuDomainMachineIsQ35(def->os.machine, def->os.arch);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
qemuDomainIsI440FX(const virDomainDef *def)
|
||||
{
|
||||
return qemuDomainMachineIsI440FX(def->os.machine);
|
||||
return qemuDomainMachineIsI440FX(def->os.machine, def->os.arch);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
qemuDomainIsS390CCW(const virDomainDef *def)
|
||||
{
|
||||
return qemuDomainMachineIsS390CCW(def->os.machine);
|
||||
return qemuDomainMachineIsS390CCW(def->os.machine, def->os.arch);
|
||||
}
|
||||
|
||||
|
||||
@ -10051,14 +10056,14 @@ qemuDomainHasPCIeRoot(const virDomainDef *def)
|
||||
bool
|
||||
qemuDomainHasBuiltinIDE(const virDomainDef *def)
|
||||
{
|
||||
return qemuDomainMachineHasBuiltinIDE(def->os.machine);
|
||||
return qemuDomainMachineHasBuiltinIDE(def->os.machine, def->os.arch);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
qemuDomainNeedsFDC(const virDomainDef *def)
|
||||
{
|
||||
return qemuDomainMachineNeedsFDC(def->os.machine);
|
||||
return qemuDomainMachineNeedsFDC(def->os.machine, def->os.arch);
|
||||
}
|
||||
|
||||
|
||||
|
@ -828,17 +828,22 @@ void qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
|
||||
|
||||
virDomainChrDefPtr qemuFindAgentConfig(virDomainDefPtr def);
|
||||
|
||||
bool qemuDomainMachineIsQ35(const char *machine);
|
||||
bool qemuDomainMachineIsI440FX(const char *machine);
|
||||
bool qemuDomainMachineIsS390CCW(const char *machine);
|
||||
bool qemuDomainMachineIsQ35(const char *machine,
|
||||
const virArch arch);
|
||||
bool qemuDomainMachineIsI440FX(const char *machine,
|
||||
const virArch arch);
|
||||
bool qemuDomainMachineIsS390CCW(const char *machine,
|
||||
const virArch arch);
|
||||
bool qemuDomainMachineIsARMVirt(const char *machine,
|
||||
const virArch arch);
|
||||
bool qemuDomainMachineIsRISCVVirt(const char *machine,
|
||||
const virArch arch);
|
||||
bool qemuDomainMachineIsPSeries(const char *machine,
|
||||
const virArch arch);
|
||||
bool qemuDomainMachineHasBuiltinIDE(const char *machine);
|
||||
bool qemuDomainMachineNeedsFDC(const char *machine);
|
||||
bool qemuDomainMachineHasBuiltinIDE(const char *machine,
|
||||
const virArch arch);
|
||||
bool qemuDomainMachineNeedsFDC(const char *machine,
|
||||
const virArch arch);
|
||||
|
||||
bool qemuDomainIsQ35(const virDomainDef *def);
|
||||
bool qemuDomainIsI440FX(const virDomainDef *def);
|
||||
|
Loading…
Reference in New Issue
Block a user