Taint the domain object when the user requests custom device properties.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/domain_conf.c | 2 ++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_domain.c | 3 +++
3 files changed, 6 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 153954a0b0..261fec888e 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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,
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index b69abfa270..b50923d499 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3010,6 +3010,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;
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 636e58061e..200c05c0bb 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -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 ||
--
2.35.1