提交 4b48ba4a 编写于 作者: P Peter Krempa

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.
上级 91081979
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册