mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
qemu: capabilities: Introduce virQEMUCapsMachineSupportsACPI
The helper returns the 'acpi' flag for a given machine type. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
795642b985
commit
cbdaf87f96
@ -2540,6 +2540,22 @@ virQEMUCapsIsMachineDeprecated(virQEMUCaps *qemuCaps,
|
||||
}
|
||||
|
||||
|
||||
virTristateBool
|
||||
virQEMUCapsMachineSupportsACPI(virQEMUCaps *qemuCaps,
|
||||
virDomainVirtType type,
|
||||
const char *machine)
|
||||
{
|
||||
virQEMUCapsAccel *accel = virQEMUCapsGetAccel(qemuCaps, type);
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < accel->nmachineTypes; i++) {
|
||||
if (STREQ_NULLABLE(accel->machineTypes[i].name, machine))
|
||||
return accel->machineTypes[i].acpi;
|
||||
}
|
||||
return VIR_TRISTATE_BOOL_ABSENT;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
virQEMUCapsGetMachineNumaMemSupported(virQEMUCaps *qemuCaps,
|
||||
virDomainVirtType virtType,
|
||||
|
@ -767,6 +767,9 @@ bool virQEMUCapsIsCPUDeprecated(virQEMUCaps *qemuCaps,
|
||||
bool virQEMUCapsIsMachineDeprecated(virQEMUCaps *qemuCaps,
|
||||
virDomainVirtType type,
|
||||
const char *machine);
|
||||
virTristateBool virQEMUCapsMachineSupportsACPI(virQEMUCaps *qemuCaps,
|
||||
virDomainVirtType type,
|
||||
const char *machine);
|
||||
bool virQEMUCapsGetMachineNumaMemSupported(virQEMUCaps *qemuCaps,
|
||||
virDomainVirtType virtType,
|
||||
const char *name);
|
||||
|
Loading…
Reference in New Issue
Block a user