On Wed, Jan 22, 2025 at 12:17:01PM -0300, Daniel Henrique Barboza wrote:
This feature is implemented as a string that can range from "none", "aplic" and "aplic-imsic".If the feature isn't present in the domain XML the hypervisor default will be used. For QEMU, at least up to 9.2, the default is "none". Signed-off-by: Daniel Henrique Barboza <[email protected]> --- docs/formatdomain.rst | 8 +++++++ src/conf/domain_conf.c | 40 +++++++++++++++++++++++++++++++ src/conf/domain_conf.h | 12 ++++++++++ src/conf/schemas/domaincommon.rng | 15 ++++++++++++ src/libvirt_private.syms | 2 ++ src/qemu/qemu_validate.c | 15 ++++++++++++ 6 files changed, 92 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3f88a77a8f..5e7b9edf8f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -17171,6 +17180,18 @@ virDomainFeaturesDefParse(virDomainDef *def, break; } + case VIR_DOMAIN_FEATURE_AIA: { + virDomainAIA value; + + if (virXMLPropEnumDefault(nodes[i], "value", virDomainAIATypeFromString, + VIR_XML_PROP_NONZERO, &value, + VIR_DOMAIN_AIA_NONE) < 0)
This should be changed to VIR_DOMAIN_AIA_DEFAULT
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 086c66b602..0a086d9cf4 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -264,6 +264,21 @@ qemuValidateDomainDefFeatures(const virDomainDef *def,
}
break;
+ case VIR_DOMAIN_FEATURE_AIA:
+ if (def->features[i] != VIR_TRISTATE_SWITCH_ABSENT &&
+ !qemuDomainIsRISCVVirt(def)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("aia feature is only supported with RISC-V Virt
machines"));
+ return -1;
+ }
+ if (def->features[i] != VIR_TRISTATE_SWITCH_ABSENT &&
Copy-paste error. Even though this would work I'd rather you used VIR_DOMAIN_AIA_DEFAULT in both of the conditions above instead of the VIR_TRISTATE value. With the changes: Reviewed-by: Martin Kletzander <[email protected]>
signature.asc
Description: PGP signature
