qemu: add qemuDomainIsRISCVVirt() and qemuDomainMachineIsRISCVVirt()

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:24 +02:00 committed by Andrea Bolognani
parent 93f165331d
commit ee57f38c46
2 changed files with 25 additions and 0 deletions

View File

@ -9555,6 +9555,28 @@ qemuDomainMachineIsARMVirt(const char *machine,
}
bool
qemuDomainIsRISCVVirt(const virDomainDef *def)
{
return qemuDomainMachineIsRISCVVirt(def->os.machine, def->os.arch);
}
bool
qemuDomainMachineIsRISCVVirt(const char *machine,
const virArch arch)
{
if (!ARCH_IS_RISCV(arch))
return false;
if (STRNEQ(machine, "virt") &&
!STRPREFIX(machine, "virt-"))
return false;
return true;
}
bool
qemuDomainIsPSeries(const virDomainDef *def)
{

View File

@ -815,6 +815,7 @@ bool qemuDomainHasPCIeRoot(const virDomainDef *def);
bool qemuDomainNeedsFDC(const virDomainDef *def);
bool qemuDomainIsS390CCW(const virDomainDef *def);
bool qemuDomainIsARMVirt(const virDomainDef *def);
bool qemuDomainIsRISCVVirt(const virDomainDef *def);
bool qemuDomainIsPSeries(const virDomainDef *def);
bool qemuDomainHasBuiltinIDE(const virDomainDef *def);
@ -824,6 +825,8 @@ bool qemuDomainMachineNeedsFDC(const char *machine);
bool qemuDomainMachineIsS390CCW(const char *machine);
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);