From nobody Fri May 3 05:06:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594825732; cv=none; d=zohomail.com; s=zohoarc; b=k9hg9c2OzUy+SO83wnL8bKw3RMbHNFVnYT9jmRhLh/EGm3dM2MgjHcvWBneDccCrME0JTSAL9jhhkR9PdcEWf7ru2/fBhBUTmjm6//7JT4qUqVOnsIugLPKcI3Iu9HgwPc8RUBwzOrHzCpQqdjZWcqBI37uFzaITcQc7t8m0OPI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594825732; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=uPC9ccZv4IhQymvRnUc1RnNX0ofoWO7Kw1/4W79FGF4=; b=G9aJVuq1PSVfAc1ZMAE95O6sb/j6y1qkvHEjMIqbe4fXvwUl2C7DBik517KdyJXnPEeyd9FUQ0t8sUkV9B2o2wo03qbRuaqgr5JVzYOAa1vnMq5u4GzpWkNuPQGb4jsh7qXbcAOUWxmGGSziK/pQ5li3h+PvtyyQu33Ajgte6HY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 159482573236346.93431035210756; Wed, 15 Jul 2020 08:08:52 -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-45-1_-NWbvqOeKzTwrqrhpXaA-1; Wed, 15 Jul 2020 11:08:48 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 340898015F3; Wed, 15 Jul 2020 15:08:40 +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 D7C4C710DE; Wed, 15 Jul 2020 15:08:39 +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 535D394EE6; Wed, 15 Jul 2020 15:08:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06FF8a28021400 for ; Wed, 15 Jul 2020 11:08:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id EE10317D04; Wed, 15 Jul 2020 15:08:36 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 51D6E5D9CA; Wed, 15 Jul 2020 15:08:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594825731; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uPC9ccZv4IhQymvRnUc1RnNX0ofoWO7Kw1/4W79FGF4=; b=H9c8nZTJX0iwztLH0szWRZJsxr5McnpyVF5fRUKxjKZ8kklIgIgGOAty8xN714mcGqcSOj 0a+6VmgPcpscW2TnpuNlz+RIH7yMFNzZ+nCeEKGqfZUwAJLcr21Vm0jcuGKYrGgHuSaPTy 3eOB1Xd2WEKuhyKHtHn669Zf/Bq2hgw= X-MC-Unique: 1_-NWbvqOeKzTwrqrhpXaA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH] Partially revert "qemu: fix missing error reports in capabilities probing" Date: Wed, 15 Jul 2020 16:08:31 +0100 Message-Id: <20200715150831.222155-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com 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.15 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) This partially reverts commit 5331c4804f4f419b9e75741084f926e52413d3a1. The original commit mistakenly thought virFileCacheLookup did not set an error. In fact the only case it doesn't set an error for is when the cache key is NULL. This in fact the fault of the caller for passing an invalid cache key, so doesn't need to be handled. This caller bug was fixed by checking for a NULL binary in the virQEMUCapsCacheLookupDefault method. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 5 ----- src/qemu/qemu_domain.c | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index b27a5e5c81..7264fe300f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -5636,11 +5636,6 @@ virQEMUCapsCacheLookup(virFileCachePtr cache, priv->microcodeVersion =3D virHostCPUGetMicrocodeVersion(); =20 ret =3D virFileCacheLookup(cache, binary); - if (!ret) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("no capabilities available for %s"), binary); - return NULL; - } =20 VIR_DEBUG("Returning caps %p for %s", ret, binary); return ret; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 4a2daffc0a..6147333381 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5256,10 +5256,8 @@ qemuDomainPostParseDataAlloc(const virDomainDef *def, virQEMUDriverPtr driver =3D opaque; =20 if (!(*parseOpaque =3D virQEMUCapsCacheLookup(driver->qemuCapsCache, - def->emulator))) { - virResetLastError(); + def->emulator))) return 1; - } =20 return 0; } --=20 2.26.2