mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
conf: qemu: Taint VMs using custom device tree blob
Using a custom device tree image may cause unexpected behavior in architectures that use this approach to detect platform devices. Since usually the device tree is generated by qemu and thus it's not normally used let's taint VMs using it to make it obvious as a possible source of problems.
This commit is contained in:
parent
91081979dd
commit
4b48ba4af5
@ -102,7 +102,8 @@ VIR_ENUM_IMPL(virDomainTaint, VIR_DOMAIN_TAINT_LAST,
|
||||
"external-launch",
|
||||
"host-cpu",
|
||||
"hook-script",
|
||||
"cdrom-passthrough");
|
||||
"cdrom-passthrough",
|
||||
"custom-dtb");
|
||||
|
||||
VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
|
||||
"qemu",
|
||||
|
@ -2305,6 +2305,7 @@ typedef enum {
|
||||
VIR_DOMAIN_TAINT_HOST_CPU, /* Host CPU passthrough in use */
|
||||
VIR_DOMAIN_TAINT_HOOK, /* Domain (possibly) changed via hook script */
|
||||
VIR_DOMAIN_TAINT_CDROM_PASSTHROUGH,/* CDROM passthrough */
|
||||
VIR_DOMAIN_TAINT_CUSTOM_DTB, /* Custom device tree blob was specifed */
|
||||
|
||||
VIR_DOMAIN_TAINT_LAST
|
||||
} virDomainTaintFlags;
|
||||
|
@ -2117,6 +2117,9 @@ void qemuDomainObjCheckTaint(virQEMUDriverPtr driver,
|
||||
for (i = 0; i < obj->def->nnets; i++)
|
||||
qemuDomainObjCheckNetTaint(driver, obj, obj->def->nets[i], logFD);
|
||||
|
||||
if (obj->def->os.dtb)
|
||||
qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_CUSTOM_DTB, logFD);
|
||||
|
||||
virObjectUnref(cfg);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user