]> xenbits.xensource.com Git - libvirt.git/commitdiff
cpu: Remove the verification conditions of the model in the x86 signatures
authorYingle Hou <houyingle@hygon.cn>
Thu, 12 Dec 2019 02:58:18 +0000 (10:58 +0800)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 13 Dec 2019 13:05:00 +0000 (13:05 +0000)
The x86ModelParseSignatures function makes an assumption that CPU signature
model equals 0 as an invalid case. While in Hygon processor definition, A1
version (model 0, stepping 1) is mass production version, to support Hygon
Dhyana A1 version, we have removed CPU signature model zero checking condition.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Yingle Hou <houyingle@hygon.cn>
src/cpu/cpu_x86.c

index 1e913cc9fa1828c790c315b9ffdc9d0b80c24e1b..9b7981d574b29a38fdd8aeb028ce54bd2e4b4d0d 100644 (file)
@@ -1418,7 +1418,7 @@ x86ModelParseSignatures(virCPUx86ModelPtr model,
         }
 
         rc = virXPathUInt("string(@model)", ctxt, &sigModel);
-        if (rc < 0 || sigModel == 0) {
+        if (rc < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("Invalid CPU signature model in model %s"),
                            model->name);