提交 dbc04114 编写于 作者: J Jiri Denemark

cpu_x86: Require <cpuid> within <feature> in CPU map

A feature with no cpuid element is invalid and it should not be silently
treated as a feature with all CPUID bits set to zero.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 be46f613
......@@ -924,6 +924,13 @@ x86FeatureParse(xmlXPathContextPtr ctxt,
if (n < 0)
goto cleanup;
if (n == 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Missing cpuid for feature %s"),
feature->name);
goto cleanup;
}
for (i = 0; i < n; i++) {
ctxt->node = nodes[i];
if (x86ParseCPUID(ctxt, &cpuid) < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册