From nobody Sun Feb 8 19:25:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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=1573746336; cv=none; d=zoho.com; s=zohoarc; b=Cikp447zwKAi+fCaABi95KjPP/Kjp/JQAgn+6GjnRbWaIyBonuNKkydlQ7NAglEaqg6CGdguZDDNLYhjzjrkpUx7Jw88ibPlxewEk9FRJ1wwEegSL01RQgttBlwzdk+VKRZP14nociRTqo7FYqTCL4KrcGUxLF3MPx8KYLINsEw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573746336; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EzJxabC+i0qzqyx+uF5msuj/Ao2rsipW4jMVH8h0+6E=; b=VBRQJy1hBq86l3kOroA6KVkcV3vuS39VEn1ClI9YzJW8zXD/kFsKGqKprVJfY7SI65jQAX8B0zfeIaM8vKrMPdhCv5cr6sR30Ws7JLyodCyce7udfcwZGe7OZi/lTdXGvbLp2A52kIUrShaw2tPo2mEuGRsLmquUdHzbw5UkeDY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 157374633650564.2057552045344; Thu, 14 Nov 2019 07:45:36 -0800 (PST) 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-132-JBepOqTpNTGT-LWxbY1EAA-1; Thu, 14 Nov 2019 10:45:32 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5288C1857547; Thu, 14 Nov 2019 15:45:27 +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 1F5F91036C6C; Thu, 14 Nov 2019 15:45:27 +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 9365A4BB78; Thu, 14 Nov 2019 15:45:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAEFjNRV026804 for ; Thu, 14 Nov 2019 10:45:23 -0500 Received: by smtp.corp.redhat.com (Postfix) id E38C11036C6C; Thu, 14 Nov 2019 15:45:23 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 81831108BD24; Thu, 14 Nov 2019 15:45:18 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id D015110032B; Thu, 14 Nov 2019 16:45:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573746335; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=EzJxabC+i0qzqyx+uF5msuj/Ao2rsipW4jMVH8h0+6E=; b=H4v7V83lLWl6ixhdyjzHqFirjkvWT5LtpRzhW8tLJdadgt0HzSIift1vpsrqOHbRDalwO5 enmLKy9mnWGZN19/xhPsSrOPjTyoHLRH6Or29QeqoqlMMRbJFkx3vUp/1XyP+62W2gOy47 ufu01qPrG3Z7yo1NT32iO8Q91Lsets8= From: Jiri Denemark To: libvir-list@redhat.com Date: Thu, 14 Nov 2019 16:44:57 +0100 Message-Id: <05b0d1d57bc14c85301a496b151046565a1ac4c1.1573746013.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Christian Borntraeger , "Collin L . Walling" , David Hildenbrand Subject: [libvirt] [PATCH 3/4] cpu_s390: Don't check match attribute for host-model CPUs 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.84 on 10.5.11.22 X-MC-Unique: JBepOqTpNTGT-LWxbY1EAA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The match attribute is only relevant for custom mode CPUs. Reporting failure when match =3D=3D '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: Jiri Denemark --- src/cpu/cpu_s390.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cpu/cpu_s390.c b/src/cpu/cpu_s390.c index a4a381f4b8..dd030c5a11 100644 --- a/src/cpu/cpu_s390.c +++ b/src/cpu/cpu_s390.c @@ -49,15 +49,15 @@ virCPUs390Update(virCPUDefPtr guest, int ret =3D -1; size_t i; =20 - if (guest->match =3D=3D VIR_CPU_MATCH_MINIMUM) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("match mode %s not supported"), - virCPUMatchTypeToString(guest->match)); - goto cleanup; - } - - if (guest->mode !=3D VIR_CPU_MODE_HOST_MODEL) { - ret =3D 0; + if (guest->mode =3D=3D VIR_CPU_MODE_CUSTOM) { + if (guest->match =3D=3D VIR_CPU_MATCH_MINIMUM) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("match mode %s not supported"), + virCPUMatchTypeToString(guest->match)); + } else { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("optional CPU features are not supported")); + } goto cleanup; } =20 --=20 2.24.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list