提交 0a24331c 编写于 作者: J Jiri Denemark

cpu_s390: Don't check match attribute for host-model CPUs

The match attribute is only relevant for custom mode CPUs. Reporting
failure when match == 'minimum' regardless on CPU mode can cause
unexpected failures. We should only report the error for custom CPUs. In
fact, calling virCPUs390Update on a custom mode CPU should always report
an error as optional features are not supported on s390 either.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 af8e3992
...@@ -49,15 +49,15 @@ virCPUs390Update(virCPUDefPtr guest, ...@@ -49,15 +49,15 @@ virCPUs390Update(virCPUDefPtr guest,
int ret = -1; int ret = -1;
size_t i; size_t i;
if (guest->match == VIR_CPU_MATCH_MINIMUM) { if (guest->mode == VIR_CPU_MODE_CUSTOM) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, if (guest->match == VIR_CPU_MATCH_MINIMUM) {
_("match mode %s not supported"), virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
virCPUMatchTypeToString(guest->match)); _("match mode %s not supported"),
goto cleanup; virCPUMatchTypeToString(guest->match));
} } else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
if (guest->mode != VIR_CPU_MODE_HOST_MODEL) { _("optional CPU features are not supported"));
ret = 0; }
goto cleanup; goto cleanup;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册