From nobody Fri May 3 03:49:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1638968474; cv=none; d=zohomail.com; s=zohoarc; b=IT6nUqz538/AtMiFCmAqHOf2Gcoaa5YNcD+Sq1vopHcpREstrbDb1DDabXe3bWmZCHWYkJg7JJNwK7bs1tOap3R3i2umER9XIhdv5vZAeR/a++2DNgcpBLNxiVGVjtpsn8jknmFIF2QfVHo1eYmAPO9n5X5qrd1mDN/UCKNuJ2M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638968474; 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=sikNan6u+NLLopzaLycGEBjoO0WcXzf78TV9iPJX2hk=; b=U2fRcNhJJ9/ZKLJZqa7zP5uqJlyDC78LwNYG9TkP9dORWRuACRGcpP22r6zKpG5eom1ir0M5m6t49nNYufoSCgcx0b83K/ihIjokCN6Q++QBXtocvbNFxc/M7DEm2NpwzhHn1K2FZbIGHVrH6Qvu+wy3gk91lJitjrqGW05gh/E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1638968474456184.41054449881597; Wed, 8 Dec 2021 05:01:14 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-499-AKLry_mcO9ebZXEpxYZtlQ-1; Wed, 08 Dec 2021 08:01:11 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0DF57193F564; Wed, 8 Dec 2021 13:01:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E4BB860C4A; Wed, 8 Dec 2021 13:01:00 +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 B28A11806D03; Wed, 8 Dec 2021 13:00:56 +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 1B8COHAB029668 for ; Wed, 8 Dec 2021 07:24:17 -0500 Received: by smtp.corp.redhat.com (Postfix) id 81AFE5DF4F; Wed, 8 Dec 2021 12:24:17 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.192.245]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD3755E279 for ; Wed, 8 Dec 2021 12:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638968473; 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=sikNan6u+NLLopzaLycGEBjoO0WcXzf78TV9iPJX2hk=; b=PLitvvhI+Q7sXBgYXkZzs30PIpF0g2h4jWW7NUypYQS4v1vCap6/UZtmlW4j1fTsV8hcaM Ixo79M5397b2HUEA9WCeV0lxUEi5Xg4w8kVonA8c2yqkDtW6Qj+gYcKDW7V4flmb1W94vW GYTIuJjjC1e75kZCcBV6vt+U9OBfZyE= X-MC-Unique: AKLry_mcO9ebZXEpxYZtlQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: do not compare missing cpu data Date: Wed, 8 Dec 2021 13:24:04 +0100 Message-Id: <3d4901a58cd4345a2894204baeccd9196a4820cb.1638966234.git.jtomko@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.12 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) X-ZM-MESSAGEID: 1638968478089100001 For x86, we invalidate qemu caps cache if the host CPUID changed. However other cpu drivers do not have the 'getHostData' function implemented. Skip the comparison if we do not have host CPUData available, since virCPUDataIsIdentical always returns an error in that case. https://bugzilla.redhat.com/show_bug.cgi?id=3D2030119 Fixes: 3bc6f46d305ed82f7314ffc4c2a66847b831a6bd Signed-off-by: J=C3=A1n Tomko Reviewed-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 0e6e73774a..51828ead53 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4943,7 +4943,8 @@ virQEMUCapsIsValid(void *data, return false; } =20 - if (virCPUDataIsIdentical(priv->cpuData, qemuCaps->cpuData) !=3D + if (priv->cpuData && + virCPUDataIsIdentical(priv->cpuData, qemuCaps->cpuData) !=3D VIR_CPU_COMPARE_IDENTICAL) { VIR_DEBUG("Outdated capabilities for '%s': host cpuid changed", qemuCaps->binary); --=20 2.31.1