From nobody Sun Nov 24 22:54:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719220328; cv=none; d=zohomail.com; s=zohoarc; b=H16xwmvuv4JakQcU9/8gjSB9Qgxw3uclhmoliHQ6tBfwJeCjctLnX7nsS3GnCwJ/4zl4N79f1sviGwbc8gqAkvKc88roHFVMHwGZaCQIJWZdFXBvKomkCrGYtZvjOF7lMbM1SxPv635e7LaI2YXzlx3jpMQTUNmvAJu7H7badIw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719220328; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0MEH/mKV63v/JJwnQ03ODMnT7oVBF8nDVD2HElTki68=; b=H7qgO6UbWOpyyRMB+Fmk36XWCb9O9s7GlNFoz9iMkKoINczcu7fZS3v56+n5MtUqXO2sF2HUKz602+KvublWSRbmVR3HUmr2qF0KF2GqdwEwqrijABvZJG7khyjSf/UqKufEYBj+CGC9cfy6oCALDFMOtPE4A6BqyDPHMt1AYWE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719220328597318.5534090090273; Mon, 24 Jun 2024 02:12:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLfj2-0007uQ-8t; Mon, 24 Jun 2024 05:11:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfj0-0007uH-UU for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:10:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfix-0003rn-78 for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:10:58 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-300-ZyPEeIplM-2XMuSsTDoVgg-1; Mon, 24 Jun 2024 05:10:51 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8B6E61956056; Mon, 24 Jun 2024 09:10:50 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.33]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2C38A3000603; Mon, 24 Jun 2024 09:10:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719220254; h=from:from: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; bh=0MEH/mKV63v/JJwnQ03ODMnT7oVBF8nDVD2HElTki68=; b=AvWuCeqXGnVBr9aaVe1l3Hx8oiri2cORBVDuZv6583AhOA1Eo6shkp9lFtyp0HAi2+3+dv SceS8J8VH5gzGNTgkBYOPtgSeFHjMhNHBoGfoKN1UoiD5Z4jePX6SMAX3NEPZwbO1t+APv zkrKPe6TGaTI9Z9zJ+oUM9eUbRI/m+Q= X-MC-Unique: ZyPEeIplM-2XMuSsTDoVgg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Zhenzhong Duan , Anthony Krowiak , Eric Farman Subject: [PULL 01/11] hw/s390x/ccw: Make s390_ccw_get_dev_info() return a bool Date: Mon, 24 Jun 2024 11:10:33 +0200 Message-ID: <20240624091043.177484-2-thuth@redhat.com> In-Reply-To: <20240624091043.177484-1-thuth@redhat.com> References: <20240624091043.177484-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.149, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719220329412100004 From: C=C3=A9dric Le Goater Since s390_ccw_get_dev_info() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. While at it, modify the call in s390_ccw_realize(). Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Zhenzhong Duan Reviewed-by: Anthony Krowiak Reviewed-by: Eric Farman Reviewed-by: Thomas Huth Message-ID: <20240522170107.289532-2-clg@redhat.com> Signed-off-by: Thomas Huth --- hw/s390x/s390-ccw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c index 5261e66724..a06e91dfb3 100644 --- a/hw/s390x/s390-ccw.c +++ b/hw/s390x/s390-ccw.c @@ -71,7 +71,7 @@ IOInstEnding s390_ccw_store(SubchDev *sch) return ret; } =20 -static void s390_ccw_get_dev_info(S390CCWDevice *cdev, +static bool s390_ccw_get_dev_info(S390CCWDevice *cdev, char *sysfsdev, Error **errp) { @@ -84,12 +84,12 @@ static void s390_ccw_get_dev_info(S390CCWDevice *cdev, error_setg(errp, "No host device provided"); error_append_hint(errp, "Use -device vfio-ccw,sysfsdev=3DPATH_TO_DEVICE\= n"); - return; + return false; } =20 if (!realpath(sysfsdev, dev_path)) { error_setg_errno(errp, errno, "Host device '%s' not found", sysfsd= ev); - return; + return false; } =20 cdev->mdevid =3D g_path_get_basename(dev_path); @@ -98,13 +98,14 @@ static void s390_ccw_get_dev_info(S390CCWDevice *cdev, tmp =3D g_path_get_basename(tmp_dir); if (sscanf(tmp, "%2x.%1x.%4x", &cssid, &ssid, &devid) !=3D 3) { error_setg_errno(errp, errno, "Failed to read %s", tmp); - return; + return false; } =20 cdev->hostid.cssid =3D cssid; cdev->hostid.ssid =3D ssid; cdev->hostid.devid =3D devid; cdev->hostid.valid =3D true; + return true; } =20 static void s390_ccw_realize(S390CCWDevice *cdev, char *sysfsdev, Error **= errp) @@ -116,8 +117,7 @@ static void s390_ccw_realize(S390CCWDevice *cdev, char = *sysfsdev, Error **errp) int ret; Error *err =3D NULL; =20 - s390_ccw_get_dev_info(cdev, sysfsdev, &err); - if (err) { + if (!s390_ccw_get_dev_info(cdev, sysfsdev, &err)) { goto out_err_propagate; } =20 --=20 2.45.2 From nobody Sun Nov 24 22:54:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719220337; cv=none; d=zohomail.com; s=zohoarc; b=CsGJaUgn8mkZQp9cbovdA4YIGc74DPr8yNTGWFvGtlJcd0PXQGtpnr3DQAW1TmAUQxPMgkp0ojRs/SOOM8oA+PRqZ1RyQtDzqj/rnKWCDge1yLaKjNw5G7Xbyf/Cum+CJ0s7vv81sTK2iOBvn5i0Chr7Lt4tV6UUMyOhO37KxHA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719220337; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+4megXEFudFNidDu6usxu59kkO19OEawrxjQOAqZvUk=; b=QsRv4QBSqaVFO+qNz5nYT4GL2sfyyl7+vQGCB8F3ngNCdctYrMpgaHZ1f1RLggbuib8S3oV7DjstLPDeuSH5jDHfevFaXeSxNO8nTOymjimySLlE1oW4pauXE8iTU9uO/VZa3S5N8h0hjlSArYhj9RSo2x4G2H7rrNr/6hwq9do= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719220337262965.3119144149514; Mon, 24 Jun 2024 02:12:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLfj8-0007w4-Ef; Mon, 24 Jun 2024 05:11:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfj5-0007v3-A1 for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfj3-0003s5-Kd for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:03 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-496-1rP4PcvANlm60yjG_2QYJg-1; Mon, 24 Jun 2024 05:10:55 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0592E19560A2; Mon, 24 Jun 2024 09:10:54 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.33]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D47A83000219; Mon, 24 Jun 2024 09:10:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719220259; h=from:from: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; bh=+4megXEFudFNidDu6usxu59kkO19OEawrxjQOAqZvUk=; b=YKXP9eV9cZalEUMOOZXWPf4QvloANLhEEbQXkW3GTKh01hRUgOqwGWryHMPtEjtkBuR1nm yiW0hr+Uzsb576y92LuEV54hmCB+Jf6LRsq3oamln6YCTkLvd7dhk8xh/lCHqkXLoeiOmU 7IPzvWt+rZH8PPoHvStjlQcvOrHyJ0A= X-MC-Unique: 1rP4PcvANlm60yjG_2QYJg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Zhenzhong Duan , Anthony Krowiak , Eric Farman Subject: [PULL 02/11] s390x/css: Make CCWDeviceClass::realize return bool Date: Mon, 24 Jun 2024 11:10:34 +0200 Message-ID: <20240624091043.177484-3-thuth@redhat.com> In-Reply-To: <20240624091043.177484-1-thuth@redhat.com> References: <20240624091043.177484-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.149, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719220339333100007 From: C=C3=A9dric Le Goater Since the realize() handler of CCWDeviceClass takes an 'Error **' argument, best practices suggest to return a bool. See the api/error.h Rules section. While at it, modify the call in s390_ccw_realize(). Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Zhenzhong Duan Reviewed-by: Anthony Krowiak Reviewed-by: Eric Farman Reviewed-by: Thomas Huth Message-ID: <20240522170107.289532-3-clg@redhat.com> Signed-off-by: Thomas Huth --- hw/s390x/ccw-device.h | 2 +- hw/s390x/ccw-device.c | 3 ++- hw/s390x/s390-ccw.c | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/s390x/ccw-device.h b/hw/s390x/ccw-device.h index 6dff95225d..5feeb0ee7a 100644 --- a/hw/s390x/ccw-device.h +++ b/hw/s390x/ccw-device.h @@ -36,7 +36,7 @@ extern const VMStateDescription vmstate_ccw_dev; struct CCWDeviceClass { DeviceClass parent_class; void (*unplug)(HotplugHandler *, DeviceState *, Error **); - void (*realize)(CcwDevice *, Error **); + bool (*realize)(CcwDevice *, Error **); void (*refill_ids)(CcwDevice *); }; =20 diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c index fb8c1acc64..a7d682e5af 100644 --- a/hw/s390x/ccw-device.c +++ b/hw/s390x/ccw-device.c @@ -31,9 +31,10 @@ static void ccw_device_refill_ids(CcwDevice *dev) dev->subch_id.valid =3D true; } =20 -static void ccw_device_realize(CcwDevice *dev, Error **errp) +static bool ccw_device_realize(CcwDevice *dev, Error **errp) { ccw_device_refill_ids(dev); + return true; } =20 static Property ccw_device_properties[] =3D { diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c index a06e91dfb3..4b8ede701d 100644 --- a/hw/s390x/s390-ccw.c +++ b/hw/s390x/s390-ccw.c @@ -137,8 +137,7 @@ static void s390_ccw_realize(S390CCWDevice *cdev, char = *sysfsdev, Error **errp) goto out_err; } =20 - ck->realize(ccw_dev, &err); - if (err) { + if (!ck->realize(ccw_dev, &err)) { goto out_err; } =20 --=20 2.45.2 From nobody Sun Nov 24 22:54:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719220361; cv=none; d=zohomail.com; s=zohoarc; b=L9yHxXdJ+lU1UXeuOOy5c47WujSv1AQ+oy0j/3/W7xZCGecZgwXAvFSNT207xOejp8TrgFqifkC1W4BNVEeXwEh/9oO0BfewFCcOsUTI2OeQvs/yQqvCly3vJeAmn7qKv1jt4ixglhaLKF3h3adzMixSNkKg+8XdARbOUF0vHRs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719220361; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+1v+7D4EiyD7M+nQxR3WsvAByd+Ga93rHD+GWWIFd1k=; b=nv5PEdm+l2rTHoSh2stHPhF+K81l+3YK/p6wy61oLiuzYBVmPdBBSGzwAXI4z1ns8cIHRT/zdnJZZSQ3QTK8Bawyak3LUiAbunjbiDWXMoMpw2XAowjq2MN6YK3nGbnTM+xQhEW1K9ZF1EnSJsIefFOw+NfLH5TvD55ezX7acWY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719220361923312.5779656454391; Mon, 24 Jun 2024 02:12:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLfjT-0007yE-Q3; Mon, 24 Jun 2024 05:11:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjS-0007xp-50 for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjE-0003sV-1K for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:25 -0400 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-158-lFWznw1EMYyqunFt60F5eQ-1; Mon, 24 Jun 2024 05:10:59 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7606B19560BE; Mon, 24 Jun 2024 09:10:57 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.33]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E5AC53000227; Mon, 24 Jun 2024 09:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719220268; h=from:from: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; bh=+1v+7D4EiyD7M+nQxR3WsvAByd+Ga93rHD+GWWIFd1k=; b=XS3Rbv22cGPZDRuK+QD4QTc3BJfCmSfz3J7gG/ezMppoOQ86qZuv17m5MNSOszU5iP6Usa grx8fHBezq/8dWv2PLjXLQJZlqvhNrsBxavhHnLwnmLtTe8FWz1FQlFiHYFm+pBqpEGpUq y8xxFxYpUb5EDAL3R7Dfe8jikQrwok4= X-MC-Unique: lFWznw1EMYyqunFt60F5eQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Zhenzhong Duan , Anthony Krowiak , Eric Farman Subject: [PULL 03/11] hw/s390x/ccw: Remove local Error variable from s390_ccw_realize() Date: Mon, 24 Jun 2024 11:10:35 +0200 Message-ID: <20240624091043.177484-4-thuth@redhat.com> In-Reply-To: <20240624091043.177484-1-thuth@redhat.com> References: <20240624091043.177484-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.149, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719220363401100001 From: C=C3=A9dric Le Goater Use the 'Error **errp' argument of s390_ccw_realize() instead and remove the error_propagate() call. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Zhenzhong Duan Reviewed-by: Anthony Krowiak Reviewed-by: Eric Farman Reviewed-by: Thomas Huth Message-ID: <20240522170107.289532-4-clg@redhat.com> Signed-off-by: Thomas Huth --- hw/s390x/s390-ccw.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c index 4b8ede701d..b3d14c61d7 100644 --- a/hw/s390x/s390-ccw.c +++ b/hw/s390x/s390-ccw.c @@ -115,13 +115,12 @@ static void s390_ccw_realize(S390CCWDevice *cdev, cha= r *sysfsdev, Error **errp) DeviceState *parent =3D DEVICE(ccw_dev); SubchDev *sch; int ret; - Error *err =3D NULL; =20 - if (!s390_ccw_get_dev_info(cdev, sysfsdev, &err)) { - goto out_err_propagate; + if (!s390_ccw_get_dev_info(cdev, sysfsdev, errp)) { + return; } =20 - sch =3D css_create_sch(ccw_dev->devno, &err); + sch =3D css_create_sch(ccw_dev->devno, errp); if (!sch) { goto out_mdevid_free; } @@ -132,12 +131,12 @@ static void s390_ccw_realize(S390CCWDevice *cdev, cha= r *sysfsdev, Error **errp) ccw_dev->sch =3D sch; ret =3D css_sch_build_schib(sch, &cdev->hostid); if (ret) { - error_setg_errno(&err, -ret, "%s: Failed to build initial schib", + error_setg_errno(errp, -ret, "%s: Failed to build initial schib", __func__); goto out_err; } =20 - if (!ck->realize(ccw_dev, &err)) { + if (!ck->realize(ccw_dev, errp)) { goto out_err; } =20 @@ -151,8 +150,6 @@ out_err: g_free(sch); out_mdevid_free: g_free(cdev->mdevid); -out_err_propagate: - error_propagate(errp, err); } =20 static void s390_ccw_unrealize(S390CCWDevice *cdev) --=20 2.45.2 From nobody Sun Nov 24 22:54:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719220373; cv=none; d=zohomail.com; s=zohoarc; b=Q17RhaLrJv0Z9MtN31j1FDzsSlXLIxWO6P9t+Y3o9r8i1VMX0bqan/AWidaCd9ku/bRxW5IdhuAgfNANYmkiAbmJxSqrUdHkOyLle5MkDD8lbGgpTAi8ePyCEdZzcuX/tt4WjkahJ6pM3IpzDQIX1FD8p2ItPT/VrqhLYOn/ma4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719220373; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=s1/JShl0HA5iIO/ldYs3XyH7C9qq8BP88fI07ymd6mI=; b=X18t7cCsix5JJDVa4MnRi8H51yoaG3QJ4f7/SN1G1FrL0HBzalueyV89HMxmTulgeiJNmKZsoDemV5eZCke3BJDsKQoaAHZ2cFz7zYBpS/yCFXXdZEtNr5ypH9FvCloHmbe+NVzGllsKgOyiWPf9xtQbrq0uSxNbL5N2p9/e2WU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719220373459958.7886644002843; Mon, 24 Jun 2024 02:12:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLfjJ-0007wd-4o; Mon, 24 Jun 2024 05:11:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjH-0007wQ-Li for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjA-0003sN-S3 for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:14 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-679-PGgbdl4zM4e_3SH_gKRCbw-1; Mon, 24 Jun 2024 05:11:02 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AAE2C195605F; Mon, 24 Jun 2024 09:11:01 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.33]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 050773000618; Mon, 24 Jun 2024 09:10:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719220267; h=from:from: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; bh=s1/JShl0HA5iIO/ldYs3XyH7C9qq8BP88fI07ymd6mI=; b=HNwPI+GjTV1fCiOayb0j8BgGkPJDkWcGTnN7Ke4o7bTkQsIyRx1fawZ5DG2+DZVl3+e7CK pzkt60l0vPOcweXHEwepAraRHsnrP8xu+qYdt3cOk2MeWgYZ0VB7tEii3yBrh21a1seuAo OHbwZT82W9zT/r92rIC+wEHladJpmds= X-MC-Unique: PGgbdl4zM4e_3SH_gKRCbw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Zhenzhong Duan , Anthony Krowiak , Eric Farman Subject: [PULL 04/11] s390x/css: Make S390CCWDeviceClass::realize return bool Date: Mon, 24 Jun 2024 11:10:36 +0200 Message-ID: <20240624091043.177484-5-thuth@redhat.com> In-Reply-To: <20240624091043.177484-1-thuth@redhat.com> References: <20240624091043.177484-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719220375442100001 From: C=C3=A9dric Le Goater Since the realize() handler of S390CCWDeviceClass takes an 'Error **' argument, best practices suggest to return a bool. See the api/error.h Rules section. While at it, modify the call in vfio_ccw_realize(). Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Zhenzhong Duan Reviewed-by: Anthony Krowiak Reviewed-by: Eric Farman Reviewed-by: Thomas Huth Message-ID: <20240522170107.289532-5-clg@redhat.com> Signed-off-by: Thomas Huth --- include/hw/s390x/s390-ccw.h | 2 +- hw/s390x/s390-ccw.c | 7 ++++--- hw/vfio/ccw.c | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/hw/s390x/s390-ccw.h b/include/hw/s390x/s390-ccw.h index 2c807ee3a1..2e0a709981 100644 --- a/include/hw/s390x/s390-ccw.h +++ b/include/hw/s390x/s390-ccw.h @@ -31,7 +31,7 @@ struct S390CCWDevice { =20 struct S390CCWDeviceClass { CCWDeviceClass parent_class; - void (*realize)(S390CCWDevice *dev, char *sysfsdev, Error **errp); + bool (*realize)(S390CCWDevice *dev, char *sysfsdev, Error **errp); void (*unrealize)(S390CCWDevice *dev); IOInstEnding (*handle_request) (SubchDev *sch); int (*handle_halt) (SubchDev *sch); diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c index b3d14c61d7..3c09750550 100644 --- a/hw/s390x/s390-ccw.c +++ b/hw/s390x/s390-ccw.c @@ -108,7 +108,7 @@ static bool s390_ccw_get_dev_info(S390CCWDevice *cdev, return true; } =20 -static void s390_ccw_realize(S390CCWDevice *cdev, char *sysfsdev, Error **= errp) +static bool s390_ccw_realize(S390CCWDevice *cdev, char *sysfsdev, Error **= errp) { CcwDevice *ccw_dev =3D CCW_DEVICE(cdev); CCWDeviceClass *ck =3D CCW_DEVICE_GET_CLASS(ccw_dev); @@ -117,7 +117,7 @@ static void s390_ccw_realize(S390CCWDevice *cdev, char = *sysfsdev, Error **errp) int ret; =20 if (!s390_ccw_get_dev_info(cdev, sysfsdev, errp)) { - return; + return false; } =20 sch =3D css_create_sch(ccw_dev->devno, errp); @@ -142,7 +142,7 @@ static void s390_ccw_realize(S390CCWDevice *cdev, char = *sysfsdev, Error **errp) =20 css_generate_sch_crws(sch->cssid, sch->ssid, sch->schid, parent->hotplugged, 1); - return; + return true; =20 out_err: css_subch_assign(sch->cssid, sch->ssid, sch->schid, sch->devno, NULL); @@ -150,6 +150,7 @@ out_err: g_free(sch); out_mdevid_free: g_free(cdev->mdevid); + return false; } =20 static void s390_ccw_unrealize(S390CCWDevice *cdev) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 2600e62e37..9a8e052711 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -582,8 +582,7 @@ static void vfio_ccw_realize(DeviceState *dev, Error **= errp) =20 /* Call the class init function for subchannel. */ if (cdc->realize) { - cdc->realize(cdev, vcdev->vdev.sysfsdev, &err); - if (err) { + if (!cdc->realize(cdev, vcdev->vdev.sysfsdev, &err)) { goto out_err_propagate; } } --=20 2.45.2 From nobody Sun Nov 24 22:54:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719220328; cv=none; d=zohomail.com; s=zohoarc; b=l5kElQUQReQdmRziCx8PdNW9RGKJ3TPOmsqpDR34bre4g9+78N5OiFiuc0wLrfyH3gR1iA8BsxkS+61/LpcDYFSC8EwisJFLYKsXjR0tIVu04kTY3Hgs2Qvx2QaZuYOJA2K0mwJqHe4eaIGREwCU9c3pX353FshkqHt7tYIxNw0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719220328; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+ZCWoghW6mfWaxFSn5bGpDr/y6Xavj3Z3HJ9b2fqrd0=; b=GVauEfaRb5/FuX1J8YZ2mvKHlwI5rrkWiM6spdwvjuh9eEk/BN2l62dWpFc8Vaa1bzeXPIXIQNodImKncIpDLdhePTkiMVE46fNRYKpzz6IxWXLkgDZeMuSG/BuUAa+5Syj60kH6UpnGyZ8/LFHlouqvHcpslSCRPCGMShz05j4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719220328591410.6737681270555; Mon, 24 Jun 2024 02:12:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLfjS-0007y2-J3; Mon, 24 Jun 2024 05:11:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjQ-0007x6-Kw for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjE-0003se-OF for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:23 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-160-2uKoE2kGP_yokzTOi95mTQ-1; Mon, 24 Jun 2024 05:11:06 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B7D1D19560A3; Mon, 24 Jun 2024 09:11:05 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.33]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 98EA53000219; Mon, 24 Jun 2024 09:11:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719220270; h=from:from: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; bh=+ZCWoghW6mfWaxFSn5bGpDr/y6Xavj3Z3HJ9b2fqrd0=; b=F3Nlduz2akdcC1P2A9T52a2ljoFku65ZuPrPiOaUXoLL0QAmVcFdNbNBxxI11h0/x8Rn3E xv382IuAco9/I8WExHtREO65TtzDB4dSvbhWYb4sLmPx+jXp9FixDQ75sA/7PfRsTqVF0N LDUvHDuCIZa8qSGFnIJAGQDVvr4/Vpc= X-MC-Unique: 2uKoE2kGP_yokzTOi95mTQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Zhenzhong Duan , Anthony Krowiak , Eric Farman Subject: [PULL 05/11] vfio/ccw: Use the 'Error **errp' argument of vfio_ccw_realize() Date: Mon, 24 Jun 2024 11:10:37 +0200 Message-ID: <20240624091043.177484-6-thuth@redhat.com> In-Reply-To: <20240624091043.177484-1-thuth@redhat.com> References: <20240624091043.177484-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.149, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719220329336100001 From: C=C3=A9dric Le Goater The local error variable is kept for vfio_ccw_register_irq_notifier() because it is not considered as a failing condition. We will change how error reporting is done in following changes. Remove the error_propagate() call. Cc: Zhenzhong Duan Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Zhenzhong Duan Reviewed-by: Anthony Krowiak Reviewed-by: Eric Farman Reviewed-by: Thomas Huth Message-ID: <20240522170107.289532-6-clg@redhat.com> Signed-off-by: Thomas Huth --- hw/vfio/ccw.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 9a8e052711..a468fa2342 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -582,8 +582,8 @@ static void vfio_ccw_realize(DeviceState *dev, Error **= errp) =20 /* Call the class init function for subchannel. */ if (cdc->realize) { - if (!cdc->realize(cdev, vcdev->vdev.sysfsdev, &err)) { - goto out_err_propagate; + if (!cdc->realize(cdev, vcdev->vdev.sysfsdev, errp)) { + return; } } =20 @@ -596,17 +596,17 @@ static void vfio_ccw_realize(DeviceState *dev, Error = **errp) goto out_attach_dev_err; } =20 - if (!vfio_ccw_get_region(vcdev, &err)) { + if (!vfio_ccw_get_region(vcdev, errp)) { goto out_region_err; } =20 - if (!vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_IO_IRQ_INDEX, &err= )) { + if (!vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_IO_IRQ_INDEX, errp= )) { goto out_io_notifier_err; } =20 if (vcdev->crw_region) { if (!vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_CRW_IRQ_INDEX, - &err)) { + errp)) { goto out_irq_notifier_err; } } @@ -634,8 +634,6 @@ out_attach_dev_err: if (cdc->unrealize) { cdc->unrealize(cdev); } -out_err_propagate: - error_propagate(errp, err); } =20 static void vfio_ccw_unrealize(DeviceState *dev) --=20 2.45.2 From nobody Sun Nov 24 22:54:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719220343; cv=none; d=zohomail.com; s=zohoarc; b=FalRlfWVeG2rTnQ8Z6NXHSJbN0iYGO/lxqAQkuulyDhAZUT8LWVprsnVy+NzlZ9GYl9UilPCY/cfurfqNK40JclmGaTxYML5c554dwVE3s54c1KmNPC/dOI2hbORVwgqnXnajMiazPG4TUinWOdxgLG1vGOv1W0uqOKSwMKQWvI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719220343; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=FCVAaabRcZXPoAk+LeXk+6xICyyYrMzvSRVahSssDlQ=; b=FdAQd34JBkd2yD35NUDtjj/JwB7p45mXoD72CwlJhisEzgB76CnGsOAQyenTbWl+ZjU+otyFnrxoxuuaFWL1PIWhobDY2k8H9Eg3uY7ehUyIFnVbqVoR+tgLkVZEz2JxzXCMqnlTec34C11kR4Wfj7FszStRPrgunxy5Poep44s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719220343172365.09074275868454; Mon, 24 Jun 2024 02:12:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLfjS-0007xV-KE; Mon, 24 Jun 2024 05:11:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjP-0007x7-V9 for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjG-0003sw-JP for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:23 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-637-1I7s2971MPydQ5g1EL_bpQ-1; Mon, 24 Jun 2024 05:11:09 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 727DC1955E72; Mon, 24 Jun 2024 09:11:08 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.33]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2C2493000219; Mon, 24 Jun 2024 09:11:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719220273; h=from:from: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; bh=FCVAaabRcZXPoAk+LeXk+6xICyyYrMzvSRVahSssDlQ=; b=X6EQpX2Sy+9l6HaJ21fh8U/VE+u2VVYMe7+WATBExCuqaxnxmgmJ9chAEQN+7g5uB3KAkV fV4xW4E3P+bvWUh6WxwpywaE34bhZD9R0jCg5QjKiOXcufXEswksajkmBu0uYYW+HIr1PD fgrNGbwaCfNW207+nUqJfps/bvn9rY0= X-MC-Unique: 1I7s2971MPydQ5g1EL_bpQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Zhenzhong Duan , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Eric Farman Subject: [PULL 06/11] vfio/ccw: Fix the missed unrealize() call in error path Date: Mon, 24 Jun 2024 11:10:38 +0200 Message-ID: <20240624091043.177484-7-thuth@redhat.com> In-Reply-To: <20240624091043.177484-1-thuth@redhat.com> References: <20240624091043.177484-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.149, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719220343308100001 From: Zhenzhong Duan When get name failed, we should call unrealize() so that vfio_ccw_realize() is self contained. Fixes: 909a6254eda ("vfio/ccw: Make vfio cdev pre-openable by passing a fil= e handle") Signed-off-by: Zhenzhong Duan Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Eric Farman Reviewed-by: Thomas Huth Message-ID: <20240522170107.289532-7-clg@redhat.com> Signed-off-by: Thomas Huth --- hw/vfio/ccw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index a468fa2342..36f2677a44 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -588,7 +588,7 @@ static void vfio_ccw_realize(DeviceState *dev, Error **= errp) } =20 if (!vfio_device_get_name(vbasedev, errp)) { - return; + goto out_unrealize; } =20 if (!vfio_attach_device(cdev->mdevid, vbasedev, @@ -631,6 +631,7 @@ out_region_err: vfio_detach_device(vbasedev); out_attach_dev_err: g_free(vbasedev->name); +out_unrealize: if (cdc->unrealize) { cdc->unrealize(cdev); } --=20 2.45.2 From nobody Sun Nov 24 22:54:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719220363; cv=none; d=zohomail.com; s=zohoarc; b=MzMJWkXSKinEbeAaQNTLJFrBYmUC/Na2vk03cPwc4t95mi04g8F0HOSEKLOV1D0i9GWA0oySdqJeO4MQOPqVTkAbq5KyGzvn7A+6KwEfdFSakFoqbntgTI/TUk0UTd4T/Ezdw9jbFFUuWhVbmyzrDOorwrwF9UP8j7vI1V7PHKQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719220363; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=sBJxnGxxWlao4SQioulONYxmRwRuQuSonIEpsqeTDuU=; b=V7hiwIy+tpN5pYI/McyHcKXxZpvEMaOe1d1TKwLsNcRJ/6r+Q+jHAomTsWuPzbG6q7pKmuzcCspiDoQtGdH1Si8VKSIsGUyZkD++PLpcLdrfHkXj9DQVx1TWHpOAdhnYktP5lTqrdLRphHj/7Dy8n8pg0Z9Zdjj+pFATEVrqk/M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719220363682716.1776939407483; Mon, 24 Jun 2024 02:12:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLfji-00082b-B1; Mon, 24 Jun 2024 05:11:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjg-00080q-95 for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjM-0003tc-Gs for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:40 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-15-OH6eC_6iNQOHxLomabesXg-1; Mon, 24 Jun 2024 05:11:13 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5BC7F19560B2; Mon, 24 Jun 2024 09:11:11 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.33]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CFE2A3000219; Mon, 24 Jun 2024 09:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719220277; h=from:from: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; bh=sBJxnGxxWlao4SQioulONYxmRwRuQuSonIEpsqeTDuU=; b=ENeziyc6QYxs4X+bNl+fpwW0BM1a6jtdsDUt5pu6HWXkOz7liN8RAkEHmoHyy3ABJn5iX4 2W+Ly0mdfigbFFzg52qdz3cArlCbrzuYwtAH4i0q4f12YBHbxtetUoTSu0VnHMtHPN1FYY Xidoco5cBm5FYpz6jUPKI6HcuMQvFao= X-MC-Unique: OH6eC_6iNQOHxLomabesXg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Zhenzhong Duan , Anthony Krowiak , Eric Farman Subject: [PULL 07/11] vfio/{ap, ccw}: Use warn_report_err() for IRQ notifier registration errors Date: Mon, 24 Jun 2024 11:10:39 +0200 Message-ID: <20240624091043.177484-8-thuth@redhat.com> In-Reply-To: <20240624091043.177484-1-thuth@redhat.com> References: <20240624091043.177484-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.149, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719220365436100009 From: C=C3=A9dric Le Goater vfio_ccw_register_irq_notifier() and vfio_ap_register_irq_notifier() errors are currently reported using error_report_err(). Since they are not considered as failing conditions, using warn_report_err() is more appropriate. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Zhenzhong Duan Reviewed-by: Anthony Krowiak Reviewed-by: Eric Farman Reviewed-by: Thomas Huth Message-ID: <20240522170107.289532-8-clg@redhat.com> Signed-off-by: Thomas Huth --- hw/vfio/ap.c | 2 +- hw/vfio/ccw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index c12531a788..0c4354e3e7 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -172,7 +172,7 @@ static void vfio_ap_realize(DeviceState *dev, Error **e= rrp) * Report this error, but do not make it a failing condition. * Lack of this IRQ in the host does not prevent normal operation. */ - error_report_err(err); + warn_report_err(err); } =20 return; diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 36f2677a44..1f8e1272c7 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -616,7 +616,7 @@ static void vfio_ccw_realize(DeviceState *dev, Error **= errp) * Report this error, but do not make it a failing condition. * Lack of this IRQ in the host does not prevent normal operation. */ - error_report_err(err); + warn_report_err(err); } =20 return; --=20 2.45.2 From nobody Sun Nov 24 22:54:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719220334; cv=none; d=zohomail.com; s=zohoarc; b=cnEW0l7D+zgW2ziPP/SDr2EJxIkLF4sAKXUPcExU5+6yRW22Ozltx0gRUpopjeBPLRvBGCaY4pSe6FFbztJy+GPqtRw+N0fWWSuTtOEkqj4eq0Ug+HriY+7dM1sedNjNePJ9juFgluPE9v4y2rlnWe2o24WqErzbVXOnH0HPjcM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719220334; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+9IY13yh8RRCqanS8sKsz76bmifajzLlE5oieW9FlZw=; b=Aze+b1SYzP5yjVyLsPVgkJZ9VSU3unEERbOtwkLwvQsPyVHHDrkRjIhtlWg7oMqw6q6VZ74SR4chcID3wIHnW/RyQBC0ooR6Ri+FKJDqG+3s56o8mN+750pa5s7zD/IBpPDECaxfYFkTiHngTTNGS2yU+DJFK8Srqe4PjIlQy6A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719220334310778.9422716255651; Mon, 24 Jun 2024 02:12:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLfjX-0007zG-Sr; Mon, 24 Jun 2024 05:11:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjV-0007yV-KP for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjJ-0003tV-DN for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:29 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-690-5Ojq6atiN0S2wfz5gobYkg-1; Mon, 24 Jun 2024 05:11:15 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F11C91955E72; Mon, 24 Jun 2024 09:11:13 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.33]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CDE69300070F; Mon, 24 Jun 2024 09:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719220276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+9IY13yh8RRCqanS8sKsz76bmifajzLlE5oieW9FlZw=; b=JU2MLtA9Jbmkg6QbcPO7P5L2rvoRe63+r7ojw38Tqr0snCFlZJReBgMjKWJTLabdGtD3ND utkLjXQAv4m0SKbi9jWqxIjIMsoeerMfbw5P1DlABnN7P7Y59XmjlHHbPLkZhpqYZGgnf8 HyZZ9JklNyT8lEZrJ8heFG3+TdfvLac= X-MC-Unique: 5Ojq6atiN0S2wfz5gobYkg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Dmitry Frolov , Alexander Bulekov Subject: [PULL 08/11] tests/qtest/fuzz: fix memleak in qos_fuzz.c Date: Mon, 24 Jun 2024 11:10:40 +0200 Message-ID: <20240624091043.177484-9-thuth@redhat.com> In-Reply-To: <20240624091043.177484-1-thuth@redhat.com> References: <20240624091043.177484-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.149, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719220335259100001 Content-Type: text/plain; charset="utf-8" From: Dmitry Frolov Found with fuzzing for qemu-8.2, but also relevant for master Signed-off-by: Dmitry Frolov Reviewed-by: Thomas Huth Reviewed-by: Alexander Bulekov Message-ID: <20240521103106.119021-3-frolov@swemel.ru> Signed-off-by: Thomas Huth --- tests/qtest/fuzz/qos_fuzz.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c index b71e945c5f..d3839bf999 100644 --- a/tests/qtest/fuzz/qos_fuzz.c +++ b/tests/qtest/fuzz/qos_fuzz.c @@ -180,6 +180,7 @@ static void walk_path(QOSGraphNode *orig_path, int len) =20 fuzz_path_vec =3D path_vec; } else { + g_string_free(cmd_line, true); g_free(path_vec); } =20 --=20 2.45.2 From nobody Sun Nov 24 22:54:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719220376; cv=none; d=zohomail.com; s=zohoarc; b=VtiuV+rBLgZMepPS+ZabhMGBwreC0I4AN7nJmUp2Py9knPETJYOXKWFUhH8Juq0Hh4zPQlthD/OCWHimxuNvQWWzIJyjwOtSvO/L3Bp/L/Rlr+v1b4L1PL1fnjrSMIqfpQO0BNotbed7G6Si1mmjbg+BDvSLtv+f9PjcTl4mglA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719220376; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=W7ohm5evrWfnX6RaracvxTgW8W6EpOv2Muym3qslNwI=; b=MNajN9H2ZP4WCYH7ib9Jie+bs7G1IhBG5Q8mXaovZ+wGN8mk075mESsmeOA4nPhK1PpdzQcvZUn3u9hmIcs/12GBh0LlKzpJgRIGfs1+rJ6Htf170TZYBMyIQLhMti7XxPmC9qah/9XkMV6t+wCcUK3WUwdk/pYW9rKs91A0xxQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719220376777834.0156584042636; Mon, 24 Jun 2024 02:12:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLfja-00080G-Hp; Mon, 24 Jun 2024 05:11:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjY-0007zf-RK for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjX-0003uF-Ee for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:32 -0400 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-461-EMjXoU1cMaC80Kw4zFqqEg-1; Mon, 24 Jun 2024 05:11:18 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0CE2019560AE; Mon, 24 Jun 2024 09:11:17 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.33]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DE75E300021C; Mon, 24 Jun 2024 09:11:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719220288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W7ohm5evrWfnX6RaracvxTgW8W6EpOv2Muym3qslNwI=; b=OmcqLa9HuGmPKClv4FbT28pJbBkDHfzutqkJPO6mLMYO1f+iFq5dGueXbTBGPSHmsuJfyU DL58hlmYVkmo4Xwg0DuQw997J/5Kt7IdHKkLJh7a6tGITAQ7oucK+Z1VGS9xa5ntReT1ld 8BzoQsDAdMfWCgYikhJ3AIdsmQcg8j4= X-MC-Unique: EMjXoU1cMaC80Kw4zFqqEg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Omar Sandoval Subject: [PULL 09/11] target/s390x/arch_dump: use correct byte order for pid Date: Mon, 24 Jun 2024 11:10:41 +0200 Message-ID: <20240624091043.177484-10-thuth@redhat.com> In-Reply-To: <20240624091043.177484-1-thuth@redhat.com> References: <20240624091043.177484-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.149, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719220377636100006 Content-Type: text/plain; charset="utf-8" From: Omar Sandoval The pid field of prstatus needs to be big endian like all of the other fields. Fixes: f738f296eaae ("s390x/arch_dump: pass cpuid into notes sections") Signed-off-by: Omar Sandoval Reviewed-by: Thomas Huth Message-ID: <5929f76d536d355afd04af51bf293695a1065118.1718771802.git.osando= v@osandov.com> Signed-off-by: Thomas Huth --- target/s390x/arch_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c index 7e8a1b4fc0..029d91d93a 100644 --- a/target/s390x/arch_dump.c +++ b/target/s390x/arch_dump.c @@ -102,7 +102,7 @@ static void s390x_write_elf64_prstatus(Note *note, S390= CPU *cpu, int id) regs->acrs[i] =3D cpu_to_be32(cpu->env.aregs[i]); regs->gprs[i] =3D cpu_to_be64(cpu->env.regs[i]); } - note->contents.prstatus.pid =3D id; + note->contents.prstatus.pid =3D cpu_to_be32(id); } =20 static void s390x_write_elf64_fpregset(Note *note, S390CPU *cpu, int id) --=20 2.45.2 From nobody Sun Nov 24 22:54:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719220353; cv=none; d=zohomail.com; s=zohoarc; b=NfssWTmzOjq4wprprHAq6AW5uB8KtTzSc0jht6DtvhSzzg71xLsCrmBmzqzzEPb90v1FJMlrIR3SlQ+amS2g24e5BI8wQpzQkoP5i1K0XryZVC/SpuJjYDrjSowMQCfJMcdoEkZON85hIPesympuPtd+CP/5iIMtiwjX+gkHG10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719220353; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yBQuxy0eCfthitZzKvZ7UkOInczSqOP8WkL+1kSVxB8=; b=Mn3bgi4quvx+tLvgiselxlQWx5sWfW8g6GtyZuUwRAnWF8SX3oFvHpJsMgTnFBpS+/62S0WN/ArXCu8DTyy5XTqP8zXKBzGrFBM6aZ+m0bU21ryc+t7BiI/8dup7qsNVBRDDU07tzdeGp0bGxVu5R0bEx2mBPcC154fVOQVhMcs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719220353844257.3539689793598; Mon, 24 Jun 2024 02:12:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLfjY-0007zd-M4; Mon, 24 Jun 2024 05:11:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjX-0007yu-3k for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjT-0003tp-An for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:30 -0400 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-76-kygFTiS-Ni2CkMC9htTXkA-1; Mon, 24 Jun 2024 05:11:21 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A16BE195608F; Mon, 24 Jun 2024 09:11:20 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.33]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 76A113000219; Mon, 24 Jun 2024 09:11:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719220283; h=from:from: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; bh=yBQuxy0eCfthitZzKvZ7UkOInczSqOP8WkL+1kSVxB8=; b=Tg3vrzu1rVITlK6SPJyJX4xdimJlDLqfvfBwEvbXqnR7jtREoP01vK63xfE93yWvrsmApc wk5t+sJHWhLAOPy7zqmIA+487c+h7aWXfPt2WIAZUBl5rJa+2ubr2vP0bawEZDvhH8iwuX V4HjQoLLDWP04oyEfrK7qXMdyU7Cchw= X-MC-Unique: kygFTiS-Ni2CkMC9htTXkA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Fabiano Rosas , Peter Xu Subject: [PULL 10/11] MAINTAINERS: Cover all tests/qtest/migration-* files Date: Mon, 24 Jun 2024 11:10:42 +0200 Message-ID: <20240624091043.177484-11-thuth@redhat.com> In-Reply-To: <20240624091043.177484-1-thuth@redhat.com> References: <20240624091043.177484-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.149, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719220355354100001 Beside migration-test.c, there is nowadays migration-helpers.[ch], too, so update the entry in the migration section to also cover these files now. While we're at it, exclude these files in the common qtest section, since the migration test is well covered by the migration maintainers already. Since the test is under very active development, it was causing a lot of distraction to the generic qtest maintainers with regards to the patches that need to be reviewed by the migration maintainers anyway. Message-ID: <20240619055447.129943-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Thomas Huth --- MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index cef54de759..f144b5af44 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3312,6 +3312,7 @@ F: tests/qtest/ F: docs/devel/qgraph.rst F: docs/devel/qtest.rst X: tests/qtest/bios-tables-test* +X: tests/qtest/migration-* =20 Device Fuzzing M: Alexander Bulekov @@ -3408,7 +3409,7 @@ F: include/qemu/userfaultfd.h F: migration/ F: scripts/vmstate-static-checker.py F: tests/vmstate-static-checker-data/ -F: tests/qtest/migration-test.c +F: tests/qtest/migration-* F: docs/devel/migration/ F: qapi/migration.json F: tests/migration/ --=20 2.45.2 From nobody Sun Nov 24 22:54:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1719220361; cv=none; d=zohomail.com; s=zohoarc; b=BbjGJtNPWxDPceUcoqUD+6HpsQKmK/lQuM8Ul8TSck3a/wWLAXt3U1cfTLK7ECfy4ErCBKSLIfqPUs7fzJniqZmFI2MPZtCgUVJcEBV8S3WM1h/rHhDWIbENVVAJ2oc3PJB9T4qTaBp7GGi7K0wTPV7zttf0C3IVMLBKZJjeA8g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719220361; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=3z5NAOaj1jkkPYGiKOcuGY5xJ/VoMG76a1jxQ0hvELY=; b=fopDBbGAQdfcIsyhyku4/2HYv/ftWUbGxMtVmqfCDqr3xUkAjVfjPUrGU5O7YrKdM8BN0MM2VYdI9BbXo8Q/Jy7tyGdiHE7yv9FO/O//LQ4K3jUzY59z8kYRDEhBf2x27MDA8fdIJEaC9CwpTU0ZbVW9GvE+7xyW4WeskSgxxQU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719220361705550.0210469329251; Mon, 24 Jun 2024 02:12:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLfjb-00080K-5J; Mon, 24 Jun 2024 05:11:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjZ-0007zp-Ky for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLfjV-0003uA-Nt for qemu-devel@nongnu.org; Mon, 24 Jun 2024 05:11:33 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-425-hjLTpm5kNYmieW4d-YDe3A-1; Mon, 24 Jun 2024 05:11:23 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C35971956046; Mon, 24 Jun 2024 09:11:22 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.33]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7959C3000615; Mon, 24 Jun 2024 09:11:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719220288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3z5NAOaj1jkkPYGiKOcuGY5xJ/VoMG76a1jxQ0hvELY=; b=bK7ucC94NvP9QfIjMJvchgfWs2vhyRqCz4bVcO1vF66+LHZuE4hcrPAY1HmqtUPFJhVucs IXDlPkgGw9eiZrRDZc6kDiOSkg1uG4w19/LuAOZaeblBlSdqomdQz6rX+d7Eozrpvd6qoW Tfn1XInkx9flMjOoyReFeHAZk6FR+HM= X-MC-Unique: hjLTpm5kNYmieW4d-YDe3A-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Subject: [PULL 11/11] target/s390x: Add a CONFIG switch to disable legacy CPUs Date: Mon, 24 Jun 2024 11:10:43 +0200 Message-ID: <20240624091043.177484-12-thuth@redhat.com> In-Reply-To: <20240624091043.177484-1-thuth@redhat.com> References: <20240624091043.177484-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.149, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1719220363417100002 Content-Type: text/plain; charset="utf-8" The oldest model that IBM still supports is the z13. Considering that each generation can "emulate" the previous two generations in hardware (via the "IBC" feature of the CPUs), this means that everything that is older than z114/196 is not an officially supported CPU model anymore. The Linux kernel still support the z10, so if we also take this into account, everything older than that can definitely be considered as a legacy CPU model. For downstream builds of QEMU, we would like to be able to disable these legacy CPUs in the build. Thus add a CONFIG switch that can be used to disable them (and old machine types that use them by default). Message-Id: <20240614125019.588928-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- hw/s390x/s390-virtio-ccw.c | 5 +++++ target/s390x/cpu_models.c | 9 +++++++++ target/s390x/Kconfig | 5 +++++ 3 files changed, 19 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 3d0bc3e7f2..cd063f8b64 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -47,6 +47,7 @@ #include "migration/blocker.h" #include "qapi/visitor.h" #include "hw/s390x/cpu-topology.h" +#include CONFIG_DEVICES =20 static Error *pv_mig_blocker; =20 @@ -1126,6 +1127,8 @@ static void ccw_machine_2_12_class_options(MachineCla= ss *mc) } DEFINE_CCW_MACHINE(2_12, "2.12", false); =20 +#ifdef CONFIG_S390X_LEGACY_CPUS + static void ccw_machine_2_11_instance_options(MachineState *machine) { static const S390FeatInit qemu_cpu_feat =3D { S390_FEAT_LIST_QEMU_V2_1= 1 }; @@ -1272,6 +1275,8 @@ static void ccw_machine_2_4_class_options(MachineClas= s *mc) } DEFINE_CCW_MACHINE(2_4, "2.4", false); =20 +#endif + static void ccw_machine_register_types(void) { type_register_static(&ccw_machine_info); diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index efb508cd2e..a27f4b6f79 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -25,6 +25,7 @@ #ifndef CONFIG_USER_ONLY #include "sysemu/sysemu.h" #include "target/s390x/kvm/pv.h" +#include CONFIG_DEVICES #endif =20 #define CPUDEF_INIT(_type, _gen, _ec_ga, _mha_pow, _hmfai, _name, _desc) \ @@ -47,6 +48,13 @@ * generation 15 one base feature and one optional feature have been depre= cated. */ static S390CPUDef s390_cpu_defs[] =3D { + /* + * Linux requires at least z10 nowadays, and IBM only supports recent = CPUs + * (see https://www.ibm.com/support/pages/ibm-mainframe-life-cycle-his= tory), + * so we consider older CPUs as legacy that can optionally be disabled= via + * the CONFIG_S390X_LEGACY_CPUS config switch. + */ +#if defined(CONFIG_S390X_LEGACY_CPUS) || defined(CONFIG_USER_ONLY) CPUDEF_INIT(0x2064, 7, 1, 38, 0x00000000U, "z900", "IBM zSeries 900 GA= 1"), CPUDEF_INIT(0x2064, 7, 2, 38, 0x00000000U, "z900.2", "IBM zSeries 900 = GA2"), CPUDEF_INIT(0x2064, 7, 3, 38, 0x00000000U, "z900.3", "IBM zSeries 900 = GA3"), @@ -64,6 +72,7 @@ static S390CPUDef s390_cpu_defs[] =3D { CPUDEF_INIT(0x2096, 9, 2, 40, 0x00000000U, "z9BC", "IBM System z9 BC G= A1"), CPUDEF_INIT(0x2094, 9, 3, 40, 0x00000000U, "z9EC.3", "IBM System z9 EC= GA3"), CPUDEF_INIT(0x2096, 9, 3, 40, 0x00000000U, "z9BC.2", "IBM System z9 BC= GA2"), +#endif CPUDEF_INIT(0x2097, 10, 1, 43, 0x00000000U, "z10EC", "IBM System z10 E= C GA1"), CPUDEF_INIT(0x2097, 10, 2, 43, 0x00000000U, "z10EC.2", "IBM System z10= EC GA2"), CPUDEF_INIT(0x2098, 10, 2, 43, 0x00000000U, "z10BC", "IBM System z10 B= C GA1"), diff --git a/target/s390x/Kconfig b/target/s390x/Kconfig index d886be48b4..8a95f2bc3f 100644 --- a/target/s390x/Kconfig +++ b/target/s390x/Kconfig @@ -2,3 +2,8 @@ config S390X bool select PCI select S390_FLIC + +config S390X_LEGACY_CPUS + bool + default y + depends on S390X --=20 2.45.2