conf: Introduce VIR_DOMAIN_TAINT_CUSTOM_DEVICE and use it in qemu

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>
This commit is contained in:
Peter Krempa 2022-03-21 15:48:17 +01:00
parent b2d4ae0ec3
commit 8109f80720
3 changed files with 6 additions and 0 deletions

View 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,

View 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;

View 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 ||