]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Introduce VIR_DOMAIN_TAINT_CUSTOM_DEVICE and use it in qemu
authorPeter Krempa <pkrempa@redhat.com>
Mon, 21 Mar 2022 14:48:17 +0000 (15:48 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 28 Mar 2022 11:15:25 +0000 (13:15 +0200)
Taint the domain object when the user requests custom device properties.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_domain.c

index 731139f80fcbc135670d806606e53cdba2914447..ba8dd7d7d075f838fe3d38f3eb6977878d7be408 100644 (file)
@@ -88,6 +88,7 @@ VIR_ENUM_IMPL(virDomainTaint,
               "custom-ga-command",
               "custom-hypervisor-feature",
               "deprecated-config",
+              "custom-device",
 );
 
 VIR_ENUM_IMPL(virDomainTaintMessage,
@@ -105,6 +106,7 @@ VIR_ENUM_IMPL(virDomainTaintMessage,
               N_("custom guest agent control commands issued"),
               N_("hypervisor feature autodetection override"),
               N_("use of deprecated configuration settings"),
+              N_("custom device configuration"),
 );
 
 VIR_ENUM_IMPL(virDomainVirt,
index 49c964e6e1c0f5e62cde8e1d5222fb4663fb8137..c58fe3cb0f0e0eedb0790c2be86c4f28a8dae217 100644 (file)
@@ -3011,6 +3011,7 @@ typedef enum {
     VIR_DOMAIN_TAINT_CUSTOM_GA_COMMAND, /* Custom guest agent command */
     VIR_DOMAIN_TAINT_CUSTOM_HYPERVISOR_FEATURE, /* custom hypervisor feature control */
     VIR_DOMAIN_TAINT_DEPRECATED_CONFIG,  /* Configuration that is marked deprecated */
+    VIR_DOMAIN_TAINT_CUSTOM_DEVICE, /* hypervisor device config customized */
 
     VIR_DOMAIN_TAINT_LAST
 } virDomainTaintFlags;
index cabadfcb75abf0d18c0739e4df7fa560a3463e3a..18d403e099eb785265343ba861625d37967a8539 100644 (file)
@@ -6712,6 +6712,9 @@ void qemuDomainObjCheckTaint(virQEMUDriver *driver,
             qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_CUSTOM_ARGV, logCtxt);
         if (qemuxmlns->capsadd || qemuxmlns->capsdel)
             custom_hypervisor_feat = true;
+
+        if (qemuxmlns->ndeviceOverride > 0)
+            qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_CUSTOM_DEVICE, logCtxt);
     }
 
     if (custom_hypervisor_feat ||