]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: Do not parse hyperv features with passthrough mode
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 10 Jan 2025 14:56:34 +0000 (15:56 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 13 Jan 2025 13:03:21 +0000 (14:03 +0100)
The schema does not allow that anyway and we then format them all back
which leads to libvirt producing an invalid XML.

Resolves: https://issues.redhat.com/browse/RHEL-70656
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c

index e658b68c48b659e02688fb050d0405d850cce961..3f88a77a8feaf7c6ea021717178092349b48728a 100644 (file)
@@ -16643,6 +16643,9 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def,
 
     def->features[VIR_DOMAIN_FEATURE_HYPERV] = mode;
 
+    if (mode == VIR_DOMAIN_HYPERV_MODE_PASSTHROUGH)
+        return 0;
+
     node = xmlFirstElementChild(node);
     while (node != NULL) {
         int feature;