From nobody Fri Mar 29 14:28:02 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=1659712836; cv=none; d=zohomail.com; s=zohoarc; b=K9EjmYUDYi5IcMidzSUgc7hWeRQBxPgP7DXPr1r1lIYz4CmuzkWgBVWt3dFOcmZ9UbSk0uWnSucBtFj47z76W81PNj7AyBM2BCxRFtIMc1l7cGzRBnVYn3V40BMV7sF5+BXG9G5r8JyjjXdgSeMlSvVHem6zbt9IlVATpp394Ww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659712836; 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=4tbOtoX+okfrNQpn+JtCKcqsZHP3f6wk1WRWkOWk6Cs=; b=ekfb8CJkR3iBNldCPNitNH7sLcNCxvb30r6hFEKFLaiKBTR34Geq4IE9Q2qDlrwxcgOsXihhsd5CZq5wCh8v1b+VXEBzpqotlT8Xy8+0nolchecRXxHeQZ6aLLm2Kxz87XF6P0zY1R/kco9wxP7bgPtjuAzsVHF0/VPlpCqHk54= 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 1659712836369882.9551323426969; Fri, 5 Aug 2022 08:20:36 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-453-Z-u3QuBRMh2JzTf6hJ4KMw-1; Fri, 05 Aug 2022 11:20:29 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6BA413804536; Fri, 5 Aug 2022 15:20:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 58D7C2026985; Fri, 5 Aug 2022 15:20:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3C92A1946A65; Fri, 5 Aug 2022 15:20:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 152951946A62 for ; Fri, 5 Aug 2022 15:20:26 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id EB0B62026985; Fri, 5 Aug 2022 15:20:25 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id B8D532026D4C; Fri, 5 Aug 2022 15:20:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659712835; 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=4tbOtoX+okfrNQpn+JtCKcqsZHP3f6wk1WRWkOWk6Cs=; b=LLwPwCThdXk/6JqX7a+dpNw5WCZTPt7wpivGunOeVtvh2k11H9EqL4/iPDjMa5t3ieFtOA N7AV01/KyrtObJC1ySY1b7aGuHGwPWXR79TUGmDVi0MR7yzFI7LRiP1ljqNIXe7zSHrQxX chTSJnZwQQIPXfSQoVRDD7cZDm26S2I= X-MC-Unique: Z-u3QuBRMh2JzTf6hJ4KMw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 1/6] docs: build-platforms: Clarify stance on minor releases and backports Date: Fri, 5 Aug 2022 16:20:09 +0100 Message-Id: <20220805152014.135768-2-berrange@redhat.com> In-Reply-To: <20220805152014.135768-1-berrange@redhat.com> References: <20220805152014.135768-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Beraldo Leal , David Hildenbrand , libvir-list@redhat.com, Cornelia Huck , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Andrea Bolognani , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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: 1659712837818100001 From: Andrea Bolognani These changes match those made in the following libvirt commits: 2ac78307af docs: Clarify our stance on backported packages 78cffd450a docs: Spell out our policy concerning minor releases Since QEMU's platform support policy is based on libvirt's, it makes sense to mirror these recent changes made to the latter. The policy is not altered significantly - we're simply spelling out some rules that were likely already being implicitly enforced. Signed-off-by: Andrea Bolognani Signed-off-by: Daniel P. Berrang=C3=A9 --- docs/about/build-platforms.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst index 6b8496c430..26028756d0 100644 --- a/docs/about/build-platforms.rst +++ b/docs/about/build-platforms.rst @@ -71,7 +71,10 @@ The project aims to support the most recent major versio= n at all times. Support for the previous major version will be dropped 2 years after the new major version is released or when the vendor itself drops support, whichever com= es first. In this context, third-party efforts to extend the lifetime of a di= stro -are not considered, even when they are endorsed by the vendor (eg. Debian = LTS). +are not considered, even when they are endorsed by the vendor (eg. Debian = LTS); +the same is true of repositories that contain packages backported from lat= er +releases (e.g. Debian backports). Within each major release, only the most +recent minor release is considered. =20 For the purposes of identifying supported software versions available on L= inux, the project will look at CentOS, Debian, Fedora, openSUSE, RHEL, SLES and --=20 2.37.1 From nobody Fri Mar 29 14:28:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1659712844; cv=none; d=zohomail.com; s=zohoarc; b=IbjDW44i5Zdmeht6KhiADYH/1hxlCOqAWIobu56N0yptLLA9DvMBHwroVwMLfxDGkxN6eGn9QDTgx+4vkxkKtGP2ZunENuFW7GudRCIY032Npz6rGOa1O2DZBAJPxr1DOpaPj0O9sKeAVZ+r8DA2nC+t98D0OgiGKSsM8Mpq5Vo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659712844; 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=oSMr73zQz43CzVBTEsg8WelO+8OR5Phlmmi7IjJzNKI=; b=RhwEeg8wL8ljghfZWGyHrzD2Is5tiLsUCzxxqNbs3L6ou0O8wZmTadxV9Y7MK/CSVDWcN7b7tXZYjst0pfaEwa5JGa/77G6ldcawn6n1JcgUbWMu9ek6OpVo38veOSePa83WH4BE2ecF4uUapit2iTfIyZdBfCNYEc1bnyfHTCQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1659712844336136.5302742703334; Fri, 5 Aug 2022 08:20:44 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-260-MQnUi_nbP8ehSnhvDJZsww-1; Fri, 05 Aug 2022 11:20:34 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EB8148037AE; Fri, 5 Aug 2022 15:20:30 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D873394571; Fri, 5 Aug 2022 15:20:30 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 977961946A60; Fri, 5 Aug 2022 15:20:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 546C51946A5F for ; Fri, 5 Aug 2022 15:20:29 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 46D77202699A; Fri, 5 Aug 2022 15:20:29 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3DB592026D07; Fri, 5 Aug 2022 15:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659712843; 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=oSMr73zQz43CzVBTEsg8WelO+8OR5Phlmmi7IjJzNKI=; b=M+6tu3DfnnfMmi5zFG77wV+NbclrWXvHaHl7YKTAeOdLxYHT2823+3jr0rx1mKfSfGwmNL TPhLY+sTouz7oO2lFd4DtYyWWp5kKUEwdW9HkRc4my8fYbfkTEQgJ8GhJ2XfRhUOgiByzq DTdzQIEQdidDmdUmKGIZL01YoGrBiwc= X-MC-Unique: MQnUi_nbP8ehSnhvDJZsww-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 2/6] QIOChannelSocket: Add support for MSG_ZEROCOPY + IPV6 Date: Fri, 5 Aug 2022 16:20:10 +0100 Message-Id: <20220805152014.135768-3-berrange@redhat.com> In-Reply-To: <20220805152014.135768-1-berrange@redhat.com> References: <20220805152014.135768-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Beraldo Leal , David Hildenbrand , libvir-list@redhat.com, Cornelia Huck , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Leonardo Bras , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 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: 1659712845785100001 From: Leonardo Bras For using MSG_ZEROCOPY, there are two steps: 1 - io_writev() the packet, which enqueues the packet for sending, and 2 - io_flush(), which gets confirmation that all packets got correctly sent Currently, if MSG_ZEROCOPY is used to send packets over IPV6, no error will be reported in (1), but it will fail in the first time (2) happens. This happens because (2) currently checks for cmsg_level & cmsg_type associated with IPV4 only, before reporting any error. Add checks for cmsg_level & cmsg_type associated with IPV6, and thus enable support for MSG_ZEROCOPY + IPV6 Fixes: 2bc58ffc29 ("QIOChannelSocket: Implement io_writev zero copy flag & = io_flush for CONFIG_LINUX") Signed-off-by: Leonardo Bras Signed-off-by: Daniel P. Berrang=C3=A9 --- io/channel-socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io/channel-socket.c b/io/channel-socket.c index 74a936cc1f..b76dca9cc1 100644 --- a/io/channel-socket.c +++ b/io/channel-socket.c @@ -746,8 +746,8 @@ static int qio_channel_socket_flush(QIOChannel *ioc, } =20 cm =3D CMSG_FIRSTHDR(&msg); - if (cm->cmsg_level !=3D SOL_IP && - cm->cmsg_type !=3D IP_RECVERR) { + if (cm->cmsg_level !=3D SOL_IP && cm->cmsg_type !=3D IP_RECVERR = && + cm->cmsg_level !=3D SOL_IPV6 && cm->cmsg_type !=3D IPV6_RECVER= R) { error_setg_errno(errp, EPROTOTYPE, "Wrong cmsg in errqueue"); return -1; --=20 2.37.1 From nobody Fri Mar 29 14:28:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1659712838; cv=none; d=zohomail.com; s=zohoarc; b=LnY8c3yBcTsfHfRRHvkx0y3F80Kxfkvv4G7hCwkoZTzw6JCdY1cUjhwX02yKg1x4wQDuZNvwmsM3au3e/UzuU68qtuwbGZSKa6bQw4jsMv89i7078JFD3999V8GSwXy8uJ7kqqimoahXXbXhcsw4gFczNitp96RREUnpOptUMGI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659712838; 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=6LuvpfQDyrc6Wv358pZJWDQkWem2Ny++jQn9NtXTqPc=; b=P7JVumS2ShP5yJYJZ1AgQRD07YcjggEaphyyOoXilgv+VbYzree6tlHih4S6mGOF/gfoKhR6KBYrwKRI8VyFfTLso+sp7Uso0+YVxVbOSdnHnXObPGETpqu1gDW6jDqH5lz6i3IYZT+HzHp3NeGLZ87VgiK5pp2mmHPSWrXIPiM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 165971283882836.95744609695771; Fri, 5 Aug 2022 08:20:38 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-512-C74nfJAeNRWMVfbqHO-vPA-1; Fri, 05 Aug 2022 11:20:35 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2408C811E7A; Fri, 5 Aug 2022 15:20:33 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1159040CFD0A; Fri, 5 Aug 2022 15:20:33 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E61741946A62; Fri, 5 Aug 2022 15:20:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8FE711946A5F for ; Fri, 5 Aug 2022 15:20:32 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 682A32026985; Fri, 5 Aug 2022 15:20:32 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C3CB2024CB6; Fri, 5 Aug 2022 15:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659712837; 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=6LuvpfQDyrc6Wv358pZJWDQkWem2Ny++jQn9NtXTqPc=; b=hdmn1owrCPYZf7nE6eCfsUQPOl8HYwbZnEOHmceweVRPXkGDizeYXbCTezXDknpeCYBfTA 4KfiW60yvnvp0eDcVvnSfJCUkja46bhl4lsVfg/AfQRfFywV/0Tom3W4BPDEZhLHUzwGi/ lFnf427mfBnq/+ke3Uh1g5VpJX6Arag= X-MC-Unique: C74nfJAeNRWMVfbqHO-vPA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 3/6] target/i386: display deprecation status in '-cpu help' Date: Fri, 5 Aug 2022 16:20:11 +0100 Message-Id: <20220805152014.135768-4-berrange@redhat.com> In-Reply-To: <20220805152014.135768-1-berrange@redhat.com> References: <20220805152014.135768-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Beraldo Leal , David Hildenbrand , libvir-list@redhat.com, Cornelia Huck , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 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: 1659712839903100003 When the user queries CPU models via QMP there is a 'deprecated' flag present, however, this is not done for the CLI '-cpu help' command. Reviewed-by: Cornelia Huck Signed-off-by: Daniel P. Berrang=C3=A9 --- target/i386/cpu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 194b5a31af..1db1278a59 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4837,6 +4837,11 @@ static void x86_cpu_list_entry(gpointer data, gpoint= er user_data) desc =3D g_strdup_printf("%s", model_id); } =20 + if (cc->model && cc->model->cpudef->deprecation_note) { + g_autofree char *olddesc =3D desc; + desc =3D g_strdup_printf("%s (deprecated)", olddesc); + } + qemu_printf("x86 %-20s %s\n", name, desc); } =20 --=20 2.37.1 From nobody Fri Mar 29 14:28:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1659712851; cv=none; d=zohomail.com; s=zohoarc; b=JMCS6zOz+LOQcCuT0Tm0GC4UQgsszN473LzoTUEHl4tfwgaUBP1tGL7BqtJCeu2DobQuC5pZwNhkBEvBe0mlTQHB7RWsq+rCvAoPo2qeBr/sgtV631otd1VCjYQ9X8jnv2b7USYLXL941o+h664DaqFUmKncUkaog9d3yzWJPOo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659712851; 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=7iraYkiYx8+NSuanjcxylNLIVSYr1X7Uv5zr34EkgLk=; b=VrpkygDNqhTaq9i/2JdJjypknUf3S7Pe8DaH6GZ2kB+abUeGKuuEzmql43TxRafZb+iGKA82evJQxb+I8ZbQPALyIh2MzOjsOFpVoQ4CDbFoIqdVwHY3DeJ3rDm9tzxO8VoetSnHlPxg+iMZzOcKIw412cBR/CRe5P+qTFggs3c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1659712851893267.6209345900894; Fri, 5 Aug 2022 08:20:51 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-482-2VnAaPPQM2KVa8uUvSTzow-1; Fri, 05 Aug 2022 11:20:39 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EF7123804064; Fri, 5 Aug 2022 15:20:37 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD9362026D07; Fri, 5 Aug 2022 15:20:37 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6BE7A1946A6B; Fri, 5 Aug 2022 15:20:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 197571946A5F for ; Fri, 5 Aug 2022 15:20:36 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 09D94202699A; Fri, 5 Aug 2022 15:20:36 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD2CF2027EB4; Fri, 5 Aug 2022 15:20:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659712850; 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=7iraYkiYx8+NSuanjcxylNLIVSYr1X7Uv5zr34EkgLk=; b=CjDBGKDW+APhIUtpbvdm3SXZ/L/JfXoc8cTxz1skFVg98XBoGclz5SxSJ8FXXywR2xAAs+ JC1fmMrUAAhgZiRjBhfqqxWDBjEbBXLBwaHm0VTXXfmQkNuIeDY1MncJcW/p0xZc/bZsKA YOb9Z+dwNvgiMfKHLRLqYgH+r3DJbbA= X-MC-Unique: 2VnAaPPQM2KVa8uUvSTzow-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 4/6] target/s390x: display deprecation status in '-cpu help' Date: Fri, 5 Aug 2022 16:20:12 +0100 Message-Id: <20220805152014.135768-5-berrange@redhat.com> In-Reply-To: <20220805152014.135768-1-berrange@redhat.com> References: <20220805152014.135768-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Beraldo Leal , David Hildenbrand , libvir-list@redhat.com, Cornelia Huck , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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: 1659712853963100001 When the user queries CPU models via QMP there is a 'deprecated' flag present, however, this is not done for the CLI '-cpu help' command. Reviewed-by: Cornelia Huck Signed-off-by: Daniel P. Berrang=C3=A9 --- target/s390x/cpu_models.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 1a562d2801..c3a4f80633 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -334,18 +334,31 @@ const S390CPUDef *s390_find_cpu_def(uint16_t type, ui= nt8_t gen, uint8_t ec_ga, static void s390_print_cpu_model_list_entry(gpointer data, gpointer user_d= ata) { const S390CPUClass *scc =3D S390_CPU_CLASS((ObjectClass *)data); + CPUClass *cc =3D CPU_CLASS(scc); char *name =3D g_strdup(object_class_get_name((ObjectClass *)data)); - const char *details =3D ""; + g_autoptr(GString) details =3D g_string_new(""); =20 if (scc->is_static) { - details =3D "(static, migration-safe)"; - } else if (scc->is_migration_safe) { - details =3D "(migration-safe)"; + g_string_append(details, "static, "); + } + if (scc->is_migration_safe) { + g_string_append(details, "migration-safe, "); + } + if (cc->deprecation_note) { + g_string_append(details, "deprecated, "); + } + if (details->len) { + /* cull trailing ', ' */ + g_string_truncate(details, details->len - 2); } =20 /* strip off the -s390x-cpu */ g_strrstr(name, "-" TYPE_S390_CPU)[0] =3D 0; - qemu_printf("s390 %-15s %-35s %s\n", name, scc->desc, details); + if (details->len) { + qemu_printf("s390 %-15s %-35s (%s)\n", name, scc->desc, details->s= tr); + } else { + qemu_printf("s390 %-15s %-35s\n", name, scc->desc); + } g_free(name); } =20 --=20 2.37.1 From nobody Fri Mar 29 14:28:02 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=1659712847; cv=none; d=zohomail.com; s=zohoarc; b=f8v/5pVcd+6kwDLet0+cMjvEPJBGSNlI4oLg/Z+8mlPzj49nSdVAZzQOooQKxY0DORlG3J+mxlDuvs8+9yH69qFndcPNelqxx2Fk0rJuuoz8u+a+QBPX5bQPciO0gN6QZL71+YY92BER5/BbxkYkBxlA+2aC+jWuqezcVoRKqUc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659712847; 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=zbkrAPg+IoDH3/j0b+xGddH732Y0wt599nfHSMm17i4=; b=GAiUg33G3lUp6457RD+FK6hCHSNzDeP6pBqP9W1EL1HSfls+8FiZDclf5Dj1F1pumRzsyG2HbUwjTKD8PFYF/CIRW0Ho4iCniFli8jlhK6r7WSjCTGaHB86NIsV16r7DWK7fFdloSPxCqr3WeTNsT2ReI4jNhy0Knw76L/jFCIo= 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 1659712847828462.76404078012433; Fri, 5 Aug 2022 08:20:47 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-517-HDBzh04YMA66Vm4pknnAxg-1; Fri, 05 Aug 2022 11:20:44 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E15358037AE; Fri, 5 Aug 2022 15:20:41 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD87A40CFD0A; Fri, 5 Aug 2022 15:20:41 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 904C11946A67; Fri, 5 Aug 2022 15:20:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 84A951946A62 for ; Fri, 5 Aug 2022 15:20:40 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6E0552026609; Fri, 5 Aug 2022 15:20:40 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B5B12026D4C; Fri, 5 Aug 2022 15:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659712846; 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=zbkrAPg+IoDH3/j0b+xGddH732Y0wt599nfHSMm17i4=; b=LNj0K9Hy4Oh8qH/jPjW1KkPxWYw2cQ7Mxnh+2ROzDYfT3MmPeoz1gdrUwXXWUNigp9rMDz LP7xS4Y2y2eadifgcfNZcTDCVorN3SBvvnitRRe9EfTD7xLvHb0re5IqilWw8Q4DyDdKfI fwS0ATBo3P7LHSXhFK8YD9BqFlb3Zdc= X-MC-Unique: HDBzh04YMA66Vm4pknnAxg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 5/6] target/arm: display deprecation status in '-cpu help' Date: Fri, 5 Aug 2022 16:20:13 +0100 Message-Id: <20220805152014.135768-6-berrange@redhat.com> In-Reply-To: <20220805152014.135768-1-berrange@redhat.com> References: <20220805152014.135768-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Beraldo Leal , David Hildenbrand , libvir-list@redhat.com, Cornelia Huck , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 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: 1659712849802100001 When the user queries CPU models via QMP there is a 'deprecated' flag present, however, this is not done for the CLI '-cpu help' command. Reviewed-by: Cornelia Huck Signed-off-by: Daniel P. Berrang=C3=A9 --- target/arm/helper.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index e1bdc80c35..d7bc467a2a 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -8185,12 +8185,17 @@ static gint arm_cpu_list_compare(gconstpointer a, g= constpointer b) static void arm_cpu_list_entry(gpointer data, gpointer user_data) { ObjectClass *oc =3D data; + CPUClass *cc =3D CPU_CLASS(oc); const char *typename; char *name; =20 typename =3D object_class_get_name(oc); name =3D g_strndup(typename, strlen(typename) - strlen("-" TYPE_ARM_CP= U)); - qemu_printf(" %s\n", name); + if (cc->deprecation_note) { + qemu_printf(" %s (deprecated)\n", name); + } else { + qemu_printf(" %s\n", name); + } g_free(name); } =20 --=20 2.37.1 From nobody Fri Mar 29 14:28:02 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=1659712867; cv=none; d=zohomail.com; s=zohoarc; b=Z1YXoPan4NZuBcMsj4kYTmN/6SuJijv5QyEEmZru7pMzwG89pfu83aU2ZRne0DyXk+Q2MUHdtMQbh6I6JeEROTmTDeWK4OB6kzYaYWiaOFI67zWqENdvnJu49lEOrudMW0efULoExgk8m6ZPJenLL4ptO2OWzp2SH0GJKG2bVpE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659712867; 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=UOT/8lZvPj0pecATGxp5bq0muJCXkI4mu9fSpzeFelo=; b=jj6KMbH/PeiTTkoLBlYK8kYUk8U50I6D1wJBAAdzSrt0rHTTJ3kDtu8jb/zr52aMLAZzhfTyg86pHYjc5YVwscTB9pq7A4S6kBhjIfz9LD5TjMoQ7KzoMHMaGT6D9E30kmgDTQKTrF0TSbODRzB2fSYMbXNXfygp81HWQxG3MSc= 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 1659712867213688.49966372248; Fri, 5 Aug 2022 08:21:07 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-388-fSEx1fIANJ2FhoSzF02_LQ-1; Fri, 05 Aug 2022 11:20:48 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7D58F3C0F376; Fri, 5 Aug 2022 15:20:45 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6A265C27DB3; Fri, 5 Aug 2022 15:20:45 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3352D1946A63; Fri, 5 Aug 2022 15:20:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B54B71946A60 for ; Fri, 5 Aug 2022 15:20:43 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9ED722026987; Fri, 5 Aug 2022 15:20:43 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id B25732026D4C; Fri, 5 Aug 2022 15:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659712865; 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=UOT/8lZvPj0pecATGxp5bq0muJCXkI4mu9fSpzeFelo=; b=B1KO6b6PsxBYV1UYyrEqG0XQxtg+YpvNd4WSNPiIaQPzJG2+HQoSTCyumj8C3iBs2CACB2 AlzOc6yMAwXpSnceZepawiCVvtHms92c2ZRzfJOYuwQgkI0Dei2ipCdMqSKcElEbXWBizP zZ6WPlgX2K78dOQTEEzAvJk9SYw/ugk= X-MC-Unique: fSEx1fIANJ2FhoSzF02_LQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 6/6] util/qemu-sockets: Replace the call to close a socket with closesocket() Date: Fri, 5 Aug 2022 16:20:14 +0100 Message-Id: <20220805152014.135768-7-berrange@redhat.com> In-Reply-To: <20220805152014.135768-1-berrange@redhat.com> References: <20220805152014.135768-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Bin Meng , Beraldo Leal , David Hildenbrand , libvir-list@redhat.com, Cornelia Huck , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 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: 1659712867835100001 From: Bin Meng close() is a *nix function. It works on any file descriptor, and sockets in *nix are an example of a file descriptor. closesocket() is a Windows-specific function, which works only specifically with sockets. Sockets on Windows do not use *nix-style file descriptors, and socket() returns a handle to a kernel object instead, so it must be closed with closesocket(). In QEMU there is already a logic to handle such platform difference in os-posix.h and os-win32.h, that: * closesocket maps to close on POSIX * closesocket maps to a wrapper that calls the real closesocket() on Windows Replace the call to close a socket with closesocket() instead. Signed-off-by: Bin Meng Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Daniel P. Berrang=C3=A9 --- util/qemu-sockets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 13b5b197f9..0e2298278f 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -487,7 +487,7 @@ int inet_connect_saddr(InetSocketAddress *saddr, Error = **errp) =20 if (ret < 0) { error_setg_errno(errp, errno, "Unable to set KEEPALIVE"); - close(sock); + closesocket(sock); return -1; } } @@ -1050,7 +1050,7 @@ static int unix_connect_saddr(UnixSocketAddress *sadd= r, Error **errp) return sock; =20 err: - close(sock); + closesocket(sock); return -1; } =20 --=20 2.37.1