mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
b2d4ae0ec3
commit
8109f80720
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 ||
|
||||
|
|
Loading…
Reference in New Issue