From nobody Sun May 5 13:10:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1603814694; cv=none; d=zohomail.com; s=zohoarc; b=YD/dwL052OzeYzejiO2+Euh0e2WdeUiFKSLuCtvlH2l5LWRHdiu6ibYM+GyaWqEGjf6SzeGjeTKahj/u5oJ3jKu5tmFSmNDLFeYnf/Re/N1jbgDsQemKPG6AzKPTVzCV2fIkz6qhE43f6C6H2ntMEsP/rY1Y1t7pH1qO1qdIwwg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603814694; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=9OfVesxNNr1dxrNVdvzxEZXmpvYsulokeGyyJ73t8X4=; b=fKWpZVjGhb6dhDelcDO/XePbs32DP85sP6yq8cQe0cFAgAo2e9ojWFBrnjLCAfa84+FwyFxfX3qlw+5U1gOyuBuxi4385Zxl6TW7KVjn/w2lVIiQ5UstyDZaqShBuM/aICOvkFWngRa79cASREwhj7n2g7fSzBKQhMA9xTz5PJE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1603814694731440.95680223277907; Tue, 27 Oct 2020 09:04:54 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-63-Sk5arNjoNdm3IuF4RvICew-1; Tue, 27 Oct 2020 12:04:50 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D860B108E1A7; Tue, 27 Oct 2020 16:04:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 473DB5B4C5; Tue, 27 Oct 2020 16:04:41 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 08A43CF4A; Tue, 27 Oct 2020 16:04:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09RG4bV0015490 for ; Tue, 27 Oct 2020 12:04:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1B6092144B32; Tue, 27 Oct 2020 16:04:37 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 10EA42144B33 for ; Tue, 27 Oct 2020 16:04:34 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BD88E85829E for ; Tue, 27 Oct 2020 16:04:34 +0000 (UTC) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-424-_x-lu8aLNAyFzjebmWrLMg-1; Tue, 27 Oct 2020 12:04:31 -0400 Received: by mail-qk1-f195.google.com with SMTP id r7so1655609qkf.3 for ; Tue, 27 Oct 2020 09:04:31 -0700 (PDT) Received: from localhost.localdomain ([191.17.238.164]) by smtp.gmail.com with ESMTPSA id p19sm1047577qtw.24.2020.10.27.09.04.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 09:04:29 -0700 (PDT) X-MC-Unique: Sk5arNjoNdm3IuF4RvICew-1 X-MC-Unique: _x-lu8aLNAyFzjebmWrLMg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9OfVesxNNr1dxrNVdvzxEZXmpvYsulokeGyyJ73t8X4=; b=t+ph+e0yU4cHOeRj7tCcBIe+qL/FLLvEIuWtQZ9wtC00uELDeOauLvVV8cuoox9l0k 251JuU3cP3UW6kovSkZPb0Z6nP+CGsUjco+5IKmaJQSiIR1c90O5ePopcOCPAWVA+86M MVzukBftD/F+6INy+MtbWwuvf2lZ+N3O0Afbgm9q0ItfmTdVcZB0cbT9h6az9QqdLCFD ZlJ9X450usu0VzOmtstuyEnsn9zerCe6Ib4krDUUP90/EIxEgO4kQ6tGCiRJTmtSQbp+ ZPai5CUQ4FLQqi/rpJ1ETcDsyfJROBF+4sx4Y/lGkniXai1fymGk9gdn0gSRYVp8Rg7d GkAA== X-Gm-Message-State: AOAM532LFcW92cezzuMrXkUN0pUmsKjMUYzJhoiVFRSMaPj/TXfxbarn b9GUJid1bs8nl5PFmPeTidPXsssrkfOpbA== X-Google-Smtp-Source: ABdhPJy66dRlB6g6d6RLvwFolFZF9/QW9lZXSHzUxOb3Ui0nw8GVPtehZVZAyRdN3rXIPGrZohR51w== X-Received: by 2002:a05:620a:2148:: with SMTP id m8mr2815101qkm.19.1603814670549; Tue, 27 Oct 2020 09:04:30 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Subject: [PATCH v2] cpu_ppc64: compare CPU function is ignoring return value Date: Tue, 27 Oct 2020 13:04:24 -0300 Message-Id: <20201027160424.19259-1-jcfaracco@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Julio Faracco X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Function to compare CPU on 64-bits PowerPC is ignoring the flag to avoid fa= ilure in case of CPUs (host and guest) are incompatible. Basically, the function = is returning -1 even if it is set to continue. Signed-off-by: Julio Faracco Reviewed-by: J=C3=A1n Tomko --- src/cpu/cpu_ppc64.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index 2fedcd25da..555eeecbe7 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -524,11 +524,11 @@ virCPUppc64Compare(virCPUDefPtr host, if (failIncompatible) { virReportError(VIR_ERR_CPU_INCOMPATIBLE, "%s", _("unknown host CPU")); - } else { - VIR_WARN("unknown host CPU"); - ret =3D VIR_CPU_COMPARE_INCOMPATIBLE; + return VIR_CPU_COMPARE_ERROR; } - return -1; + + VIR_WARN("unknown host CPU"); + return VIR_CPU_COMPARE_INCOMPATIBLE; } =20 ret =3D ppc64Compute(host, cpu, NULL, &message); --=20 2.25.1