mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Default to GIC v2
When a domain is configured to use GIC but no version has been specified by the user, default to GIC v2.
This commit is contained in:
parent
768b7ed2c8
commit
5b2c2a1023
@ -1239,6 +1239,23 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qemuDomainDefEnableDefaultFeatures:
|
||||||
|
* @def: domain definition
|
||||||
|
*
|
||||||
|
* Make sure that features that should be enabled by default are actually
|
||||||
|
* enabled and configure default values related to those features.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
qemuDomainDefEnableDefaultFeatures(virDomainDefPtr def)
|
||||||
|
{
|
||||||
|
/* Default to GIC v2 if no version was specified */
|
||||||
|
if (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON &&
|
||||||
|
def->gic_version == VIR_GIC_VERSION_NONE)
|
||||||
|
def->gic_version = VIR_GIC_VERSION_2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuCanonicalizeMachine(virDomainDefPtr def, virQEMUCapsPtr qemuCaps)
|
qemuCanonicalizeMachine(virDomainDefPtr def, virQEMUCapsPtr qemuCaps)
|
||||||
{
|
{
|
||||||
@ -1290,6 +1307,8 @@ qemuDomainDefPostParse(virDomainDefPtr def,
|
|||||||
if (qemuCanonicalizeMachine(def, qemuCaps) < 0)
|
if (qemuCanonicalizeMachine(def, qemuCaps) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
qemuDomainDefEnableDefaultFeatures(def);
|
||||||
|
|
||||||
if (virSecurityManagerVerify(driver->securityManager, def) < 0)
|
if (virSecurityManagerVerify(driver->securityManager, def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user