From nobody Thu May 16 13:27:15 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=1684158228; cv=none; d=zohomail.com; s=zohoarc; b=kYpl6c2Eqvvb00GqTMqrwV69oeN5FyazyMmMjCyGZKngARKr/OWux9ZjBsNzezeOusWxm7ofHPE07sGzmUyBoieJMp4iUI+4UAKUYf3O1/AZ2kokiNNG31Qmgxij7++Rff7oFPs0t3I4SmRfI+6L7K4gicw12Ewj9OtPdpJdSVI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684158228; 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=hrKU1LYWX953Fkn9ya+kVUeolG7E8XfgpIk712/ehU4=; b=fGEeNDQYW9AgxPqf5JDwqW28hFcYLGC67OUJbdjvbVeRkKX84pBpVHZjR0vP5l1B6VUrl0JLnlRv76hNJ3x0EjgQU3Sdm5C0Q8ELAaN89U1WWMnrmpqB61N5r7mLoiGmwAQt9GsdQxyzdJfIF1X3t6TKeq+Y0Id3QKIRNMIfgiE= 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 1684158228462233.97318238376374; Mon, 15 May 2023 06:43:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXr7-0004rN-E6; Mon, 15 May 2023 09:03:13 -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 1pyXqj-0004RL-O6 for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:49 -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 1pyXqe-0000z4-A3 for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:49 -0400 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-492-7ZGY5BodNhuvzSRRvk2mjw-1; Mon, 15 May 2023 09:02:40 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 48FFD91C7E2; Mon, 15 May 2023 13:02:37 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F16640C6EC4; Mon, 15 May 2023 13:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155763; 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=hrKU1LYWX953Fkn9ya+kVUeolG7E8XfgpIk712/ehU4=; b=Gk1LLNF6LztqQjJ2CpHRhqUp8UmesjmCC0F4SE82tQRlX6scrMoIdeOF7toyjxAr0IeSOR u+Y35u0O6kAOy6b2rXWhSpf3YBxkKOyGeTQjXkYwzbqcfNvwk7mrIK7u8ysVorLQwgAiFW JtLPqbdRnqG8RfUjndx5gTWpEvnvckg= X-MC-Unique: 7ZGY5BodNhuvzSRRvk2mjw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PULL 01/21] tests/avocado/virtio-gpu: Fix the URLs of the test_virtio_vga_virgl test Date: Mon, 15 May 2023 15:02:13 +0200 Message-Id: <20230515130233.418183-2-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-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.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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: 1684158230161100001 The URLs here are not valid anymore - looks like the assets got moved into the pub/archive/ subfolder instead. Message-Id: <20230502105721.1661930-1-thuth@redhat.com> Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Thomas Huth --- tests/avocado/virtio-gpu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/avocado/virtio-gpu.py b/tests/avocado/virtio-gpu.py index 2a249a3a2c..e3b58fe799 100644 --- a/tests/avocado/virtio-gpu.py +++ b/tests/avocado/virtio-gpu.py @@ -36,13 +36,13 @@ class VirtioGPUx86(QemuSystemTest): =20 KERNEL_COMMAND_LINE =3D "printk.time=3D0 console=3DttyS0 rdinit=3D/bin= /bash" KERNEL_URL =3D ( - "https://archives.fedoraproject.org/pub/fedora" + "https://archives.fedoraproject.org/pub/archive/fedora" "/linux/releases/33/Everything/x86_64/os/images" "/pxeboot/vmlinuz" ) KERNEL_HASH =3D '1433cfe3f2ffaa44de4ecfb57ec25dc2399cdecf' INITRD_URL =3D ( - "https://archives.fedoraproject.org/pub/fedora" + "https://archives.fedoraproject.org/pub/archive/fedora" "/linux/releases/33/Everything/x86_64/os/images" "/pxeboot/initrd.img" ) --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684158180; cv=none; d=zohomail.com; s=zohoarc; b=ER7yH5+qG90ZjMpdaICB0Nk+6gQkkb4I12jl9NlldZMWNqAAFftSr8r7YKc0jEofQOZhKn0xijQMsbajHakWN422jM+wWyOLZqSVsDoOstnda8Tf/K+q6imrhNwWUff6qOZDi0Hsug54g9DFnOUaK5O59WHo9Fdwz1w7zcoR67w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684158180; 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=DTauAEELJEC4imLeGRtmpl0pypHiDTupS4plojnjZ5I=; b=PwTjXJuFBSXw4CgTAddxK2uV3xUB2kmCEW3mRe5Yp+Tv3ZLL4Uws93djilHqBOryG+t2C8HP2rtNbkhviGpx/X3hT+JcAqHNXTL0+D/2eU9ES7cTX/NTeZCv4H/8p8l/RHLmlZHCvJBm58f2ep5ppmaYt8iIJZem4roQIw0SmLQ= 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 1684158180345866.0002309261042; Mon, 15 May 2023 06:43:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXqi-0004LO-2P; Mon, 15 May 2023 09:02:48 -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 1pyXqg-0004Dt-CP for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:46 -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 1pyXqd-0000yv-SK for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:45 -0400 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-505-n1Z6myccMMyaGSQUag2j1Q-1; Mon, 15 May 2023 09:02:39 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 465D991C7E5; Mon, 15 May 2023 13:02:39 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C72040C6EC4; Mon, 15 May 2023 13:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155762; 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=DTauAEELJEC4imLeGRtmpl0pypHiDTupS4plojnjZ5I=; b=VzGH1hK+d/RDP0/5Dxnnyze0RX8US+oiDUy0+VaBPonGhdxoSPwjs3iNhi7hnp5WAXBcKe yF0RaQrE884Q31VFTXxL/SzGjGZOWgCDZtZpQLwOPwRmcla+Nv2QUlnnmN0LalESNNKGF1 8jaPUQ3U+YqDXhmbFHJi1MuFrVA/K0A= X-MC-Unique: n1Z6myccMMyaGSQUag2j1Q-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 02/21] sysemu/kvm: Remove unused headers Date: Mon, 15 May 2023 15:02:14 +0200 Message-Id: <20230515130233.418183-3-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-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.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684158181922100001 From: Philippe Mathieu-Daud=C3=A9 All types used are forward-declared in "qemu/typedefs.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230405160454.97436-2-philmd@linaro.org> Signed-off-by: Thomas Huth --- include/sysemu/kvm.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index c8281c07a7..88f5ccfbce 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -14,9 +14,6 @@ #ifndef QEMU_KVM_H #define QEMU_KVM_H =20 -#include "qemu/queue.h" -#include "hw/core/cpu.h" -#include "exec/memattrs.h" #include "qemu/accel.h" #include "qom/object.h" =20 --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684158146; cv=none; d=zohomail.com; s=zohoarc; b=M9dxBS8+X5Rn6KnvCAZQipxKoLPmx+z+EDjy0IBT0mss4vKYQG3/bbV35HMRnN+MF11FUuVx4SghdflR9R2KBuFzTpHzGiaUnKOoFt1exoUTi8xPSNBxFPLNZFHwFdGYRkWYFCebePoyKQkHpAoxns3t1HNHeiC+XnI6cHElC7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684158146; h=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=063Wkz46boUh95jEY6Wg8BdHSzMUAzj+P9SdvWac5xM=; b=JyORuwvjZYN1iwbChArSZZfbHrD07uVoj5ExZKCYgs2jqhu/i3wAZYvXXUcfSz0EFuHabdwIxxRGmg3Pe4fjvYH5X3QwZb9SSdkLyyO0yqL3l8vaREUjHttEezRPibfv1SsHel/rJAauKnwqEQCIfILWU21BLLKKXsqHTlnRGtY= 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 16841581462891015.4225971291118; Mon, 15 May 2023 06:42:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXr5-0004fs-L3; Mon, 15 May 2023 09:03:11 -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 1pyXqi-0004NN-5G for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:48 -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 1pyXqg-0000zO-AH for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:47 -0400 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-356-2yiGEoXCP66pUfZaIfj3Rg-1; Mon, 15 May 2023 09:02:42 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3E1361C0ED07; Mon, 15 May 2023 13:02:41 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 84F3040C6EC4; Mon, 15 May 2023 13:02:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155764; 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=063Wkz46boUh95jEY6Wg8BdHSzMUAzj+P9SdvWac5xM=; b=Igb4iLask/wAOVlrRGpxKAMec9xvYBjMZQl2A8esFngsIrO9A4UkvSBnzr2AYSF2okrypQ c8kagRHXTyTjvusjBX3Nccou0AaTliChIfX+3cBustJUvDI6S5AeB9MWbsTTcAeWN3gH5c yaAK4L232iXOjMCXwagaeI/zOJ+FLp0= X-MC-Unique: 2yiGEoXCP66pUfZaIfj3Rg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Laurent Vivier Subject: [PULL 03/21] net: stream: test reconnect option with an unix socket Date: Mon, 15 May 2023 15:02:15 +0200 Message-Id: <20230515130233.418183-4-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684158148413100005 Content-Type: text/plain; charset="utf-8" From: Laurent Vivier We can have failure with the inet type test because the port address is not allocated atomically and can be taken by another test between its selection and the start of QEMU. To avoid that, use an unix socket with a path that is unique Signed-off-by: Laurent Vivier Message-Id: <20230503094109.1198248-1-lvivier@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/qtest/netdev-socket.c | 39 +++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/tests/qtest/netdev-socket.c b/tests/qtest/netdev-socket.c index 9cf1b0698e..097abc0230 100644 --- a/tests/qtest/netdev-socket.c +++ b/tests/qtest/netdev-socket.c @@ -189,28 +189,26 @@ static void wait_stream_disconnected(QTestState *qts,= const char *id) qobject_unref(resp); } =20 -static void test_stream_inet_reconnect(void) +static void test_stream_unix_reconnect(void) { QTestState *qts0, *qts1; - int port; SocketAddress *addr; + gchar *path; =20 - port =3D inet_get_free_port(false); + path =3D g_strconcat(tmpdir, "/stream_unix_reconnect", NULL); qts0 =3D qtest_initf("-nodefaults -M none " - "-netdev stream,id=3Dst0,server=3Dtrue,addr.type=3D= inet," - "addr.ipv4=3Don,addr.ipv6=3Doff," - "addr.host=3D127.0.0.1,addr.port=3D%d", port); + "-netdev stream,id=3Dst0,server=3Dtrue,addr.type=3D= unix," + "addr.path=3D%s", path); =20 EXPECT_STATE(qts0, "st0: index=3D0,type=3Dstream,\r\n", 0); =20 qts1 =3D qtest_initf("-nodefaults -M none " - "-netdev stream,server=3Dfalse,id=3Dst0,addr.type= =3Dinet," - "addr.ipv4=3Don,addr.ipv6=3Doff,reconnect=3D1," - "addr.host=3D127.0.0.1,addr.port=3D%d", port); + "-netdev stream,server=3Dfalse,id=3Dst0,addr.type= =3Dunix," + "addr.path=3D%s,reconnect=3D1", path); =20 wait_stream_connected(qts0, "st0", &addr); - g_assert_cmpint(addr->type, =3D=3D, SOCKET_ADDRESS_TYPE_INET); - g_assert_cmpstr(addr->u.inet.host, =3D=3D, "127.0.0.1"); + g_assert_cmpint(addr->type, =3D=3D, SOCKET_ADDRESS_TYPE_UNIX); + g_assert_cmpstr(addr->u.q_unix.path, =3D=3D, path); qapi_free_SocketAddress(addr); =20 /* kill server */ @@ -221,24 +219,23 @@ static void test_stream_inet_reconnect(void) =20 /* restart server */ qts0 =3D qtest_initf("-nodefaults -M none " - "-netdev stream,id=3Dst0,server=3Dtrue,addr.type=3D= inet," - "addr.ipv4=3Don,addr.ipv6=3Doff," - "addr.host=3D127.0.0.1,addr.port=3D%d", port); + "-netdev stream,id=3Dst0,server=3Dtrue,addr.type=3D= unix," + "addr.path=3D%s", path); =20 /* wait connection events*/ wait_stream_connected(qts0, "st0", &addr); - g_assert_cmpint(addr->type, =3D=3D, SOCKET_ADDRESS_TYPE_INET); - g_assert_cmpstr(addr->u.inet.host, =3D=3D, "127.0.0.1"); + g_assert_cmpint(addr->type, =3D=3D, SOCKET_ADDRESS_TYPE_UNIX); + g_assert_cmpstr(addr->u.q_unix.path, =3D=3D, path); qapi_free_SocketAddress(addr); =20 wait_stream_connected(qts1, "st0", &addr); - g_assert_cmpint(addr->type, =3D=3D, SOCKET_ADDRESS_TYPE_INET); - g_assert_cmpstr(addr->u.inet.host, =3D=3D, "127.0.0.1"); - g_assert_cmpint(atoi(addr->u.inet.port), =3D=3D, port); + g_assert_cmpint(addr->type, =3D=3D, SOCKET_ADDRESS_TYPE_UNIX); + g_assert_cmpstr(addr->u.q_unix.path, =3D=3D, path); qapi_free_SocketAddress(addr); =20 qtest_quit(qts1); qtest_quit(qts0); + g_free(path); } =20 static void test_stream_inet_ipv6(void) @@ -517,8 +514,6 @@ int main(int argc, char **argv) #ifndef _WIN32 qtest_add_func("/netdev/dgram/mcast", test_dgram_mcast); #endif - qtest_add_func("/netdev/stream/inet/reconnect", - test_stream_inet_reconnect); } if (has_ipv6) { qtest_add_func("/netdev/stream/inet/ipv6", test_stream_inet_ipv6); @@ -530,6 +525,8 @@ int main(int argc, char **argv) qtest_add_func("/netdev/dgram/unix", test_dgram_unix); #endif qtest_add_func("/netdev/stream/unix", test_stream_unix); + qtest_add_func("/netdev/stream/unix/reconnect", + test_stream_unix_reconnect); #ifdef CONFIG_LINUX qtest_add_func("/netdev/stream/unix/abstract", test_stream_unix_abstract); --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684157690; cv=none; d=zohomail.com; s=zohoarc; b=CqWwaRbry0SjRKGC65j1940G1McsLi0BsCAw8YvGsoRFNt+60V1ii+PyoPbgRfifA9xE6rsxhj4SqHNbBs204VW/boNgczSVhlE7JOSxL7SBgzfiTz6Q9adfmXWcBWcVhp4CjDxgD+6u3m6Sf973GiWkCyG6K94w2cQ2XGkruP8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684157690; 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=4oC6DYQAJ/WMunrJ/UoN5sKQd7QsKrd2kF28yVlSAZI=; b=Y1j9gFyVO65iGm4wQjWXrnNP/sePwyZPktnDyZsyBYJSUutfpRbUXvn9mvUxx3zYwSaEJOqBEFN+vCKXJ5aRjHuvwxME02gJQC+nAIdJu2M94729JCpGgA+Hj199mUiRQmLMmoDMK4XTtz2QUEJBfdbIPAU13wY8U20LKlrEpfU= 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 1684157690282151.63418313358977; Mon, 15 May 2023 06:34:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsJ-00072H-Uh; Mon, 15 May 2023 09:04:28 -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 1pyXqm-0004TM-Qi for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02: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 1pyXqi-000105-0T for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:52 -0400 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-606-x9h2COmSNTy7hJJ3mkpQXQ-1; Mon, 15 May 2023 09:02:46 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ABE193C21BA9; Mon, 15 May 2023 13:02:42 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7F59740C6EC4; Mon, 15 May 2023 13:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155767; 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=4oC6DYQAJ/WMunrJ/UoN5sKQd7QsKrd2kF28yVlSAZI=; b=YBClCDaOX7vVAjp+Zox+jUOmNq5J2d0UBThD7JeJ6lvQTaMnow7R/U8qszDGLRUfgW7tlK jQfmUwhoFc61eTQ2ZO1d16MYDgqKYWpkFHVHXZvX5pmnMcZ2JEe2bT3oQeWC6/iMXop6i8 PjhMcz3KPVcCD8wgzb0AFgJ0Mwk0CW0= X-MC-Unique: x9h2COmSNTy7hJJ3mkpQXQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Juan Quintela , Zhang Chen Subject: [PULL 04/21] tests/qtest: replace qmp_discard_response with qtest_qmp_assert_success Date: Mon, 15 May 2023 15:02:16 +0200 Message-Id: <20230515130233.418183-5-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-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.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684157692352100011 From: Daniel P. Berrang=C3=A9 The qmp_discard_response method simply ignores the result of the QMP command, merely unref'ing the object. This is a bad idea for tests as it leaves no trace if the QMP command unexpectedly failed. The qtest_qmp_assert_success method will validate that the QMP command returned without error, and if errors occur, it will print a message on the console aiding debugging. Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20230421171411.566300-2-berrange@redhat.com> Reviewed-by: Juan Quintela Reviewed-by: Zhang Chen Signed-off-by: Thomas Huth --- tests/qtest/ahci-test.c | 31 ++++++++++++++-------------- tests/qtest/boot-order-test.c | 5 +---- tests/qtest/fdc-test.c | 15 +++++++------- tests/qtest/ide-test.c | 5 +---- tests/qtest/migration-test.c | 5 +---- tests/qtest/test-filter-mirror.c | 5 +---- tests/qtest/test-filter-redirector.c | 7 ++----- tests/qtest/virtio-blk-test.c | 24 ++++++++++----------- 8 files changed, 40 insertions(+), 57 deletions(-) diff --git a/tests/qtest/ahci-test.c b/tests/qtest/ahci-test.c index 1967cd5898..abab761c26 100644 --- a/tests/qtest/ahci-test.c +++ b/tests/qtest/ahci-test.c @@ -36,9 +36,6 @@ #include "hw/pci/pci_ids.h" #include "hw/pci/pci_regs.h" =20 -/* TODO actually test the results and get rid of this */ -#define qmp_discard_response(s, ...) qobject_unref(qtest_qmp(s, __VA_ARGS_= _)) - /* Test images sizes in MB */ #define TEST_IMAGE_SIZE_MB_LARGE (200 * 1024) #define TEST_IMAGE_SIZE_MB_SMALL 64 @@ -1595,9 +1592,9 @@ static void test_atapi_tray(void) rsp =3D qtest_qmp_receive(ahci->parent->qts); qobject_unref(rsp); =20 - qmp_discard_response(ahci->parent->qts, - "{'execute': 'blockdev-remove-medium', " - "'arguments': {'id': 'cd0'}}"); + qtest_qmp_assert_success(ahci->parent->qts, + "{'execute': 'blockdev-remove-medium', " + "'arguments': {'id': 'cd0'}}"); =20 /* Test the tray without a medium */ ahci_atapi_load(ahci, port); @@ -1607,16 +1604,18 @@ static void test_atapi_tray(void) atapi_wait_tray(ahci, true); =20 /* Re-insert media */ - qmp_discard_response(ahci->parent->qts, - "{'execute': 'blockdev-add', " - "'arguments': {'node-name': 'node0', " - "'driver': 'raw', " - "'file': { 'driver': 'file', " - "'filename': %s }}}", is= o); - qmp_discard_response(ahci->parent->qts, - "{'execute': 'blockdev-insert-medium'," - "'arguments': { 'id': 'cd0', " - "'node-name': 'node0' }}"); + qtest_qmp_assert_success( + ahci->parent->qts, + "{'execute': 'blockdev-add', " + "'arguments': {'node-name': 'node0', " + "'driver': 'raw', " + "'file': { 'driver': 'file', " + "'filename': %s }}}", iso); + qtest_qmp_assert_success( + ahci->parent->qts, + "{'execute': 'blockdev-insert-medium'," + "'arguments': { 'id': 'cd0', " + "'node-name': 'node0' }}"); =20 /* Again, the event shows up first */ qtest_qmp_send(ahci->parent->qts, "{'execute': 'blockdev-close-tray', " diff --git a/tests/qtest/boot-order-test.c b/tests/qtest/boot-order-test.c index 0680d79d6d..8f2b6ef05a 100644 --- a/tests/qtest/boot-order-test.c +++ b/tests/qtest/boot-order-test.c @@ -16,9 +16,6 @@ #include "qapi/qmp/qdict.h" #include "standard-headers/linux/qemu_fw_cfg.h" =20 -/* TODO actually test the results and get rid of this */ -#define qmp_discard_response(qs, ...) qobject_unref(qtest_qmp(qs, __VA_ARG= S__)) - typedef struct { const char *args; uint64_t expected_boot; @@ -43,7 +40,7 @@ static void test_a_boot_order(const char *machine, machine ?: "", test_args); actual =3D read_boot_order(qts); g_assert_cmphex(actual, =3D=3D, expected_boot); - qmp_discard_response(qts, "{ 'execute': 'system_reset' }"); + qtest_qmp_assert_success(qts, "{ 'execute': 'system_reset' }"); /* * system_reset only requests reset. We get a RESET event after * the actual reset completes. Need to wait for that. diff --git a/tests/qtest/fdc-test.c b/tests/qtest/fdc-test.c index 1f9b99ad6d..5e8fbda9df 100644 --- a/tests/qtest/fdc-test.c +++ b/tests/qtest/fdc-test.c @@ -28,9 +28,6 @@ #include "libqtest-single.h" #include "qapi/qmp/qdict.h" =20 -/* TODO actually test the results and get rid of this */ -#define qmp_discard_response(...) qobject_unref(qmp(__VA_ARGS__)) - #define DRIVE_FLOPPY_BLANK \ "-drive if=3Dfloppy,file=3Dnull-co://,file.read-zeroes=3Don,format=3Dr= aw,size=3D1440k" =20 @@ -304,9 +301,10 @@ static void test_media_insert(void) =20 /* Insert media in drive. DSKCHK should not be reset until a step pulse * is sent. */ - qmp_discard_response("{'execute':'blockdev-change-medium', 'arguments'= :{" - " 'id':'floppy0', 'filename': %s, 'format': 'raw'= }}", - test_image); + qtest_qmp_assert_success(global_qtest, + "{'execute':'blockdev-change-medium', 'argume= nts':{" + " 'id':'floppy0', 'filename': %s, 'format': '= raw' }}", + test_image); =20 dir =3D inb(FLOPPY_BASE + reg_dir); assert_bit_set(dir, DSKCHG); @@ -335,8 +333,9 @@ static void test_media_change(void) =20 /* Eject the floppy and check that DSKCHG is set. Reading it out doesn= 't * reset the bit. */ - qmp_discard_response("{'execute':'eject', 'arguments':{" - " 'id':'floppy0' }}"); + qtest_qmp_assert_success(global_qtest, + "{'execute':'eject', 'arguments':{" + " 'id':'floppy0' }}"); =20 dir =3D inb(FLOPPY_BASE + reg_dir); assert_bit_set(dir, DSKCHG); diff --git a/tests/qtest/ide-test.c b/tests/qtest/ide-test.c index dcb050bf9b..d6b4f6e36a 100644 --- a/tests/qtest/ide-test.c +++ b/tests/qtest/ide-test.c @@ -34,9 +34,6 @@ #include "hw/pci/pci_ids.h" #include "hw/pci/pci_regs.h" =20 -/* TODO actually test the results and get rid of this */ -#define qmp_discard_response(q, ...) qobject_unref(qtest_qmp(q, __VA_ARGS_= _)) - #define TEST_IMAGE_SIZE 64 * 1024 * 1024 =20 #define IDE_PCI_DEV 1 @@ -766,7 +763,7 @@ static void test_pci_retry_flush(void) qtest_qmp_eventwait(qts, "STOP"); =20 /* Complete the command */ - qmp_discard_response(qts, "{'execute':'cont' }"); + qtest_qmp_assert_success(qts, "{'execute':'cont' }"); =20 /* Check registers */ data =3D qpci_io_readb(dev, ide_bar, reg_device); diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 8a5df84624..b99b49a314 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -40,9 +40,6 @@ #include "linux/kvm.h" #endif =20 -/* TODO actually test the results and get rid of this */ -#define qtest_qmp_discard_response(...) qobject_unref(qtest_qmp(__VA_ARGS_= _)) - unsigned start_address; unsigned end_address; static bool uffd_feature_thread_id; @@ -766,7 +763,7 @@ static void test_migrate_end(QTestState *from, QTestSta= te *to, bool test_dest) usleep(1000 * 10); } while (dest_byte_a =3D=3D dest_byte_b); =20 - qtest_qmp_discard_response(to, "{ 'execute' : 'stop'}"); + qtest_qmp_assert_success(to, "{ 'execute' : 'stop'}"); =20 /* With it stopped, check nothing changes */ qtest_memread(to, start_address, &dest_byte_c, 1); diff --git a/tests/qtest/test-filter-mirror.c b/tests/qtest/test-filter-mir= ror.c index 248fc88699..adeada3eb8 100644 --- a/tests/qtest/test-filter-mirror.c +++ b/tests/qtest/test-filter-mirror.c @@ -16,9 +16,6 @@ #include "qemu/error-report.h" #include "qemu/main-loop.h" =20 -/* TODO actually test the results and get rid of this */ -#define qmp_discard_response(qs, ...) qobject_unref(qtest_qmp(qs, __VA_ARG= S__)) - static void test_mirror(void) { int send_sock[2], recv_sock[2]; @@ -52,7 +49,7 @@ static void test_mirror(void) }; =20 /* send a qmp command to guarantee that 'connected' is setting to true= . */ - qmp_discard_response(qts, "{ 'execute' : 'query-status'}"); + qtest_qmp_assert_success(qts, "{ 'execute' : 'query-status'}"); ret =3D iov_send(send_sock[0], iov, 2, 0, sizeof(size) + sizeof(send_b= uf)); g_assert_cmpint(ret, =3D=3D, sizeof(send_buf) + sizeof(size)); close(send_sock[0]); diff --git a/tests/qtest/test-filter-redirector.c b/tests/qtest/test-filter= -redirector.c index 24ca9280f8..e72e3b7873 100644 --- a/tests/qtest/test-filter-redirector.c +++ b/tests/qtest/test-filter-redirector.c @@ -58,9 +58,6 @@ #include "qemu/error-report.h" #include "qemu/main-loop.h" =20 -/* TODO actually test the results and get rid of this */ -#define qmp_discard_response(qs, ...) qobject_unref(qtest_qmp(qs, __VA_ARG= S__)) - static void test_redirector_tx(void) { int backend_sock[2], recv_sock; @@ -98,7 +95,7 @@ static void test_redirector_tx(void) g_assert_cmpint(recv_sock, !=3D, -1); =20 /* send a qmp command to guarantee that 'connected' is setting to true= . */ - qmp_discard_response(qts, "{ 'execute' : 'query-status'}"); + qtest_qmp_assert_success(qts, "{ 'execute' : 'query-status'}"); =20 struct iovec iov[] =3D { { @@ -176,7 +173,7 @@ static void test_redirector_rx(void) send_sock =3D unix_connect(sock_path1, NULL); g_assert_cmpint(send_sock, !=3D, -1); /* send a qmp command to guarantee that 'connected' is setting to true= . */ - qmp_discard_response(qts, "{ 'execute' : 'query-status'}"); + qtest_qmp_assert_success(qts, "{ 'execute' : 'query-status'}"); =20 ret =3D iov_send(send_sock, iov, 2, 0, sizeof(size) + sizeof(send_buf)= ); g_assert_cmpint(ret, =3D=3D, sizeof(send_buf) + sizeof(size)); diff --git a/tests/qtest/virtio-blk-test.c b/tests/qtest/virtio-blk-test.c index 19c01f808b..98c906ebb4 100644 --- a/tests/qtest/virtio-blk-test.c +++ b/tests/qtest/virtio-blk-test.c @@ -17,9 +17,6 @@ #include "libqos/qgraph.h" #include "libqos/virtio-blk.h" =20 -/* TODO actually test the results and get rid of this */ -#define qmp_discard_response(...) qobject_unref(qmp(__VA_ARGS__)) - #define TEST_IMAGE_SIZE (64 * 1024 * 1024) #define QVIRTIO_BLK_TIMEOUT_US (30 * 1000 * 1000) #define PCI_SLOT_HP 0x06 @@ -453,9 +450,10 @@ static void config(void *obj, void *data, QGuestAlloca= tor *t_alloc) =20 qvirtio_set_driver_ok(dev); =20 - qmp_discard_response("{ 'execute': 'block_resize', " - " 'arguments': { 'device': 'drive0', " - " 'size': %d } }", n_size); + qtest_qmp_assert_success(global_qtest, + "{ 'execute': 'block_resize', " + " 'arguments': { 'device': 'drive0', " + " 'size': %d } }", n_size); qvirtio_wait_config_isr(dev, QVIRTIO_BLK_TIMEOUT_US); =20 capacity =3D qvirtio_config_readq(dev, 0); @@ -502,9 +500,10 @@ static void msix(void *obj, void *u_data, QGuestAlloca= tor *t_alloc) =20 qvirtio_set_driver_ok(dev); =20 - qmp_discard_response("{ 'execute': 'block_resize', " - " 'arguments': { 'device': 'drive0', " - " 'size': %d } }", n_size); + qtest_qmp_assert_success(global_qtest, + "{ 'execute': 'block_resize', " + " 'arguments': { 'device': 'drive0', " + " 'size': %d } }", n_size); =20 qvirtio_wait_config_isr(dev, QVIRTIO_BLK_TIMEOUT_US); =20 @@ -758,9 +757,10 @@ static void resize(void *obj, void *data, QGuestAlloca= tor *t_alloc) =20 vq =3D test_basic(dev, t_alloc); =20 - qmp_discard_response("{ 'execute': 'block_resize', " - " 'arguments': { 'device': 'drive0', " - " 'size': %d } }", n_size); + qtest_qmp_assert_success(global_qtest, + "{ 'execute': 'block_resize', " + " 'arguments': { 'device': 'drive0', " + " 'size': %d } }", n_size); =20 qvirtio_wait_queue_isr(qts, dev, vq, QVIRTIO_BLK_TIMEOUT_US); =20 --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684157366; cv=none; d=zohomail.com; s=zohoarc; b=UqxdFfclvXRu9MHAEn6Ex1DRefyFioQE1QN7ebKpJVXMFDxvPCPfCL80y8mNmegEmHwrYMNZdLV5VEvlC9yM3/Nmm4P98MqWr+R9PRXntgMiKTT52qYwUC8K3yUXbOF70YW4pjVMw+go+2PFdhvVRZ2zSDMvnSEu1fhZD8HcOhg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684157366; h=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=W7/Zq85QIWoyCl9KubUldUkGWJQIOCZHsDffGfE2I4Q=; b=R8iXgzfGJdCrtKp2XfsnwKKj8o17FQ6mKNcD4KqYteqD0xLUHPLUkbZMIiXFsePn9m96fQSGT4uWbR4akJGhVJiy1iBnjwznMiKb4Nc6IVS3gm8M0J7cNsubiGAk2w+Yslzfmzm4/UlNAgoJmuaC5LSOUgje2csKADtvUhKMhA4= 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 1684157366008520.1955799474304; Mon, 15 May 2023 06:29:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXs3-0006fU-48; Mon, 15 May 2023 09:04:16 -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 1pyXqn-0004TN-D1 for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:59 -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 1pyXqj-00010f-88 for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:53 -0400 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-31-etlLvfcSM8-DqNw_2cBJkw-1; Mon, 15 May 2023 09:02:44 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D64151825061; Mon, 15 May 2023 13:02:43 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB7A440C6EC4; Mon, 15 May 2023 13:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155768; 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=W7/Zq85QIWoyCl9KubUldUkGWJQIOCZHsDffGfE2I4Q=; b=ZAtSyaZ2g7rwyC2j4Jll4YO9CRTaUepuKcg2GJQo+HSS4cyCIUurkrvjnFBgTx2Lb5mGx7 XmGvWA14Q501WS9cTWV4oLoOBaca6XdW38nzcRXSlawFIwS5XPQTIIDy1QhfKgrRzsY5b+ r5UTgS2bR7JvRd66CXX8LGTKFidV3tA= X-MC-Unique: etlLvfcSM8-DqNw_2cBJkw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Jonathan Cameron Subject: [PULL 05/21] hw/pci-bridge: Fix release ordering by embedding PCIBridgeWindows within PCIBridge Date: Mon, 15 May 2023 15:02:17 +0200 Message-Id: <20230515130233.418183-6-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684157368128100001 Content-Type: text/plain; charset="utf-8" From: Jonathan Cameron The lifetime of the PCIBridgeWindows instance accessed via the windows poin= ter in struct PCIBridge is managed separately from the PCIBridge itself. Triggered by ./qemu-system-x86_64 -M x-remote -display none -monitor stdio QEMU monitor: device_add cxl-downstream In some error handling paths (such as the above due to attaching a cxl-down= stream port anything other than a cxl-upstream port) the g_free() of the PCIBridge windows in pci_bridge_region_cleanup() is called before the final call of flatview_uref() in address_space_set_flatview() ultimately from drain_call_rcu() At one stage this resulted in a crash, currently can still be observed using valgrind which records a use after free. When present, only one instance is allocated. pci_bridge_update_mappings() can operate directly on an instance rather than creating a new one and swapping it in. Thus there appears to be no reason to not directly couple the lifetimes of the two structures by embedding the PCIBridgeWindows within the PCIBridge removing the need for the problematic separate free. Patch is same as was posted deep in the discussion. https://lore.kernel.org/qemu-devel/20230403171232.000020bb@huawei.com/ Reported-by: Thomas Huth Signed-off-by: Jonathan Cameron Message-Id: <20230421122550.28234-1-Jonathan.Cameron@huawei.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- include/hw/pci/pci_bridge.h | 2 +- hw/pci/pci_bridge.c | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/include/hw/pci/pci_bridge.h b/include/hw/pci/pci_bridge.h index 01670e9e65..ea54a81a15 100644 --- a/include/hw/pci/pci_bridge.h +++ b/include/hw/pci/pci_bridge.h @@ -73,7 +73,7 @@ struct PCIBridge { MemoryRegion address_space_mem; MemoryRegion address_space_io; =20 - PCIBridgeWindows *windows; + PCIBridgeWindows windows; =20 pci_map_irq_fn map_irq; const char *bus_name; diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c index dd5af508f9..e7b9345615 100644 --- a/hw/pci/pci_bridge.c +++ b/hw/pci/pci_bridge.c @@ -184,11 +184,11 @@ static void pci_bridge_init_vga_aliases(PCIBridge *br= , PCIBus *parent, } } =20 -static PCIBridgeWindows *pci_bridge_region_init(PCIBridge *br) +static void pci_bridge_region_init(PCIBridge *br) { PCIDevice *pd =3D PCI_DEVICE(br); PCIBus *parent =3D pci_get_bus(pd); - PCIBridgeWindows *w =3D g_new(PCIBridgeWindows, 1); + PCIBridgeWindows *w =3D &br->windows; uint16_t cmd =3D pci_get_word(pd->config + PCI_COMMAND); =20 pci_bridge_init_alias(br, &w->alias_pref_mem, @@ -211,8 +211,6 @@ static PCIBridgeWindows *pci_bridge_region_init(PCIBrid= ge *br) cmd & PCI_COMMAND_IO); =20 pci_bridge_init_vga_aliases(br, parent, w->alias_vga); - - return w; } =20 static void pci_bridge_region_del(PCIBridge *br, PCIBridgeWindows *w) @@ -234,19 +232,18 @@ static void pci_bridge_region_cleanup(PCIBridge *br, = PCIBridgeWindows *w) object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_LO])); object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_IO_HI])); object_unparent(OBJECT(&w->alias_vga[QEMU_PCI_VGA_MEM])); - g_free(w); } =20 void pci_bridge_update_mappings(PCIBridge *br) { - PCIBridgeWindows *w =3D br->windows; + PCIBridgeWindows *w =3D &br->windows; =20 /* Make updates atomic to: handle the case of one VCPU updating the br= idge * while another accesses an unaffected region. */ memory_region_transaction_begin(); - pci_bridge_region_del(br, br->windows); + pci_bridge_region_del(br, w); pci_bridge_region_cleanup(br, w); - br->windows =3D pci_bridge_region_init(br); + pci_bridge_region_init(br); memory_region_transaction_commit(); } =20 @@ -385,7 +382,7 @@ void pci_bridge_initfn(PCIDevice *dev, const char *type= name) sec_bus->address_space_io =3D &br->address_space_io; memory_region_init(&br->address_space_io, OBJECT(br), "pci_bridge_io", 4 * GiB); - br->windows =3D pci_bridge_region_init(br); + pci_bridge_region_init(br); QLIST_INIT(&sec_bus->child); QLIST_INSERT_HEAD(&parent->child, sec_bus, sibling); } @@ -396,8 +393,8 @@ void pci_bridge_exitfn(PCIDevice *pci_dev) PCIBridge *s =3D PCI_BRIDGE(pci_dev); assert(QLIST_EMPTY(&s->sec_bus.child)); QLIST_REMOVE(&s->sec_bus, sibling); - pci_bridge_region_del(s, s->windows); - pci_bridge_region_cleanup(s, s->windows); + pci_bridge_region_del(s, &s->windows); + pci_bridge_region_cleanup(s, &s->windows); /* object_unparent() is called automatically during device deletion */ } =20 --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684157688; cv=none; d=zohomail.com; s=zohoarc; b=X5/HiP+ZgZLqYVkWVSJuGxV4l+N/wRM2idTq4O9XZSWl6UDh8bj9WybAuwTJYBFx56ZLZqIXVKuCFE2UbHGiemL9usAbct75hgiZBtiZBZaI94UkIneoHxRqTg7pKR6MaP6PszAOjDqEwSnryVWUPNyaTvSrb2JDBgPlL0dQzkc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684157688; h=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=mLAcJvdt4KSIVqT7+BRvf/ct4IqT2QBXigE3eLpau+4=; b=eaFtDLgXJy8Jvujfgf9lCP2HCEHrdL0ayN8jtOHcgZIiE7suWiRFpeW9F9gqAcJEDX8ChCz6u7K6fWImesKG3LVGYYESswCAjSh6ScLVB04JP929BgQKXN3KoVAWze5gZstESwnl4HtmGHf+CKgi3rfth0J1MyLeL1J/xkf5I0o= 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 1684157688733899.5722801730935; Mon, 15 May 2023 06:34:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsJ-000708-IY; Mon, 15 May 2023 09:04: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 1pyXqw-0004Yp-Gz for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:03 -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 1pyXqp-00011e-Gc for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:59 -0400 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-203-WlX00yl-PZyA5RBWMW0cpw-1; Mon, 15 May 2023 09:02:47 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D7E49863E85; Mon, 15 May 2023 13:02:44 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 22A6840C6EC4; Mon, 15 May 2023 13:02:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155773; 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=mLAcJvdt4KSIVqT7+BRvf/ct4IqT2QBXigE3eLpau+4=; b=hIY3rAnHfKVuBWwKFrBUmHjMwwwUzUxdMJMIsrea0vmDUh9oIbgbw/ZNqWFAGDOirms7Lh MKnjUBa5Lz9KQS6LBVkT0vrswNR5xXrpJJI6bOXNjRtm6ZIJy+8SOXo1Sa09MSL4n49Qf1 gjLgg7b8OqRoQrBScQY7NlSmEDSNhN4= X-MC-Unique: WlX00yl-PZyA5RBWMW0cpw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Mateusz Krawczuk Subject: [PULL 06/21] Add information how to fix common build error on Windows in symlink-install-tree Date: Mon, 15 May 2023 15:02:18 +0200 Message-Id: <20230515130233.418183-7-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684157689187100005 Content-Type: text/plain; charset="utf-8" From: Mateusz Krawczuk By default, Windows doesn't allow to create soft links for user account and only administrator is allowed to do this. To fix this problem you have to raise your permissions or enable Developer Mode, which available since Windows 10. Additional explanation when build fails will allow developer to fix the problem on his computer faster. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1386 Signed-off-by: Mateusz Krawczuk Message-Id: <20230504211101.1386-1-mat.krawczuk@gmail.com> [thuth: Drop the hunk with the white space changes] Signed-off-by: Thomas Huth --- scripts/symlink-install-tree.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/symlink-install-tree.py b/scripts/symlink-install-tree= .py index 67cb86dd52..8ed97e3c94 100644 --- a/scripts/symlink-install-tree.py +++ b/scripts/symlink-install-tree.py @@ -28,5 +28,8 @@ def destdir_join(d1: str, d2: str) -> str: os.symlink(source, bundle_dest) except BaseException as e: if not isinstance(e, OSError) or e.errno !=3D errno.EEXIST: + if os.name =3D=3D 'nt': + print('Please enable Developer Mode to support soft link ' + 'without Administrator permission') print(f'error making symbolic link {dest}', file=3Dsys.stderr) raise e --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684158255; cv=none; d=zohomail.com; s=zohoarc; b=O+YcpZC4KSWTUHIoXWw/nZfnK5LxmOvg1/I5BqjyapQ0M6uKjn7mXNnOyU2EaD4tzXYV6ipmX+70+220DOlwB56csYg5ftfa44VTkPLHvaFTPOYKX5Ck79do/6XBbgBncii0RUIfbJPM1ip+yqUh0gcvnO4/kDM9luQ1iiBKXUI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684158255; h=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=Wa7lroBwX8eGov14ZuIfxfc/Q7d65wWLO6J/WwGB63M=; b=oEmo/P495zXWPV/THfUagOyl8xSZP2evAo0iuQJ+gd3CmqnRpfiNPe2xDWG/MtXXn7qK0I0tVZVu6Z3MYP2lD3ISB7ZJ4+qXndKOZEVlz+Z8n8I+Z/bS4DRbUAJ4zjrljoXtYqvzsuEwqlN3BluxBHD4q0iR2atu0w6W9GnSidI= 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 1684158255798253.75572219500793; Mon, 15 May 2023 06:44:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsW-0008LW-Fo; Mon, 15 May 2023 09:04:40 -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 1pyXqq-0004TS-7d for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:59 -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 1pyXqn-00011L-0G for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:54 -0400 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-275-BCtTISpDOoahAlYiSuTyOA-1; Mon, 15 May 2023 09:02:48 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D2FB3855569; Mon, 15 May 2023 13:02:46 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25D6140C6EC4; Mon, 15 May 2023 13:02:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155772; 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=Wa7lroBwX8eGov14ZuIfxfc/Q7d65wWLO6J/WwGB63M=; b=CCOWDzmjXzEJvOxmastxeP4k0mM7CSLhlnElPhz2BpVFD5hs/TPRMoeAOmGypi6b/0f89k nQsk4FtPv59cIOJvALN3MCtEOp/ZycTmaeKnJnN3NU799vbUTVOqMN93VpP/ocGgjhYqut PD65FAmYhFLBLBMY/57h0LguHllDKTk= X-MC-Unique: BCtTISpDOoahAlYiSuTyOA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Ani Sinha , "Michael S . Tsirkin" Subject: [PULL 07/21] tests: libvirt-ci: Update to commit 'c8971e90ac' to pull in mformat and xorriso Date: Mon, 15 May 2023 15:02:19 +0200 Message-Id: <20230515130233.418183-8-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684158256295100005 Content-Type: text/plain; charset="utf-8" From: Ani Sinha Pull in the following changes from lcitool: * tests/lcitool/libvirt-ci 85487e1...c8971e9 (18): > mappings: add new package mappings for mformat and xorriso > docs: testing: Update contents with tox > .gitlab-ci.yml: Always test against installed lcitool > gitlab-ci.yml: Start using tox for testing > tox: Allow running with custom pytest options with {posargs} > gitignore: Add the default .tox directory > dev-requirements: Reference VM requirements > requirements: Add tox to dev-requirements.txt and drop pytest and flake > test-requirements: Rename to dev-requirements.txt > Add tox.ini configuration file > tests: commands: Consolidate the installed package/run from git tests > Add a pytest.ini > facts: targets: Drop Fedora 36 target > gitlab-ci.yml: Add Fedora 38 target > facts: targets: Add Fedora 38 > facts: mappings: Drop 'zstd' mapping > facts: projects: nbdkit: Replace zstd mapping with libzstd > docs: mappings: Add a section on the preferred mapping naming scheme Signed-off-by: Ani Sinha Message-Id: <20230504154611.85854-2-anisinha@redhat.com> Reviewed-by: Thomas Huth Reviewed-by: Michael S. Tsirkin Signed-off-by: Thomas Huth --- tests/lcitool/libvirt-ci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci index 85487e1404..c8971e90ac 160000 --- a/tests/lcitool/libvirt-ci +++ b/tests/lcitool/libvirt-ci @@ -1 +1 @@ -Subproject commit 85487e140415b2ac54b01a9a6b600fd7c21edc2f +Subproject commit c8971e90ac169ee2b539c747f74d96c876debdf9 --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684157661; cv=none; d=zohomail.com; s=zohoarc; b=IRwDkVtIenCqjNc/rULTDd7IOdQy5Jotk+JtCNguyQlqnej6Ckxaxx3OFZyK5+0dgwm21p22+8uIYQlakntX771gnzxsipNj3ROn/qTVxqRHvXGTsPSYmmSD8/7Qhy/Oilslt7G14WQm9mQ7vNiHzh9x83kpSPzGSxlNajHVRQU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684157661; h=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=upHoAtlJmXg/oCVzOrJe2a5fT4i9L00TrRm8zpjHZZc=; b=oDgiTl1BmajgjcSYkh/dl+nMYU6W0ffa18TRgSPNTfGdDehVvObwKYMPGAHE4uIYIOuH94R4Hv6URxerJqLWSs2wgKgAEG2ErqZyLz7LbZ6Plf6acxCwLCCoXCOo+d01i9eAs81skdDPnOkBQ7/74AG5Hj5UkDe1ZEPg9WPk1eU= 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 1684157661481451.3599496583565; Mon, 15 May 2023 06:34:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXrr-0005bv-1r; Mon, 15 May 2023 09:04: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 1pyXqr-0004U0-B7 for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02: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 1pyXqj-00010p-Qw for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:54 -0400 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-202-K8SP8DnCNp-WS3ig8s-87w-1; Mon, 15 May 2023 09:02:47 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5CA6A1C0ED13; Mon, 15 May 2023 13:02:47 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F6CE40C6EC4; Mon, 15 May 2023 13:02:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155769; 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=upHoAtlJmXg/oCVzOrJe2a5fT4i9L00TrRm8zpjHZZc=; b=Ju9zIGFRgtb42thTSnU52LCUDOTQukqDd6oegiXRniHIgTOafy5+8KT1y80a5R7hVv9CJY xVDMW2t1MFzNu8a9Rl3qVjBJ4vdPfe0/5BKXy411XfLWczYAyhwB2zSa+Lpz4r/r4Sb2bX CXzK3YA/hSzyfC8zm1YCsjBQmpgxaXQ= X-MC-Unique: K8SP8DnCNp-WS3ig8s-87w-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Ani Sinha , "Michael S . Tsirkin" Subject: [PULL 08/21] tests/lcitool: Add mtools and xorriso and remove genisoimage as dependencies Date: Mon, 15 May 2023 15:02:20 +0200 Message-Id: <20230515130233.418183-9-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684157662916100003 Content-Type: text/plain; charset="utf-8" From: Ani Sinha Bios bits avocado tests need mformat (provided by the mtools package) and xorriso tools in order to run within gitlab CI containers. Add those dependencies within the Dockerfiles so that containers can be built with those tools present and bios bits avocado tests can be run there. xorriso package conflicts with genisoimage package on some distributions. Therefore, it is not possible to have both the packages at the same time in the container image uniformly for all distribution flavors. Further, on some distributions like RHEL, both xorriso and genisoimage packages provide /usr/bin/genisoimage and on some other distributions like Fedora, only genisoimage package provides the same utility. Therefore, this change removes the dependency on geninsoimage for building container images altogether keeping only xorriso package. At the same time, cdrom-test.c is updated to use and check for existence of only xorrisofs. Signed-off-by: Ani Sinha Message-Id: <20230504154611.85854-3-anisinha@redhat.com> Reviewed-by: Thomas Huth Reviewed-by: Michael S. Tsirkin Signed-off-by: Thomas Huth --- tests/qtest/cdrom-test.c | 14 +++++++------- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- .gitlab-ci.d/cirrus/macos-12.vars | 2 +- tests/docker/dockerfiles/alpine.docker | 3 ++- tests/docker/dockerfiles/centos8.docker | 3 ++- tests/docker/dockerfiles/debian-amd64-cross.docker | 3 ++- tests/docker/dockerfiles/debian-amd64.docker | 3 ++- tests/docker/dockerfiles/debian-arm64-cross.docker | 3 ++- tests/docker/dockerfiles/debian-armel-cross.docker | 3 ++- tests/docker/dockerfiles/debian-armhf-cross.docker | 3 ++- .../dockerfiles/debian-mips64el-cross.docker | 3 ++- .../docker/dockerfiles/debian-mipsel-cross.docker | 3 ++- .../docker/dockerfiles/debian-ppc64el-cross.docker | 3 ++- tests/docker/dockerfiles/debian-s390x-cross.docker | 3 ++- tests/docker/dockerfiles/fedora-win32-cross.docker | 3 ++- tests/docker/dockerfiles/fedora-win64-cross.docker | 3 ++- tests/docker/dockerfiles/fedora.docker | 3 ++- tests/docker/dockerfiles/opensuse-leap.docker | 3 ++- tests/docker/dockerfiles/ubuntu2004.docker | 3 ++- tests/docker/dockerfiles/ubuntu2204.docker | 3 ++- tests/lcitool/projects/qemu.yml | 3 ++- 21 files changed, 45 insertions(+), 27 deletions(-) diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c index 31d3bacd8c..2b7e10d920 100644 --- a/tests/qtest/cdrom-test.c +++ b/tests/qtest/cdrom-test.c @@ -17,7 +17,7 @@ =20 static char isoimage[] =3D "cdrom-boot-iso-XXXXXX"; =20 -static int exec_genisoimg(const char **args) +static int exec_xorrisofs(const char **args) { gchar *out_err =3D NULL; gint exit_status =3D -1; @@ -43,7 +43,7 @@ static int prepare_image(const char *arch, char *isoimage) char *codefile =3D NULL; int ifh, ret =3D -1; const char *args[] =3D { - "genisoimage", "-quiet", "-l", "-no-emul-boot", + "xorrisofs", "-quiet", "-l", "-no-emul-boot", "-b", NULL, "-o", isoimage, srcdir, NULL }; =20 @@ -75,9 +75,9 @@ static int prepare_image(const char *arch, char *isoimage) } =20 args[5] =3D strchr(codefile, '/') + 1; - ret =3D exec_genisoimg(args); + ret =3D exec_xorrisofs(args); if (ret) { - fprintf(stderr, "genisoimage failed: %i\n", ret); + fprintf(stderr, "xorrisofs failed: %i\n", ret); } =20 unlink(codefile); @@ -211,12 +211,12 @@ int main(int argc, char **argv) { int ret; const char *arch =3D qtest_get_arch(); - const char *genisocheck[] =3D { "genisoimage", "-version", NULL }; + const char *xorrisocheck[] =3D { "xorrisofs", "-version", NULL }; =20 g_test_init(&argc, &argv, NULL); =20 - if (exec_genisoimg(genisocheck)) { - /* genisoimage not available - so can't run tests */ + if (exec_xorrisofs(xorrisocheck)) { + /* xorrisofs not available - so can't run tests */ return g_test_run(); } =20 diff --git a/.gitlab-ci.d/cirrus/freebsd-13.vars b/.gitlab-ci.d/cirrus/free= bsd-13.vars index 7622c849b2..facb649f5b 100644 --- a/.gitlab-ci.d/cirrus/freebsd-13.vars +++ b/.gitlab-ci.d/cirrus/freebsd-13.vars @@ -11,6 +11,6 @@ MAKE=3D'/usr/local/bin/gmake' NINJA=3D'/usr/local/bin/ninja' PACKAGING_COMMAND=3D'pkg' PIP3=3D'/usr/local/bin/pip-3.8' -PKGS=3D'alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-geni= soimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 g= ettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt lib= jpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson = ncurses nettle ninja opencv pixman pkgconf png py39-numpy py39-pillow py39-= pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_= image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vt= e3 zstd' +PKGS=3D'alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cmocka ctag= s curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gma= ke gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs l= ibslirp libspice-server libssh libtasn1 llvm lzo2 meson mtools ncurses nett= le ninja opencv pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sph= inx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy= sndio socat spice-protocol tesseract usbredir virglrenderer vte3 xorriso z= std' PYPI_PKGS=3D'' PYTHON=3D'/usr/local/bin/python3' diff --git a/.gitlab-ci.d/cirrus/macos-12.vars b/.gitlab-ci.d/cirrus/macos-= 12.vars index da6aa6469b..ceb294e153 100644 --- a/.gitlab-ci.d/cirrus/macos-12.vars +++ b/.gitlab-ci.d/cirrus/macos-12.vars @@ -11,6 +11,6 @@ MAKE=3D'/opt/homebrew/bin/gmake' NINJA=3D'/opt/homebrew/bin/ninja' PACKAGING_COMMAND=3D'brew' PIP3=3D'/opt/homebrew/bin/pip3' -PKGS=3D'bash bc bison bzip2 capstone ccache cmocka ctags curl dbus diffuti= ls dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo= json-c libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh li= btasn1 libusb llvm lzo make meson ncurses nettle ninja pixman pkg-config py= thon3 rpm2cpio sdl2 sdl2_image snappy socat sparse spice-protocol tesseract= usbredir vde vte3 zlib zstd' +PKGS=3D'bash bc bison bzip2 capstone ccache cmocka ctags curl dbus diffuti= ls dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo= json-c libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh li= btasn1 libusb llvm lzo make meson mtools ncurses nettle ninja pixman pkg-co= nfig python3 rpm2cpio sdl2 sdl2_image snappy socat sparse spice-protocol te= sseract usbredir vde vte3 xorriso zlib zstd' PYPI_PKGS=3D'PyYAML numpy pillow sphinx sphinx-rtd-theme' PYTHON=3D'/opt/homebrew/bin/python3' diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfi= les/alpine.docker index 81c70aeaf9..0097637dca 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -19,7 +19,6 @@ RUN apk update && \ ca-certificates \ capstone-dev \ ccache \ - cdrkit \ ceph-dev \ clang \ cmocka-dev \ @@ -67,6 +66,7 @@ RUN apk update && \ make \ mesa-dev \ meson \ + mtools \ multipath-tools \ musl-dev \ ncurses-dev \ @@ -108,6 +108,7 @@ RUN apk update && \ which \ xen-dev \ xfsprogs-dev \ + xorriso \ zlib-dev \ zlib-static \ zstd \ diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerf= iles/centos8.docker index 1a6a9087c1..78f454b782 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -36,7 +36,6 @@ RUN dnf distro-sync -y && \ fuse3-devel \ gcc \ gcc-c++ \ - genisoimage \ gettext \ git \ glib2-devel \ @@ -82,6 +81,7 @@ RUN dnf distro-sync -y && \ lzo-devel \ make \ mesa-libgbm-devel \ + mtools \ ncurses-devel \ nettle-devel \ ninja-build \ @@ -114,6 +114,7 @@ RUN dnf distro-sync -y && \ vte291-devel \ which \ xfsprogs-devel \ + xorriso \ zlib-devel \ zlib-static \ zstd && \ diff --git a/tests/docker/dockerfiles/debian-amd64-cross.docker b/tests/doc= ker/dockerfiles/debian-amd64-cross.docker index 2e7eb445f1..40a2b6acc4 100644 --- a/tests/docker/dockerfiles/debian-amd64-cross.docker +++ b/tests/docker/dockerfiles/debian-amd64-cross.docker @@ -25,7 +25,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ findutils \ flex \ gcovr \ - genisoimage \ gettext \ git \ hostname \ @@ -37,6 +36,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ locales \ make \ meson \ + mtools \ ncat \ ninja-build \ openssh-client \ @@ -57,6 +57,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ tar \ tesseract-ocr \ tesseract-ocr-eng \ + xorriso \ zstd && \ eatmydata apt-get autoremove -y && \ eatmydata apt-get autoclean -y && \ diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/do= ckerfiles/debian-amd64.docker index 28e2fa81b1..e39871c7bb 100644 --- a/tests/docker/dockerfiles/debian-amd64.docker +++ b/tests/docker/dockerfiles/debian-amd64.docker @@ -28,7 +28,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ g++ \ gcc \ gcovr \ - genisoimage \ gettext \ git \ hostname \ @@ -103,6 +102,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ locales \ make \ meson \ + mtools \ multipath-tools \ ncat \ nettle-dev \ @@ -127,6 +127,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ tesseract-ocr \ tesseract-ocr-eng \ xfslibs-dev \ + xorriso \ zlib1g-dev \ zstd && \ eatmydata apt-get autoremove -y && \ diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/doc= ker/dockerfiles/debian-arm64-cross.docker index f558770f84..c99300bbfa 100644 --- a/tests/docker/dockerfiles/debian-arm64-cross.docker +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker @@ -25,7 +25,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ findutils \ flex \ gcovr \ - genisoimage \ gettext \ git \ hostname \ @@ -37,6 +36,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ locales \ make \ meson \ + mtools \ ncat \ ninja-build \ openssh-client \ @@ -57,6 +57,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ tar \ tesseract-ocr \ tesseract-ocr-eng \ + xorriso \ zstd && \ eatmydata apt-get autoremove -y && \ eatmydata apt-get autoclean -y && \ diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/doc= ker/dockerfiles/debian-armel-cross.docker index f3d7e07cce..5db5c78b31 100644 --- a/tests/docker/dockerfiles/debian-armel-cross.docker +++ b/tests/docker/dockerfiles/debian-armel-cross.docker @@ -25,7 +25,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ findutils \ flex \ gcovr \ - genisoimage \ gettext \ git \ hostname \ @@ -37,6 +36,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ locales \ make \ meson \ + mtools \ ncat \ ninja-build \ openssh-client \ @@ -57,6 +57,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ tar \ tesseract-ocr \ tesseract-ocr-eng \ + xorriso \ zstd && \ eatmydata apt-get autoremove -y && \ eatmydata apt-get autoclean -y && \ diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/doc= ker/dockerfiles/debian-armhf-cross.docker index 531c556ad5..ae6600b25f 100644 --- a/tests/docker/dockerfiles/debian-armhf-cross.docker +++ b/tests/docker/dockerfiles/debian-armhf-cross.docker @@ -25,7 +25,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ findutils \ flex \ gcovr \ - genisoimage \ gettext \ git \ hostname \ @@ -37,6 +36,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ locales \ make \ meson \ + mtools \ ncat \ ninja-build \ openssh-client \ @@ -57,6 +57,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ tar \ tesseract-ocr \ tesseract-ocr-eng \ + xorriso \ zstd && \ eatmydata apt-get autoremove -y && \ eatmydata apt-get autoclean -y && \ diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/= docker/dockerfiles/debian-mips64el-cross.docker index 816dbd2911..daa2d48e36 100644 --- a/tests/docker/dockerfiles/debian-mips64el-cross.docker +++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker @@ -25,7 +25,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ findutils \ flex \ gcovr \ - genisoimage \ gettext \ git \ hostname \ @@ -37,6 +36,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ locales \ make \ meson \ + mtools \ ncat \ ninja-build \ openssh-client \ @@ -57,6 +57,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ tar \ tesseract-ocr \ tesseract-ocr-eng \ + xorriso \ zstd && \ eatmydata apt-get autoremove -y && \ eatmydata apt-get autoclean -y && \ diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/do= cker/dockerfiles/debian-mipsel-cross.docker index b115b29af3..5af04e2054 100644 --- a/tests/docker/dockerfiles/debian-mipsel-cross.docker +++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker @@ -25,7 +25,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ findutils \ flex \ gcovr \ - genisoimage \ gettext \ git \ hostname \ @@ -37,6 +36,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ locales \ make \ meson \ + mtools \ ncat \ ninja-build \ openssh-client \ @@ -57,6 +57,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ tar \ tesseract-ocr \ tesseract-ocr-eng \ + xorriso \ zstd && \ eatmydata apt-get autoremove -y && \ eatmydata apt-get autoclean -y && \ diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/d= ocker/dockerfiles/debian-ppc64el-cross.docker index 301bddb536..1eeba7fcab 100644 --- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker +++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker @@ -25,7 +25,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ findutils \ flex \ gcovr \ - genisoimage \ gettext \ git \ hostname \ @@ -37,6 +36,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ locales \ make \ meson \ + mtools \ ncat \ ninja-build \ openssh-client \ @@ -57,6 +57,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ tar \ tesseract-ocr \ tesseract-ocr-eng \ + xorriso \ zstd && \ eatmydata apt-get autoremove -y && \ eatmydata apt-get autoclean -y && \ diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/doc= ker/dockerfiles/debian-s390x-cross.docker index 5d27c91c17..52e89a6dab 100644 --- a/tests/docker/dockerfiles/debian-s390x-cross.docker +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker @@ -25,7 +25,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ findutils \ flex \ gcovr \ - genisoimage \ gettext \ git \ hostname \ @@ -37,6 +36,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ locales \ make \ meson \ + mtools \ ncat \ ninja-build \ openssh-client \ @@ -57,6 +57,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ tar \ tesseract-ocr \ tesseract-ocr-eng \ + xorriso \ zstd && \ eatmydata apt-get autoremove -y && \ eatmydata apt-get autoclean -y && \ diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/doc= ker/dockerfiles/fedora-win32-cross.docker index e7966ec7fd..dc72ae9cc9 100644 --- a/tests/docker/dockerfiles/fedora-win32-cross.docker +++ b/tests/docker/dockerfiles/fedora-win32-cross.docker @@ -30,7 +30,6 @@ exec "$@"\n' > /usr/bin/nosync && \ findutils \ flex \ gcovr \ - genisoimage \ git \ glib2-devel \ glibc-langpack-en \ @@ -38,6 +37,7 @@ exec "$@"\n' > /usr/bin/nosync && \ llvm \ make \ meson \ + mtools \ ninja-build \ nmap-ncat \ openssh-clients \ @@ -59,6 +59,7 @@ exec "$@"\n' > /usr/bin/nosync && \ tesseract-langpack-eng \ util-linux \ which \ + xorriso \ zstd && \ nosync dnf autoremove -y && \ nosync dnf clean all -y diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/doc= ker/dockerfiles/fedora-win64-cross.docker index 86c3a8f2ac..7eb4a5dba2 100644 --- a/tests/docker/dockerfiles/fedora-win64-cross.docker +++ b/tests/docker/dockerfiles/fedora-win64-cross.docker @@ -30,7 +30,6 @@ exec "$@"\n' > /usr/bin/nosync && \ findutils \ flex \ gcovr \ - genisoimage \ git \ glib2-devel \ glibc-langpack-en \ @@ -38,6 +37,7 @@ exec "$@"\n' > /usr/bin/nosync && \ llvm \ make \ meson \ + mtools \ ninja-build \ nmap-ncat \ openssh-clients \ @@ -59,6 +59,7 @@ exec "$@"\n' > /usr/bin/nosync && \ tesseract-langpack-eng \ util-linux \ which \ + xorriso \ zstd && \ nosync dnf autoremove -y && \ nosync dnf clean all -y diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfi= les/fedora.docker index b698b7595d..3a69eefdda 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -43,7 +43,6 @@ exec "$@"\n' > /usr/bin/nosync && \ gcc \ gcc-c++ \ gcovr \ - genisoimage \ gettext \ git \ glib2-devel \ @@ -90,6 +89,7 @@ exec "$@"\n' > /usr/bin/nosync && \ make \ mesa-libgbm-devel \ meson \ + mtools \ ncurses-devel \ nettle-devel \ ninja-build \ @@ -128,6 +128,7 @@ exec "$@"\n' > /usr/bin/nosync && \ which \ xen-devel \ xfsprogs-devel \ + xorriso \ zlib-devel \ zlib-static \ zstd && \ diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/d= ockerfiles/opensuse-leap.docker index afb9f5419f..185abe57d8 100644 --- a/tests/docker/dockerfiles/opensuse-leap.docker +++ b/tests/docker/dockerfiles/opensuse-leap.docker @@ -81,7 +81,7 @@ RUN zypper update -y && \ lttng-ust-devel \ lzo-devel \ make \ - mkisofs \ + mtools \ ncat \ ncurses-devel \ ninja \ @@ -111,6 +111,7 @@ RUN zypper update -y && \ which \ xen-devel \ xfsprogs-devel \ + xorriso \ zlib-devel \ zlib-devel-static \ zstd && \ diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dock= erfiles/ubuntu2004.docker index aa2f5ca7b4..8f864d19e6 100644 --- a/tests/docker/dockerfiles/ubuntu2004.docker +++ b/tests/docker/dockerfiles/ubuntu2004.docker @@ -28,7 +28,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ g++ \ gcc \ gcovr \ - genisoimage \ gettext \ git \ hostname \ @@ -100,6 +99,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ llvm \ locales \ make \ + mtools \ multipath-tools \ ncat \ nettle-dev \ @@ -126,6 +126,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ tesseract-ocr \ tesseract-ocr-eng \ xfslibs-dev \ + xorriso \ zlib1g-dev \ zstd && \ eatmydata apt-get autoremove -y && \ diff --git a/tests/docker/dockerfiles/ubuntu2204.docker b/tests/docker/dock= erfiles/ubuntu2204.docker index 3f7d30e5d0..1d442cdfe6 100644 --- a/tests/docker/dockerfiles/ubuntu2204.docker +++ b/tests/docker/dockerfiles/ubuntu2204.docker @@ -28,7 +28,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ g++ \ gcc \ gcovr \ - genisoimage \ gettext \ git \ hostname \ @@ -103,6 +102,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ locales \ make \ meson \ + mtools \ multipath-tools \ ncat \ nettle-dev \ @@ -127,6 +127,7 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ tesseract-ocr \ tesseract-ocr-eng \ xfslibs-dev \ + xorriso \ zlib1g-dev \ zstd && \ eatmydata apt-get autoremove -y && \ diff --git a/tests/lcitool/projects/qemu.yml b/tests/lcitool/projects/qemu.= yml index af3700379a..566db8313b 100644 --- a/tests/lcitool/projects/qemu.yml +++ b/tests/lcitool/projects/qemu.yml @@ -26,7 +26,6 @@ packages: - gcc - gcovr - gettext - - genisoimage - glib2 - glib2-native - glib2-static @@ -73,6 +72,7 @@ packages: - llvm - lttng-ust - lzo + - mtools - netcat - nettle - ninja @@ -116,6 +116,7 @@ packages: - which - xen - xfsprogs + - xorriso - zstdtools - zlib - zlib-static --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684157507; cv=none; d=zohomail.com; s=zohoarc; b=eNW7FzrvI/mo3foyVT6I7lqBpDlb9eGhfpu8JnYnobZXvcU0LpzPkmyc/KTickIkHKQ9lIKUAwo0D+MAszlPAOD4dKzOy6sMBNQP3o62LqvPsnP5rCVZJHrEtSThOXmKsXE1U1AP8CV4Sinh45ZFS0X4DSo52I3CMEG6W9xxB+Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684157507; h=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=/4X6MK/S7xN5LnUoBNIy7QnZbS2togEUduLC8ZtGGhY=; b=e/0cQTs8aM0iejfQp+KmS+FIwmjfQZkiODvtbZxld9ZAGrRZ4Ae1Hz43KZ03Qhlv11Zc5RNKPVGRgFWSql00DJYSE+AYhNIWiFYMN2A2p1DTuNchC2d3v5f6Y2XLE8ReiYNEjWf3ouE5NahTpd4b2evgxIoTW4IJEGmcx3PPlYM= 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 1684157507149458.64191099241975; Mon, 15 May 2023 06:31:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsG-0006n0-Qv; Mon, 15 May 2023 09:04: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 1pyXqw-0004Yu-Ov for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:08 -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 1pyXqt-00012g-2p for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:02 -0400 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-587-J0jsRpNVPy-T0F4FJ6SOiA-1; Mon, 15 May 2023 09:02:56 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 86C0E891771; Mon, 15 May 2023 13:02:48 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id A17E840C6EC4; Mon, 15 May 2023 13:02:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155778; 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=/4X6MK/S7xN5LnUoBNIy7QnZbS2togEUduLC8ZtGGhY=; b=bCK8hrPdNFSsXW5ojV9w98s99wdXX6PDaA/V4phHAxmsG3vogVIFFNEdDQDms8jdkp4Z/J 8kR/p5JcYQ++Kse2dsHFytfJKwDMWo/zQr0I5Z76zXQwqj2QJZJp5yuCGEm5Q/tLZCbx6i S/3j0T5U0om4uPjuFR0Wk8fTbWE8KIE= X-MC-Unique: J0jsRpNVPy-T0F4FJ6SOiA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Claudio Imbrenda , Boris Fiuczynski Subject: [PULL 09/21] util/async-teardown: wire up query-command-line-options Date: Mon, 15 May 2023 15:02:21 +0200 Message-Id: <20230515130233.418183-10-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684157508035100007 Content-Type: text/plain; charset="utf-8" From: Claudio Imbrenda Add new -run-with option with an async-teardown=3Don|off parameter. It is visible in the output of query-command-line-options QMP command, so it can be discovered and used by libvirt. The option -async-teardown is now redundant, deprecate it. Reported-by: Boris Fiuczynski Fixes: c891c24b1a ("os-posix: asynchronous teardown for shutdown on Linux") Signed-off-by: Claudio Imbrenda Message-Id: <20230505120051.36605-2-imbrenda@linux.ibm.com> [thuth: Add curly braces to fix error with GCC 8.5, fix bug in deprecated.r= st] Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 5 +++++ os-posix.c | 14 ++++++++++++++ util/async-teardown.c | 21 +++++++++++++++++++++ qemu-options.hx | 34 +++++++++++++++++++++++----------- 4 files changed, 63 insertions(+), 11 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 4c7f08803e..7bb4d2f4f6 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -111,6 +111,11 @@ Use ``-machine acpi=3Doff`` instead. The HAXM project has been retired (see https://github.com/intel/haxm#statu= s). Use "whpx" (on Windows) or "hvf" (on macOS) instead. =20 +``-async-teardown`` (since 8.1) +''''''''''''''''''''''''''''''' + +Use ``-run-with async-teardown=3Don`` instead. + ``-singlestep`` (since 8.1) ''''''''''''''''''''''''''' =20 diff --git a/os-posix.c b/os-posix.c index 5adc69f560..90ea71725f 100644 --- a/os-posix.c +++ b/os-posix.c @@ -36,6 +36,8 @@ #include "qemu/log.h" #include "sysemu/runstate.h" #include "qemu/cutils.h" +#include "qemu/config-file.h" +#include "qemu/option.h" =20 #ifdef CONFIG_LINUX #include @@ -152,9 +154,21 @@ int os_parse_cmd_args(int index, const char *optarg) daemonize =3D 1; break; #if defined(CONFIG_LINUX) + /* deprecated */ case QEMU_OPTION_asyncteardown: init_async_teardown(); break; + case QEMU_OPTION_run_with: { + QemuOpts *opts =3D qemu_opts_parse_noisily(qemu_find_opts("run-wit= h"), + optarg, false); + if (!opts) { + exit(1); + } + if (qemu_opt_get_bool(opts, "async-teardown", false)) { + init_async_teardown(); + } + break; + } #endif default: return -1; diff --git a/util/async-teardown.c b/util/async-teardown.c index 62cdeb0f20..3ab19c8740 100644 --- a/util/async-teardown.c +++ b/util/async-teardown.c @@ -12,6 +12,9 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/config-file.h" +#include "qemu/option.h" +#include "qemu/module.h" #include #include #include @@ -144,3 +147,21 @@ void init_async_teardown(void) clone(async_teardown_fn, new_stack_for_clone(), CLONE_VM, NULL); sigprocmask(SIG_SETMASK, &old_signals, NULL); } + +static QemuOptsList qemu_run_with_opts =3D { + .name =3D "run-with", + .head =3D QTAILQ_HEAD_INITIALIZER(qemu_run_with_opts.head), + .desc =3D { + { + .name =3D "async-teardown", + .type =3D QEMU_OPT_BOOL, + }, + { /* end of list */ } + }, +}; + +static void register_teardown(void) +{ + qemu_add_opts(&qemu_run_with_opts); +} +opts_init(register_teardown); diff --git a/qemu-options.hx b/qemu-options.hx index 42b9094c10..30690d9c3f 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4828,20 +4828,32 @@ DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log, ""= , QEMU_ARCH_ALL) DEF("async-teardown", 0, QEMU_OPTION_asyncteardown, "-async-teardown enable asynchronous teardown\n", QEMU_ARCH_ALL) -#endif SRST ``-async-teardown`` - Enable asynchronous teardown. A new process called "cleanup/" - will be created at startup sharing the address space with the main qemu - process, using clone. It will wait for the main qemu process to - terminate completely, and then exit. - This allows qemu to terminate very quickly even if the guest was - huge, leaving the teardown of the address space to the cleanup - process. Since the cleanup process shares the same cgroups as the - main qemu process, accounting is performed correctly. This only - works if the cleanup process is not forcefully killed with SIGKILL - before the main qemu process has terminated completely. + This option is deprecated and should no longer be used. The new option + ``-run-with async-teardown=3Don`` is a replacement. ERST +DEF("run-with", HAS_ARG, QEMU_OPTION_run_with, + "-run-with async-teardown[=3Don|off]\n" + " misc QEMU process lifecycle options\n" + " async-teardown=3Don enables asynchronous teardown\n", + QEMU_ARCH_ALL) +SRST +``-run-with`` + Set QEMU process lifecycle options. + + ``async-teardown=3Don`` enables asynchronous teardown. A new process c= alled + "cleanup/" will be created at startup sharing the address + space with the main QEMU process, using clone. It will wait for the + main QEMU process to terminate completely, and then exit. This allows + QEMU to terminate very quickly even if the guest was huge, leaving the + teardown of the address space to the cleanup process. Since the cleanup + process shares the same cgroups as the main QEMU process, accounting is + performed correctly. This only works if the cleanup process is not + forcefully killed with SIGKILL before the main QEMU process has + terminated completely. +ERST +#endif =20 DEF("msg", HAS_ARG, QEMU_OPTION_msg, "-msg [timestamp[=3Don|off]][,guest-name=3D[on|off]]\n" --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684158145; cv=none; d=zohomail.com; s=zohoarc; b=j1dnlWYxXOLtQugMr/oUmMlqwgIEhA4ZOK++WYe1e0vMO4ho/1inf+ZIaZRvVCeRjxsjNRUP3AYi7iwyVT5eoyvFIYe//rSa10CseyeBoyFeiMdCjf4ZakA4Dg1sieWeXTm9fFaqdaWZ4edPZAbWI7MmY6fRD4JCnuK/xXw5wXg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684158145; h=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=DcGOPgvDpC4yHjaBKQybaAT3zpZnR7tkj4ipkbPf6Oo=; b=SciIh2T9zv0bw/IOWRHk+CYsVM7DVSqZrLOEnzXGm3xFIGne7UpKiYVyaJfQ39HVFU34MqXholLj7LrcEFm8VXPdgaRQ7fZVnhXCwpwRJUyhzoIWX1rx0h88p5/8Ib91unSUtE7gP5mYoGpBO2KAnCKWyDr05kf2cSgK87ihoa0= 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 1684158145505448.4665836646469; Mon, 15 May 2023 06:42:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsQ-0007ff-99; Mon, 15 May 2023 09:04: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 1pyXqw-0004Ym-Ef for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:03 -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 1pyXqt-00012b-41 for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:01 -0400 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-543-HjwjJ3paNFmVu7oLtzm98Q-1; Mon, 15 May 2023 09:02:54 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ABA723C21BA8; Mon, 15 May 2023 13:02:49 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id C82EF40C6EC4; Mon, 15 May 2023 13:02:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155777; 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=DcGOPgvDpC4yHjaBKQybaAT3zpZnR7tkj4ipkbPf6Oo=; b=c7JGxs03xSrvxrzkzU9cbXPjD2QqVB+2Vd6lxzqxZzhrs5Y2SXFif2HO5B01yik9zeaFcV Jz5b3PA5LUxYsxlJXY72faKWd7XVMGjAPxeabJl5ztCjihPQWSTEltGV5BmDSc8SC87vP4 ReDQ5r9939hphS9b+1t+2Savoagtkx4= X-MC-Unique: HjwjJ3paNFmVu7oLtzm98Q-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Claudio Imbrenda , Marc Hartmayer Subject: [PULL 10/21] s390x/pv: Fix spurious warning with asynchronous teardown Date: Mon, 15 May 2023 15:02:22 +0200 Message-Id: <20230515130233.418183-11-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684158145797100005 Content-Type: text/plain; charset="utf-8" From: Claudio Imbrenda Kernel commit 292a7d6fca33 ("KVM: s390: pv: fix asynchronous teardown for small VMs") causes the KVM_PV_ASYNC_CLEANUP_PREPARE ioctl to fail if the VM is not larger than 2GiB. QEMU would attempt it and fail, print an error message, and then proceed with a normal teardown. Avoid attempting to use asynchronous teardown altogether when the VM is not larger than 2 GiB. This will avoid triggering the error message and also avoid pointless overhead; normal teardown is fast enough for small VMs. Reported-by: Marc Hartmayer Fixes: c3a073c610 ("s390x/pv: Add support for asynchronous teardown for reb= oot") Link: https://lore.kernel.org/all/20230421085036.52511-2-imbrenda@linux.ibm= .com/ Signed-off-by: Claudio Imbrenda Message-Id: <20230510105531.30623-2-imbrenda@linux.ibm.com> Reviewed-by: Thomas Huth [thuth: Fix inline function parameter in pv.h] Signed-off-by: Thomas Huth --- include/hw/s390x/pv.h | 6 +++--- hw/s390x/pv.c | 10 ++++++++-- hw/s390x/s390-virtio-ccw.c | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/include/hw/s390x/pv.h b/include/hw/s390x/pv.h index 966306a9db..7b935e2246 100644 --- a/include/hw/s390x/pv.h +++ b/include/hw/s390x/pv.h @@ -14,10 +14,10 @@ =20 #include "qapi/error.h" #include "sysemu/kvm.h" +#include "hw/s390x/s390-virtio-ccw.h" =20 #ifdef CONFIG_KVM #include "cpu.h" -#include "hw/s390x/s390-virtio-ccw.h" =20 static inline bool s390_is_pv(void) { @@ -41,7 +41,7 @@ static inline bool s390_is_pv(void) int s390_pv_query_info(void); int s390_pv_vm_enable(void); void s390_pv_vm_disable(void); -bool s390_pv_vm_try_disable_async(void); +bool s390_pv_vm_try_disable_async(S390CcwMachineState *ms); int s390_pv_set_sec_parms(uint64_t origin, uint64_t length); int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tweak); void s390_pv_prep_reset(void); @@ -61,7 +61,7 @@ static inline bool s390_is_pv(void) { return false; } static inline int s390_pv_query_info(void) { return 0; } static inline int s390_pv_vm_enable(void) { return 0; } static inline void s390_pv_vm_disable(void) {} -static inline bool s390_pv_vm_try_disable_async(void) { return false; } +static inline bool s390_pv_vm_try_disable_async(S390CcwMachineState *ms) {= return false; } static inline int s390_pv_set_sec_parms(uint64_t origin, uint64_t length) = { return 0; } static inline int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tw= eak) { return 0; } static inline void s390_pv_prep_reset(void) {} diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c index 49ea38236c..b63f3784c6 100644 --- a/hw/s390x/pv.c +++ b/hw/s390x/pv.c @@ -13,6 +13,7 @@ =20 #include =20 +#include "qemu/units.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "sysemu/kvm.h" @@ -115,7 +116,7 @@ static void *s390_pv_do_unprot_async_fn(void *p) return NULL; } =20 -bool s390_pv_vm_try_disable_async(void) +bool s390_pv_vm_try_disable_async(S390CcwMachineState *ms) { /* * t is only needed to create the thread; once qemu_thread_create @@ -123,7 +124,12 @@ bool s390_pv_vm_try_disable_async(void) */ QemuThread t; =20 - if (!kvm_check_extension(kvm_state, KVM_CAP_S390_PROTECTED_ASYNC_DISAB= LE)) { + /* + * If the feature is not present or if the VM is not larger than 2 GiB, + * KVM_PV_ASYNC_CLEANUP_PREPARE fill fail; no point in attempting it. + */ + if ((MACHINE(ms)->maxram_size <=3D 2 * GiB) || + !kvm_check_extension(kvm_state, KVM_CAP_S390_PROTECTED_ASYNC_DISAB= LE)) { return false; } if (s390_pv_cmd(KVM_PV_ASYNC_CLEANUP_PREPARE, NULL) !=3D 0) { diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index e6f2c62625..2516b89b32 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -330,7 +330,7 @@ static inline void s390_do_cpu_ipl(CPUState *cs, run_on= _cpu_data arg) =20 static void s390_machine_unprotect(S390CcwMachineState *ms) { - if (!s390_pv_vm_try_disable_async()) { + if (!s390_pv_vm_try_disable_async(ms)) { s390_pv_vm_disable(); } ms->pv =3D false; --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684156716; cv=none; d=zohomail.com; s=zohoarc; b=LBICTDL80QgVxSB9vtedfRgiwbIKbrv0yN/lMPSfXhTeNWy7ULgIxJ5CCJ+3GKilIOALrZ2NGQ6Ufw8C4qRZBTfiZM9NLTaD5aPTPNtLiIl+rtgKfAHiAx6j56diM1TeMhIGDzkj1SHLLAdKzzy45amK+1s/zeA8mM7L1or8rUE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684156716; 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=QYjck406zo9v3Kd/ngDWxoFZjUnKC/yEYaY2SPtKMyI=; b=TKgSE/DRRqi69NcGtxKnlsqMP/YeTq8aBzUhykCaUcpj18Sgi6d5gvqT7s3KltyAbuxbTVQFIoOfltaL+lPo+YC55zyaGEJmdwAff10HuEcmGmZsPjHUt+l4o0izQzVTxWk86izTpPJoMBLYAVPQUqdNXLM59CHiZwikln2pjzc= 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 1684156716542719.9280725828745; Mon, 15 May 2023 06:18:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsN-0007Pq-D8; Mon, 15 May 2023 09:04: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 1pyXqt-0004Va-DI for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:01 -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 1pyXqq-00011z-14 for qemu-devel@nongnu.org; Mon, 15 May 2023 09:02:58 -0400 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-557-Q0_10uRqMiex3Jv8FkM94Q-1; Mon, 15 May 2023 09:02:51 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CB60081DB6C; Mon, 15 May 2023 13:02:50 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id ECC9240C6EC4; Mon, 15 May 2023 13:02:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155775; 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=QYjck406zo9v3Kd/ngDWxoFZjUnKC/yEYaY2SPtKMyI=; b=YPKnQttEfMyYnbmLGVEGpnRJ+/20qE/diBOqxPlTYWNa4KVJRF+IJ3ytVgUlgi1zLzH7IS 4TKenfJzeWT8TnBdutEhue3QuzIGHU+Ylmn+et4wrIl1hU1V/ZVDqp6e+zgQ6hJnBEdHyF l/+NCfwkXu5t3Tf73PRZ9Ynw6htO400= X-MC-Unique: Q0_10uRqMiex3Jv8FkM94Q-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Ani Sinha , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PULL 11/21] docs/devel: remind developers to run CI container pipeline when updating images Date: Mon, 15 May 2023 15:02:23 +0200 Message-Id: <20230515130233.418183-12-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-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.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684156717776100001 From: Ani Sinha When new dependencies and packages are added to containers, its important to run CI container generation pipelines on gitlab to make sure that there are= no obvious conflicts between packages that are being added and those that are already present. Running CI container pipelines will make sure that there a= re no such breakages before we commit the change updating the containers. Add a line in the documentation reminding developers to run the pipeline before submitting the change. It will also ease the life of the maintainers. Signed-off-by: Ani Sinha Reviewed-by: Daniel P. Berrang=C3=A9 Message-Id: <20230506072012.10350-1-anisinha@redhat.com> Signed-off-by: Thomas Huth --- docs/devel/testing.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 4071e72710..203facb417 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -479,6 +479,12 @@ first to contribute the mapping to the ``libvirt-ci`` = project: contains the ``mappings.yml`` update. Then add the prerequisite and run ``make lcitool-refresh``. =20 + * Please also trigger gitlab container generation pipelines on your change + for as many OS distros as practical to make sure that there are no + obvious breakages when adding the new pre-requisite. Please see + `CI `__ documentation + page on how to trigger gitlab CI pipelines on your change. + For enterprise distros that default to old, end-of-life versions of the Python runtime, QEMU uses a separate set of mappings that work with more recent versions. These can be found in ``tests/lcitool/mappings.yml``. --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684158187; cv=none; d=zohomail.com; s=zohoarc; b=f6pPPnwdQZQpz4ZiJ3YqCFqSEK8UXHaO+BFBu3dS5U75gh6hMusEp6FAdFA0kmAUEg9jvOXflhp/hGqC8+2Dk4UfzCxlkOXwLg79PLrsC0wNO1FsveXNMN7jjPFFX4EChIytb6BgniqP+lYeVU30igEmmTiZ+mL7dm7lXcYVwrs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684158187; 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=EQ1dlzoLYzmADvE2aRYeH424UJ3k+4Yp6TGYXeYiU+4=; b=Xe5FYwrVqqWHCR3sLn9UDYcuT0teTjToujr+6iD62zgul4Gg6UJt6tAmjEg0iXmxvhk9gdiQeA6wx2+ayxO3IROAziD8xyxsa3Rcqol7B3PnJgPbU1bDm5mIU1MXLaKQql540ctURe1DhwrMrIX9xX8u3NU+fCKsSzuzU/sq2PQ= 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 16841581877991023.264601915784; Mon, 15 May 2023 06:43:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsP-0007b4-51; Mon, 15 May 2023 09:04:33 -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 1pyXr5-0004h4-HS for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:11 -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 1pyXqv-00013p-7L for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:05 -0400 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-515-mz86HiTEOZi8z-QJmAG2mg-1; Mon, 15 May 2023 09:02:56 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EFDE2385556E; Mon, 15 May 2023 13:02:51 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 18CF24078906; Mon, 15 May 2023 13:02:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155779; 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=EQ1dlzoLYzmADvE2aRYeH424UJ3k+4Yp6TGYXeYiU+4=; b=Hr0WqK2yVJUoll94nU/mHxFPEsvw3oX35oQFsKAbjDNnocDQPmMHN72+lgBQRtnltLxp8/ ieai5F/1JFQrJKrkqOfeYRMl7U1XkEE2N2BghNit2slxTJzjqn1FAJoHsFuq2SMLWJwjkF +OkA0/hyd5ySOCMUa3g6eissAHX2aKI= X-MC-Unique: mz86HiTEOZi8z-QJmAG2mg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Lizhi Yang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 12/21] docs/about/emulation: fix typo Date: Mon, 15 May 2023 15:02:24 +0200 Message-Id: <20230515130233.418183-13-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-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.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684158189955100003 From: Lizhi Yang Duplicated word "are". Signed-off-by: Lizhi Yang Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230511080119.99018-1-sledgeh4w@gmail.com> Signed-off-by: Thomas Huth --- docs/about/emulation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/about/emulation.rst b/docs/about/emulation.rst index b510a54418..0ad0b86f0d 100644 --- a/docs/about/emulation.rst +++ b/docs/about/emulation.rst @@ -99,7 +99,7 @@ depending on the guest architecture. - Yes - A configurable 32 bit soft core now owned by Cadence =20 -A number of features are are only available when running under +A number of features are only available when running under emulation including :ref:`Record/Replay` and :ref:`TCG Plugins`. =20 .. _Semihosting: --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684157686; cv=none; d=zohomail.com; s=zohoarc; b=UecsOlKT+ib0sqnxDU5oS2Tjxdi/UOpSmOCx2TBCkTYKnPw8CvM7L7ORgUxB2muDKEfJniY+nJ3MBhUaEhzF9HzZwhycVnZ2r/sBg0PLvNi9HJs3xUrnrP8mAMyskx8fWJ4s0qLzI3AuW6J1ffHAPnumU/n+1gbg8AVP8TWaSdg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684157686; h=Content-Transfer-Encoding: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=Qkq5D45uI365p6GB8vYO3k8fs8WzQsWQgwuB8D+tAvM=; b=FEnaN9QToPQjjhqUjmnJViaAbPRhKw0ByEbE/nGQMacjbE2up99cyG+pdK1n1bmyFbp7GBAF4RtIe4tJCbmBLaTQlzq5XXQwBLMwKMQbmsoGEB3In1MXRG1XhJcsTdxEk13SIgVEAqB5swr7BV1YIbHd/3Q75l1gux74PtcPS8k= 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 1684157686413642.6417199964152; Mon, 15 May 2023 06:34:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsM-0007Ft-ND; Mon, 15 May 2023 09:04:30 -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 1pyXqw-0004Yn-FO for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:03 -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 1pyXqr-000125-45 for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:00 -0400 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-567-YbEJo7XcOiesw5edNT5yOg-1; Mon, 15 May 2023 09:02:53 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CD3F4299E760; Mon, 15 May 2023 13:02:52 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3FA0840C6EC4; Mon, 15 May 2023 13:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155775; 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=Qkq5D45uI365p6GB8vYO3k8fs8WzQsWQgwuB8D+tAvM=; b=SXEv9BTbS7/k08bnAPYuhxBp60eoq0QlipUsJ+sCfNL4te5IeYReqDthIHJmw0oI7wF6Ou nnqozpqlaOCQ7OTsVCTvMJnWnO+4tN9QmlxDMLi+IE1cVKjKpTVy9nRakdgZEQC3oNSU5Q lRg4qH5DCgQL6q7eAm/4dqIJLgTUvjA= X-MC-Unique: YbEJo7XcOiesw5edNT5yOg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Subject: [PULL 13/21] hw/core: Use a callback for target specific query-cpus-fast information Date: Mon, 15 May 2023 15:02:25 +0200 Message-Id: <20230515130233.418183-14-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684157687208100001 Content-Type: text/plain; charset="utf-8" For being able to create a universal QEMU binary one day, core files like machine-qmp-cmds.c must not contain any "#ifdef TARGET_..." parts. Thus let's provide the target specific function via a function pointer in CPUClass instead, as a first step towards making this file target independent. Message-Id: <20230424160434.331175-2-thuth@redhat.com> Signed-off-by: Thomas Huth --- include/hw/core/cpu.h | 4 ++++ include/qemu/typedefs.h | 1 + hw/core/machine-qmp-cmds.c | 16 ++-------------- target/s390x/cpu.c | 8 ++++++++ 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 397fd3ac68..5a019a27bc 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -106,6 +106,9 @@ struct SysemuCPUOps; * @has_work: Callback for checking if there is work to do. * @memory_rw_debug: Callback for GDB memory access. * @dump_state: Callback for dumping state. + * @query_cpu_fast: + * Fill in target specific information for the "query-cpus-fast" + * QAPI call. * @get_arch_id: Callback for getting architecture-dependent CPU ID. * @set_pc: Callback for setting the Program Counter register. This * should have the semantics used by the target architecture when @@ -151,6 +154,7 @@ struct CPUClass { int (*memory_rw_debug)(CPUState *cpu, vaddr addr, uint8_t *buf, int len, bool is_write); void (*dump_state)(CPUState *cpu, FILE *, int flags); + void (*query_cpu_fast)(CPUState *cpu, CpuInfoFast *value); int64_t (*get_arch_id)(CPUState *cpu); void (*set_pc)(CPUState *cpu, vaddr value); vaddr (*get_pc)(CPUState *cpu); diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index df4b55ac65..8e9ef252f5 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -41,6 +41,7 @@ typedef struct CompatProperty CompatProperty; typedef struct ConfidentialGuestSupport ConfidentialGuestSupport; typedef struct CPUAddressSpace CPUAddressSpace; typedef struct CPUArchState CPUArchState; +typedef struct CpuInfoFast CpuInfoFast; typedef struct CPUJumpCache CPUJumpCache; typedef struct CPUState CPUState; typedef struct CPUTLBEntryFull CPUTLBEntryFull; diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index b98ff15089..c158c02aa3 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -28,18 +28,6 @@ #include "sysemu/runstate.h" #include "sysemu/sysemu.h" =20 -static void cpustate_to_cpuinfo_s390(CpuInfoS390 *info, const CPUState *cp= u) -{ -#ifdef TARGET_S390X - S390CPU *s390_cpu =3D S390_CPU(cpu); - CPUS390XState *env =3D &s390_cpu->env; - - info->cpu_state =3D env->cpu_state; -#else - abort(); -#endif -} - /* * fast means: we NEVER interrupt vCPU threads to retrieve * information from KVM. @@ -68,8 +56,8 @@ CpuInfoFastList *qmp_query_cpus_fast(Error **errp) } =20 value->target =3D target; - if (target =3D=3D SYS_EMU_TARGET_S390X) { - cpustate_to_cpuinfo_s390(&value->u.s390x, cpu); + if (cpu->cc->query_cpu_fast) { + cpu->cc->query_cpu_fast(cpu, value); } =20 QAPI_LIST_APPEND(tail, value); diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 40fdeaa905..df167493c3 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -140,6 +140,13 @@ static bool s390_cpu_has_work(CPUState *cs) return s390_cpu_has_int(cpu); } =20 +static void s390_query_cpu_fast(CPUState *cpu, CpuInfoFast *value) +{ + S390CPU *s390_cpu =3D S390_CPU(cpu); + + value->u.s390x.cpu_state =3D s390_cpu->env.cpu_state; +} + /* S390CPUClass::reset() */ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) { @@ -332,6 +339,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *= data) cc->class_by_name =3D s390_cpu_class_by_name, cc->has_work =3D s390_cpu_has_work; cc->dump_state =3D s390_cpu_dump_state; + cc->query_cpu_fast =3D s390_query_cpu_fast; cc->set_pc =3D s390_cpu_set_pc; cc->get_pc =3D s390_cpu_get_pc; cc->gdb_read_register =3D s390_cpu_gdb_read_register; --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684158170; cv=none; d=zohomail.com; s=zohoarc; b=mAuqY/gC2hBP77uCUv02wazLoHylDi+ewvqpNyWLhVKePh/AnKFtjuNs5RtI0xcRjl2x8h0W3CXERv8/NmkNLSxrNwUPx4XAwfg35zzl5hnfPtGizJ+37Hwjx4Hut2ziWofne/vnFZ0iLbawB0tZ+ED+mRJ9VzqPyIhd+8YPEUI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684158170; h=Content-Transfer-Encoding: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=DsGeqnNGGFbz42e5zqzoTe/p6MpCyGTyP1W7g8v7Qtc=; b=LiyzcM5+KEDvuSSr80OwhlB5yjgqmzzjXDYjlWJp5N25z7+2cA1jP/LsIbVLOhXBp8ZygDqfOzqJN/BuGGHCgLk2EEZmTRdia4YEbBbHHMy25UqegdfHhFJ4KFJg2s1XOzWyZKQJ7ToDxznnsqF1m1BVQKckroMf4qeUMSrPwjo= 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 1684158170454873.5276544051125; Mon, 15 May 2023 06:42:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXrv-0005sr-9I; Mon, 15 May 2023 09:04:03 -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 1pyXqx-0004ZL-2F for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:10 -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 1pyXqt-00012z-4l for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:02 -0400 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-653-XNhpJrWDPJ2n3IxAaUE7Zg-1; Mon, 15 May 2023 09:02:56 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AFE2A3C21BA0; Mon, 15 May 2023 13:02:53 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B5F740C6EC4; Mon, 15 May 2023 13:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155778; 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=DsGeqnNGGFbz42e5zqzoTe/p6MpCyGTyP1W7g8v7Qtc=; b=QqoKFNlXZPaUODBlrY8asJqPVXHxKRsvTLrpW81h6EDWbevL2vj+Vvd13wTeCBxzrIrPV1 eaT+Ky7w38u+Fos5ODdeEoxuszm+fNmQ8fAAuZloWEatnpaOizK30kQERSKssHYCz66CYq 7MAXqtMWWlp52ocTSi3bZHQhDIEqW3k= X-MC-Unique: XNhpJrWDPJ2n3IxAaUE7Zg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Subject: [PULL 14/21] cpu: Introduce a wrapper for being able to use TARGET_NAME in common code Date: Mon, 15 May 2023 15:02:26 +0200 Message-Id: <20230515130233.418183-15-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684158171860100001 Content-Type: text/plain; charset="utf-8" In some spots, it would be helpful to be able to use TARGET_NAME in common (target independent) code, too. Thus introduce a wrapper that can be called from common code, too, just like we already have one for target_words_bigendian(). Message-Id: <20230424160434.331175-3-thuth@redhat.com> Signed-off-by: Thomas Huth --- include/hw/core/cpu.h | 2 ++ cpu.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 5a019a27bc..39150cf8f8 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1013,6 +1013,8 @@ void cpu_exec_unrealizefn(CPUState *cpu); */ bool target_words_bigendian(void); =20 +const char *target_name(void); + void page_size_init(void); =20 #ifdef NEED_CPU_H diff --git a/cpu.c b/cpu.c index 9105c85404..65ebaf8159 100644 --- a/cpu.c +++ b/cpu.c @@ -427,6 +427,11 @@ bool target_words_bigendian(void) #endif } =20 +const char *target_name(void) +{ + return TARGET_NAME; +} + void page_size_init(void) { /* NOTE: we can always suppose that qemu_host_page_size >=3D --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684156782; cv=none; d=zohomail.com; s=zohoarc; b=iHdoQrXCyW9Ka75cJvsn4AYCcGIi1P1O9zWYkZ1VuOxgxTlxmgwNa3Sz1f1dLrWx7unHEBMRd+WW+XKq3p9z0BsgvaWp9JiRx2BJwAAuveYq+RCsZhwTB6LqTjBtf86vhLJWPHj8Mg2XUIaBUQ3JFHVfH/frsYiboxT0MCVWzFA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684156782; h=Content-Transfer-Encoding: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=9/0LoQ/mlwMBHW6hPB4b/3ksOjeZSNoeSZZWjQ8ZNwY=; b=n7eSM2EhCeaQ4VGYFM8X7Ot/WDpCIoGKvEcx+UnHB4E2Hs0+dhIPFdgxnYM3ZYQNqyUTQ2ClmPT/hjZu1vBkGd9mJ8nqj1elwOhrWjshJf6KOycfsBHRNnUNrX1s53C+5UHvrZo2xqwPEsLhyutay5G1wl2L10JvDFl5vYvrypo= 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 1684156782582935.2878348650835; Mon, 15 May 2023 06:19:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsS-00082F-Lw; Mon, 15 May 2023 09:04:36 -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 1pyXqx-0004Zh-BI for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:10 -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 1pyXqt-00012y-5m for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:03 -0400 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-163-L8yfRedLODquLTcjgPfjSw-1; Mon, 15 May 2023 09:02:56 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 891291825061; Mon, 15 May 2023 13:02:54 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id F070240C6EC4; Mon, 15 May 2023 13:02:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155778; 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=9/0LoQ/mlwMBHW6hPB4b/3ksOjeZSNoeSZZWjQ8ZNwY=; b=OshsBBoCKVzPxTpFYpoNrWT5jScW/zmql3giXr/MT/akTQPYoQdZfoWZ2qhBk3NiqCZIkP Ni8U3Jokuv9AdgfWoGD7nXllKzddpLN9+6NRsMTGdk5nWCdamrsRc/w0YCQFjhr8hkZwVI SQuKL6SBVK2p1lVhm4EvadQzHq+dcMY= X-MC-Unique: L8yfRedLODquLTcjgPfjSw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Subject: [PULL 15/21] hw/core: Move machine-qmp-cmds.c into the target independent source set Date: Mon, 15 May 2023 15:02:27 +0200 Message-Id: <20230515130233.418183-16-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684156784489100003 Content-Type: text/plain; charset="utf-8" The only target specific code that is left in here are two spots that use TARGET_NAME. Change them to use the new target_name() wrapper function instead, so we can move the file into the common softmmu_ss source set. That way we only have to compile this file once, and not for each target anymore. Message-Id: <20230424160434.331175-4-thuth@redhat.com> Signed-off-by: Thomas Huth --- hw/core/machine-qmp-cmds.c | 4 ++-- hw/core/meson.build | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index c158c02aa3..3860a50c3b 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -37,7 +37,7 @@ CpuInfoFastList *qmp_query_cpus_fast(Error **errp) MachineState *ms =3D MACHINE(qdev_get_machine()); MachineClass *mc =3D MACHINE_GET_CLASS(ms); CpuInfoFastList *head =3D NULL, **tail =3D &head; - SysEmuTarget target =3D qapi_enum_parse(&SysEmuTarget_lookup, TARGET_N= AME, + SysEmuTarget target =3D qapi_enum_parse(&SysEmuTarget_lookup, target_n= ame(), -1, &error_abort); CPUState *cpu; =20 @@ -117,7 +117,7 @@ TargetInfo *qmp_query_target(Error **errp) { TargetInfo *info =3D g_malloc0(sizeof(*info)); =20 - info->arch =3D qapi_enum_parse(&SysEmuTarget_lookup, TARGET_NAME, -1, + info->arch =3D qapi_enum_parse(&SysEmuTarget_lookup, target_name(), -1, &error_abort); =20 return info; diff --git a/hw/core/meson.build b/hw/core/meson.build index ae977c9396..959bc924d4 100644 --- a/hw/core/meson.build +++ b/hw/core/meson.build @@ -41,6 +41,7 @@ softmmu_ss.add(files( 'gpio.c', 'loader.c', 'machine-hmp-cmds.c', + 'machine-qmp-cmds.c', 'machine.c', 'nmi.c', 'null-machine.c', @@ -51,7 +52,3 @@ softmmu_ss.add(files( 'vm-change-state-handler.c', 'clock-vmstate.c', )) - -specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files( - 'machine-qmp-cmds.c', -)) --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684157581; cv=none; d=zohomail.com; s=zohoarc; b=cNosJcHhU8szyGMbb5uCLySz3HIF+uiQToX0VuiaKifruTLmgzG93oE2yn8P8DLAnUS5MAvzFdUawK1S+j9fwZnfxkCqtoZ4i/XbB3le9kjR5nI/h+tnP5qu4r/8tQ+o6gVUEd1fAIuk/CkJ09GosIi9nfKPJQuB5RPpPr7Jwwg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684157581; h=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=nfmBpGfjzudvXV+AqtZUj3B5ghdQwnfOcLLzFEP2Pzk=; b=WjcCTDuNXBI28wOtS5PushUhyEWpE+sjexH63891LnlDSiysqEumbNGPI3Yu6xwt4OCjiCTM4FDJh7C26LTPWY8tu7K2ZVelY2rpMqAChvzexfn6zpATiXRUmpBe1MOgEGd+cbFJK8wJ+U5uWRvm6ZNW8BsuoB7grJAoQbCHAaI= 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 1684157581129248.76345646905293; Mon, 15 May 2023 06:33:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXrx-0006D1-LW; Mon, 15 May 2023 09:04:05 -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 1pyXqw-0004Yy-Vf for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:10 -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 1pyXqt-000136-4U for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:02 -0400 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-78-0SSVeXI4OtqmyzPLl7B-nw-1; Mon, 15 May 2023 09:02:56 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BC1F81C0ED0C; Mon, 15 May 2023 13:02:55 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB1E24078906; Mon, 15 May 2023 13:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155778; 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=nfmBpGfjzudvXV+AqtZUj3B5ghdQwnfOcLLzFEP2Pzk=; b=WZiK6XPkz0+IZDnNzfiLzJmLSxgg/Uj8x7ysT9fj8aK9odA3yXH/f5EUwABEIHfjpN7g01 00Srvbfa1eGMAoFBxP8F4DME2NRmqRBWs3KzShhs4/pc1eXNB+CobKIgSGoRI6YxSv9Ayy duBjXj5xArOu5CFiXml/uGHvtZXzHW4= X-MC-Unique: 0SSVeXI4OtqmyzPLl7B-nw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Francisco Iglesias , Alistair Francis Subject: [PULL 16/21] hw/net: Move xilinx_ethlite.c to the target-independent source set Date: Mon, 15 May 2023 15:02:28 +0200 Message-Id: <20230515130233.418183-17-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684157582725100003 Content-Type: text/plain; charset="utf-8" Now that the tswap() functions are available for target-independent code, too, we can move xilinx_ethlite.c from specific_ss to softmmu_ss to avoid that we have to compile this file multiple times. Message-Id: <20230508120314.59274-1-thuth@redhat.com> Reviewed-by: Francisco Iglesias Reviewed-by: Alistair Francis Signed-off-by: Thomas Huth --- hw/net/xilinx_ethlite.c | 2 +- hw/net/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c index 99c22819ea..89f4f3b254 100644 --- a/hw/net/xilinx_ethlite.c +++ b/hw/net/xilinx_ethlite.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "qemu/module.h" #include "qom/object.h" -#include "cpu.h" /* FIXME should not use tswap* */ +#include "exec/tswap.h" #include "hw/sysbus.h" #include "hw/irq.h" #include "hw/qdev-properties.h" diff --git a/hw/net/meson.build b/hw/net/meson.build index e2be0654a1..a7860c5efe 100644 --- a/hw/net/meson.build +++ b/hw/net/meson.build @@ -43,7 +43,7 @@ softmmu_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('np= cm7xx_emc.c')) softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_eth.c')) softmmu_ss.add(when: 'CONFIG_COLDFIRE', if_true: files('mcf_fec.c')) specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_llan.c')) -specific_ss.add(when: 'CONFIG_XILINX_ETHLITE', if_true: files('xilinx_ethl= ite.c')) +softmmu_ss.add(when: 'CONFIG_XILINX_ETHLITE', if_true: files('xilinx_ethli= te.c')) =20 softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('net_rx_pkt.c')) specific_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net.c')) --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684157842; cv=none; d=zohomail.com; s=zohoarc; b=BlV99DFh2MUnWO3gwm17X3j0BCWmKkH4tzjQDsZm3BTd/iVP56hTwCx3jouryvG69uvtUPJlLIau0ml4yKpeu0B3460ZbeSlBWzg54BFRn3fk1FzTzWl1yLsZz+UmA8zug1mJ6oOOgQOQ3d229ixXiOfDVh+p0Q5Og4NxJfKcaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684157842; h=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=GBpHllG4vChZTLu9laNFzha67VQ96Am3UoQSaMP3pu4=; b=KCiEA0bStbN9H8JqeA1uktgSBshqUTiLNHMNrGXc+D4uujL0abHYW8HvcQwfvohkOzW+BBO5KqdbLCqHCy1ODDb3pixqvNzpecLHhjdz+XVLLW00cn8R6shDRYRudZosfgdfJiIRK2SPXEg+zX6QJgzjsDmlyJPuhj5K60Fy/Cc= 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 1684157842758855.9884264529996; Mon, 15 May 2023 06:37:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsZ-0000K9-Qv; Mon, 15 May 2023 09:04:43 -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 1pyXr5-0004hO-HC for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:11 -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 1pyXqw-00014C-77 for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:05 -0400 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-121-XHVjbxP5NNicbPgPGTWj4w-1; Mon, 15 May 2023 09:02:58 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E41B410146F0; Mon, 15 May 2023 13:02:56 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0CB2C40C6EC4; Mon, 15 May 2023 13:02:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155780; 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=GBpHllG4vChZTLu9laNFzha67VQ96Am3UoQSaMP3pu4=; b=QXEjBPfCeA8lNHv6RvkDs+De7D+xcuaBog7raTtgmptez5JTSmRpQ8IcSsDopUkiA8rHZ0 IeYE+QexG+roE849ESNL1MnJu2A0uGlNxx/NJa+HHPq0h2UxCpm6KyxHvFY3+qhI3W5WvP Ol8DwcoiZp6pCL3hXdfjbcJvF/iHIgU= X-MC-Unique: XHVjbxP5NNicbPgPGTWj4w-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Ilya Leoshkevich , David Hildenbrand Subject: [PULL 17/21] s390x/tcg: Fix LDER instruction format Date: Mon, 15 May 2023 15:02:29 +0200 Message-Id: <20230515130233.418183-18-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684157844366100003 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich It's RRE, not RXE. Found by running valgrind's none/tests/s390x/bfp-2. Fixes: 86b59624c4aa ("s390x/tcg: Implement LOAD LENGTHENED short HFP to lon= g HFP") Reviewed-by: David Hildenbrand Signed-off-by: Ilya Leoshkevich Message-Id: <20230511134726.469651-1-iii@linux.ibm.com> Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- target/s390x/tcg/insn-data.h.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.= h.inc index 597d968b0e..1f1ac742a9 100644 --- a/target/s390x/tcg/insn-data.h.inc +++ b/target/s390x/tcg/insn-data.h.inc @@ -606,7 +606,7 @@ F(0xed04, LDEB, RXE, Z, 0, m2_32u, new, f1, ldeb, 0, IF_BFP) F(0xed05, LXDB, RXE, Z, 0, m2_64, new_x, x1, lxdb, 0, IF_BFP) F(0xed06, LXEB, RXE, Z, 0, m2_32u, new_x, x1, lxeb, 0, IF_BFP) - F(0xb324, LDER, RXE, Z, 0, e2, new, f1, lde, 0, IF_AFP1) + F(0xb324, LDER, RRE, Z, 0, e2, new, f1, lde, 0, IF_AFP1) F(0xed24, LDE, RXE, Z, 0, m2_32u, new, f1, lde, 0, IF_AFP1) /* LOAD ROUNDED */ F(0xb344, LEDBR, RRF_e, Z, 0, f2, new, e1, ledb, 0, IF_BFP) --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684158262; cv=none; d=zohomail.com; s=zohoarc; b=MIScD5uGLo4Lgrk079YXTHsP3GTShHaT+PDgnGhPF0jmEaonmbZV0cG3rgIitpJns99xrJmdmZamqxjiHADzmX9ZU8TJFhm+20ucka03AV/NjHDCFMgfYT//ZnbnL+ZkYeCu75Fpn6nPiVeCmPypM9A2rNPJHzsiydAya7GVSZg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684158262; 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=1aIg77/tUibkPSxCu7d4HMzJsHqBK9wvl+aQUORZK2w=; b=gzNWifaMyiP8SmF6Gr3+fTaeW7SEAoVwxCutQ2+dS6Rfn5gXBbTpfckUPvOExMhMjU6gLhzseUddlzTTsA2bSY7hs3UgQDalPzG5fN6WDBJLU13D9x2uv6jbjs7pSoijzrj6wkiAO1eN/jWtTWUqZU2QGM15LDg3IIkxFxrpWYw= 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 1684158262945672.3801528082498; Mon, 15 May 2023 06:44:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsK-0007Ah-ML; Mon, 15 May 2023 09:04:28 -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 1pyXr5-0004hG-JA for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:11 -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 1pyXqw-00014o-U2 for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:07 -0400 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-29-nizukEjTO8OVmLnphcvIZA-1; Mon, 15 May 2023 09:02:59 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1B230182506A; Mon, 15 May 2023 13:02:58 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38A5940C6EC4; Mon, 15 May 2023 13:02:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155782; 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=1aIg77/tUibkPSxCu7d4HMzJsHqBK9wvl+aQUORZK2w=; b=e4kJV36Avoyr8os/cZbyDzRzK2DGYKssyNFJ7UH378g2LtyMkPpdA6qpLSxUFrzF27rnJ8 wI8MidoHlYDzjSzzxyF7t8DYGdPo/wWiIYoIOcNviq+Fgydlxx3n6Fpy5QlZTlKHp8Zkm6 rO9125Y5LlKDG5sTKwS7EgNxpfZwMrE= X-MC-Unique: nizukEjTO8OVmLnphcvIZA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Ilya Leoshkevich , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PULL 18/21] tests/tcg/multiarch: Make the system memory test work on big-endian Date: Mon, 15 May 2023 15:02:30 +0200 Message-Id: <20230515130233.418183-19-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-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.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684158264386100005 From: Ilya Leoshkevich Store the bytes in descending order on big-endian. Invert the logic in the multi-byte signed tests on big-endian. Make the checks in the multi-byte signed tests stricter. Signed-off-by: Ilya Leoshkevich Reviewed-by: Alex Benn=C3=A9e Message-Id: <20230511114651.439872-2-iii@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/multiarch/system/memory.c | 67 ++++++++++++++++++----------- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/tests/tcg/multiarch/system/memory.c b/tests/tcg/multiarch/syst= em/memory.c index 214f7d4f54..e29786ae55 100644 --- a/tests/tcg/multiarch/system/memory.c +++ b/tests/tcg/multiarch/system/memory.c @@ -40,18 +40,21 @@ static void pdot(int count) } =20 /* - * Helper macros for shift/extract so we can keep our endian handling - * in one place. + * Helper macros for endian handling. */ -#define BYTE_SHIFT(b, pos) ((uint64_t)b << (pos * 8)) -#define BYTE_EXTRACT(b, pos) ((b >> (pos * 8)) & 0xff) +#if __BYTE_ORDER__ =3D=3D __ORDER_LITTLE_ENDIAN__ +#define BYTE_SHIFT(b, pos) (b << (pos * 8)) +#define BYTE_NEXT(b) ((b)++) +#elif __BYTE_ORDER__ =3D=3D __ORDER_BIG_ENDIAN__ +#define BYTE_SHIFT(b, pos) (b << ((sizeof(b) - 1 - (pos)) * 8)) +#define BYTE_NEXT(b) (--(b)) +#else +#error Unsupported __BYTE_ORDER__ +#endif =20 /* - * Fill the data with ascending value bytes. - * - * Currently we only support Little Endian machines so write in - * ascending address order. When we read higher address bytes should - * either be zero or higher than the lower bytes. + * Fill the data with ascending (for little-endian) or descending (for + * big-endian) value bytes. */ =20 static void init_test_data_u8(int unused_offset) @@ -62,14 +65,14 @@ static void init_test_data_u8(int unused_offset) =20 ml_printf("Filling test area with u8:"); for (i =3D 0; i < TEST_SIZE; i++) { - *ptr++ =3D count++; + *ptr++ =3D BYTE_NEXT(count); pdot(i); } ml_printf("done\n"); } =20 /* - * Full the data with alternating positive and negative bytes. This + * Fill the data with alternating positive and negative bytes. This * should mean for reads larger than a byte all subsequent reads will * stay either negative or positive. We never write 0. */ @@ -119,7 +122,7 @@ static void init_test_data_u16(int offset) reset_start_data(offset); =20 for (i =3D 0; i < max; i++) { - uint8_t low =3D count++, high =3D count++; + uint16_t low =3D BYTE_NEXT(count), high =3D BYTE_NEXT(count); word =3D BYTE_SHIFT(high, 1) | BYTE_SHIFT(low, 0); *ptr++ =3D word; pdot(i); @@ -139,9 +142,10 @@ static void init_test_data_u32(int offset) reset_start_data(offset); =20 for (i =3D 0; i < max; i++) { - uint8_t b4 =3D count++, b3 =3D count++; - uint8_t b2 =3D count++, b1 =3D count++; - word =3D BYTE_SHIFT(b1, 3) | BYTE_SHIFT(b2, 2) | BYTE_SHIFT(b3, 1)= | b4; + uint32_t b4 =3D BYTE_NEXT(count), b3 =3D BYTE_NEXT(count); + uint32_t b2 =3D BYTE_NEXT(count), b1 =3D BYTE_NEXT(count); + word =3D BYTE_SHIFT(b1, 3) | BYTE_SHIFT(b2, 2) | BYTE_SHIFT(b3, 1)= | + BYTE_SHIFT(b4, 0); *ptr++ =3D word; pdot(i); } @@ -160,13 +164,13 @@ static void init_test_data_u64(int offset) reset_start_data(offset); =20 for (i =3D 0; i < max; i++) { - uint8_t b8 =3D count++, b7 =3D count++; - uint8_t b6 =3D count++, b5 =3D count++; - uint8_t b4 =3D count++, b3 =3D count++; - uint8_t b2 =3D count++, b1 =3D count++; + uint64_t b8 =3D BYTE_NEXT(count), b7 =3D BYTE_NEXT(count); + uint64_t b6 =3D BYTE_NEXT(count), b5 =3D BYTE_NEXT(count); + uint64_t b4 =3D BYTE_NEXT(count), b3 =3D BYTE_NEXT(count); + uint64_t b2 =3D BYTE_NEXT(count), b1 =3D BYTE_NEXT(count); word =3D BYTE_SHIFT(b1, 7) | BYTE_SHIFT(b2, 6) | BYTE_SHIFT(b3, 5)= | BYTE_SHIFT(b4, 4) | BYTE_SHIFT(b5, 3) | BYTE_SHIFT(b6, 2) | - BYTE_SHIFT(b7, 1) | b8; + BYTE_SHIFT(b7, 1) | BYTE_SHIFT(b8, 0); *ptr++ =3D word; pdot(i); } @@ -374,12 +378,20 @@ static bool read_test_data_s16(int offset, bool neg_f= irst) ml_printf("Reading s16 from %#lx (offset %d, %s):", ptr, offset, neg_first ? "neg" : "pos"); =20 + /* + * If the first byte is negative, then the last byte is positive. + * Therefore the logic below must be flipped for big-endian. + */ +#if __BYTE_ORDER__ =3D=3D __ORDER_BIG_ENDIAN__ + neg_first =3D !neg_first; +#endif + for (i =3D 0; i < max; i++) { int32_t data =3D *ptr++; =20 if (neg_first && data < 0) { pdot(i); - } else if (data > 0) { + } else if (!neg_first && data > 0) { pdot(i); } else { ml_printf("Error %d %c 0\n", data, neg_first ? '<' : '>'); @@ -399,12 +411,20 @@ static bool read_test_data_s32(int offset, bool neg_f= irst) ml_printf("Reading s32 from %#lx (offset %d, %s):", ptr, offset, neg_first ? "neg" : "pos"); =20 + /* + * If the first byte is negative, then the last byte is positive. + * Therefore the logic below must be flipped for big-endian. + */ +#if __BYTE_ORDER__ =3D=3D __ORDER_BIG_ENDIAN__ + neg_first =3D !neg_first; +#endif + for (i =3D 0; i < max; i++) { int64_t data =3D *ptr++; =20 if (neg_first && data < 0) { pdot(i); - } else if (data > 0) { + } else if (!neg_first && data > 0) { pdot(i); } else { ml_printf("Error %d %c 0\n", data, neg_first ? '<' : '>'); @@ -419,8 +439,7 @@ static bool read_test_data_s32(int offset, bool neg_fir= st) * Read the test data and verify at various offsets * * For everything except bytes all our reads should be either positive - * or negative depending on what offset we are reading from. Currently - * we only handle LE systems. + * or negative depending on what offset we are reading from. */ read_sfn read_sfns[] =3D { read_test_data_s8, read_test_data_s16, --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684157987; cv=none; d=zohomail.com; s=zohoarc; b=IDEL9aej4Ujnccqs2NElLPlVBiuoBVOxIqqr2oaV89yV+0jyFqcnNDGkTucsHf2IxUxqtOo5gUYobUcqH7j0CSq2SEo2FAMgS3iNee4DkB2TDmhSmV/wudrP9xngDpkx0ZNI0OTaiihOZ1HRxJUJtVBAPPaRboMAFek2xKflLMQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684157987; h=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=dw2BzZtOdqC/O7zL/Dn36Xo/A9SifLvA+jFcs1epDwU=; b=OwfunsBRM/c1SbKvLn++NMRmej0nzVBUdu+XBM2a3mnDN0h4S/oh2KdquSSYP7ioC9e4Rj1IS003lc1Kuk8RozMiXFBTYz7UXeh/iuK/Smy1Qtwlema4gToJ7dEuqkT40XBbmqw23+DkzQMHcOk2unFTmfNJtH9UZ1UbwWIc3L4= 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 1684157987061413.5111445310455; Mon, 15 May 2023 06:39:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsc-0000Ud-Ko; Mon, 15 May 2023 09:04:46 -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 1pyXr9-0004wJ-MY for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:18 -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 1pyXr4-00016E-W0 for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:15 -0400 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-457-0c3MkFl6O9WtKUJS6vpzsw-1; Mon, 15 May 2023 09:03:01 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 14010299E763; Mon, 15 May 2023 13:02:59 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D37E4078906; Mon, 15 May 2023 13:02:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155785; 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=dw2BzZtOdqC/O7zL/Dn36Xo/A9SifLvA+jFcs1epDwU=; b=BVKyYNvOySCR3ojiKLaXhoMHt/OHOmZpem9YWoaR+G35X0FN/Jx9IRTBjZT/CnbMLoSQPZ P2g3ltQ/72/UidtCMJEEHsoRDPev9Oi2dLuJEkJR6ObYlFzlU+r0TuT1HqKWU+RQAAVdd8 Gw6i0uSAn4G/ujg87Jx/vy/XIukuntk= X-MC-Unique: 0c3MkFl6O9WtKUJS6vpzsw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Ilya Leoshkevich Subject: [PULL 19/21] tests/tcg/s390x: Enable the multiarch system tests Date: Mon, 15 May 2023 15:02:31 +0200 Message-Id: <20230515130233.418183-20-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684157988545100003 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich Multiarch tests are written in C and need support for printing characters. Instead of implementing the runtime from scratch, just reuse the pc-bios/s390-ccw one. Run tests with -nographic in order to enable SCLP (enable this for the existing tests as well, since it does not hurt). Use the default linker script for the new tests. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-Id: <20230511114651.439872-3-iii@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/console.c | 12 ++++++++ tests/tcg/s390x/Makefile.softmmu-target | 40 ++++++++++++++++--------- tests/tcg/s390x/head64.S | 31 +++++++++++++++++++ 3 files changed, 69 insertions(+), 14 deletions(-) create mode 100644 tests/tcg/s390x/console.c create mode 100644 tests/tcg/s390x/head64.S diff --git a/tests/tcg/s390x/console.c b/tests/tcg/s390x/console.c new file mode 100644 index 0000000000..d43ce3f44b --- /dev/null +++ b/tests/tcg/s390x/console.c @@ -0,0 +1,12 @@ +/* + * Console code for multiarch tests. + * Reuses the pc-bios/s390-ccw implementation. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#include "../../../pc-bios/s390-ccw/sclp.c" + +void __sys_outc(char c) +{ + write(1, &c, sizeof(c)); +} diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Make= file.softmmu-target index 192315dd20..44dfd71629 100644 --- a/tests/tcg/s390x/Makefile.softmmu-target +++ b/tests/tcg/s390x/Makefile.softmmu-target @@ -1,28 +1,40 @@ S390X_SRC=3D$(SRC_PATH)/tests/tcg/s390x VPATH+=3D$(S390X_SRC) -QEMU_OPTS=3D-action panic=3Dexit-failure -kernel +QEMU_OPTS=3D-action panic=3Dexit-failure -nographic -kernel LINK_SCRIPT=3D$(S390X_SRC)/softmmu.ld -LDFLAGS=3D-nostdlib -static -Wl,-T$(LINK_SCRIPT) -Wl,--build-id=3Dnone +CFLAGS+=3D-ggdb -O0 +LDFLAGS=3D-nostdlib -static =20 %.o: %.S $(CC) -march=3Dz13 -m64 -c $< -o $@ =20 -%: %.o $(LINK_SCRIPT) +%.o: %.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -march=3Dz13 -m64 -c $< -o $@ + +%: %.o $(CC) $< -o $@ $(LDFLAGS) =20 -TESTS +=3D unaligned-lowcore -TESTS +=3D bal -TESTS +=3D sam -TESTS +=3D lpsw -TESTS +=3D lpswe-early -TESTS +=3D ssm-early -TESTS +=3D stosm-early -TESTS +=3D exrl-ssm-early +ASM_TESTS =3D = \ + bal = \ + exrl-ssm-early = \ + sam = \ + lpsw = \ + lpswe-early = \ + ssm-early = \ + stosm-early = \ + unaligned-lowcore =20 include $(S390X_SRC)/pgm-specification.mak $(PGM_SPECIFICATION_TESTS): pgm-specification-softmmu.o $(PGM_SPECIFICATION_TESTS): LDFLAGS+=3Dpgm-specification-softmmu.o -TESTS +=3D $(PGM_SPECIFICATION_TESTS) +ASM_TESTS +=3D $(PGM_SPECIFICATION_TESTS) + +$(ASM_TESTS): LDFLAGS +=3D -Wl,-T$(LINK_SCRIPT) -Wl,--build-id=3Dnone +$(ASM_TESTS): $(LINK_SCRIPT) +TESTS +=3D $(ASM_TESTS) =20 -# We don't currently support the multiarch system tests -undefine MULTIARCH_TESTS +S390X_MULTIARCH_RUNTIME_OBJS =3D head64.o console.o $(MINILIB_OBJS) +$(MULTIARCH_TESTS): $(S390X_MULTIARCH_RUNTIME_OBJS) +$(MULTIARCH_TESTS): LDFLAGS +=3D $(S390X_MULTIARCH_RUNTIME_OBJS) +$(MULTIARCH_TESTS): CFLAGS +=3D $(MINILIB_INC) +memory: CFLAGS +=3D -DCHECK_UNALIGNED=3D0 diff --git a/tests/tcg/s390x/head64.S b/tests/tcg/s390x/head64.S new file mode 100644 index 0000000000..c6f36dfea4 --- /dev/null +++ b/tests/tcg/s390x/head64.S @@ -0,0 +1,31 @@ +/* + * Startup code for multiarch tests. + * Reuses the pc-bios/s390-ccw implementation. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#define main main_pre +#include "../../../pc-bios/s390-ccw/start.S" +#undef main + +main_pre: + aghi %r15,-160 /* reserve stack for C code */ + brasl %r14,sclp_setup + brasl %r14,main + larl %r1,success_psw /* check main() return code */ + ltgr %r2,%r2 + je 0f + larl %r1,failure_psw +0: + lpswe 0(%r1) + + .align 8 +success_psw: + .quad 0x2000180000000,0xfff /* see is_special_wait_psw() */ +failure_psw: + .quad 0x2000180000000,0 /* disabled wait */ + + .section .bss + .align 0x1000 +stack: + .skip 0x8000 --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684156802; cv=none; d=zohomail.com; s=zohoarc; b=aMAP3mRZzOCKn76EeptTnWB+he6Bnc8aKQ8+LH2sqOCW/OrytahIm6UKFVJ99Q/fn+8+1cEuvIj7oNSG4DqXZcGxorrtrPW4YNYaBysw5mWDPhEMbVfNIikJKxlkNu+UuiS1GJlYPDv3g9/8IUfo5bMkzSgq0F5T6ukivFzmn7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684156802; h=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=nb4qfQobMu8tycA5mZhp3qIIojYb2TvITMampjx8tr0=; b=T4nfr9qDKabhD6q1KXnjLQcbvwwtbcOjssYvbSBxfCCFsjC1FcONaTgsNv4Z92l5/N9c4Sn+G1smfCbVl77KrwnBvflE21ot5zipUMbFoEMP4KcEb/YkaA51Iozry1vWBwXvElguhsCa74Z7b4xsJSu6tQwy2186o/4Q3lBsEYM= 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 1684156802026838.7882678242199; Mon, 15 May 2023 06:20:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsb-0000QB-5P; Mon, 15 May 2023 09:04:45 -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 1pyXr9-0004wI-5f for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:18 -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 1pyXr4-000164-PA for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:14 -0400 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-426-eTxCykL-NHyAjQ0KeYBwvg-1; Mon, 15 May 2023 09:03:01 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 317803C00270; Mon, 15 May 2023 13:03:00 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5680C40C6EC4; Mon, 15 May 2023 13:02:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155784; 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=nb4qfQobMu8tycA5mZhp3qIIojYb2TvITMampjx8tr0=; b=hbQwF8VyNudSn7WMxhH1NzaSowCr5MYTahJ6n0M8HHof+n/rgcqytTRVWyTlY6f9Bb41Kb J3q5gxUXacvf15+U7TAZZHpEu1bF5VJP0C52REuJ/wNlcLdeWZksa+swvS0vCbnMV7AQM/ bUER7gfeVc07b2n+IZIPEUsCdpHEOb8= X-MC-Unique: eTxCykL-NHyAjQ0KeYBwvg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Ilya Leoshkevich , Nina Schoetterl-Glausch Subject: [PULL 20/21] target/s390x: Fix EXECUTE of relative branches Date: Mon, 15 May 2023 15:02:32 +0200 Message-Id: <20230515130233.418183-21-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684156804336100001 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich Fix a problem similar to the one fixed by commit 703d03a4aaf3 ("target/s390x: Fix EXECUTE of relative long instructions"), but now for relative branches. Reported-by: Nina Schoetterl-Glausch Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-Id: <20230426235813.198183-2-iii@linux.ibm.com> Signed-off-by: Thomas Huth --- target/s390x/tcg/translate.c | 81 ++++++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index a05205beb1..d6670e6a87 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -1534,18 +1534,51 @@ static DisasJumpType op_bal(DisasContext *s, DisasO= ps *o) } } =20 +/* + * Disassemble the target of a branch. The results are returned in a form + * suitable for passing into help_branch(): + * + * - bool IS_IMM reflects whether the target is fixed or computed. Non-EXE= CUTEd + * branches, whose DisasContext *S contains the relative immediate field= RI, + * are considered fixed. All the other branches are considered computed. + * - int IMM is the value of RI. + * - TCGv_i64 CDEST is the address of the computed target. + */ +#define disas_jdest(s, ri, is_imm, imm, cdest) do { = \ + if (have_field(s, ri)) { = \ + if (unlikely(s->ex_value)) { = \ + cdest =3D tcg_temp_new_i64(); = \ + tcg_gen_ld_i64(cdest, cpu_env, offsetof(CPUS390XState, ex_targ= et));\ + tcg_gen_addi_i64(cdest, cdest, (int64_t)get_field(s, ri) * 2);= \ + is_imm =3D false; = \ + } else { = \ + is_imm =3D true; = \ + } = \ + } else { = \ + is_imm =3D false; = \ + } = \ + imm =3D is_imm ? get_field(s, ri) : 0; = \ +} while (false) + static DisasJumpType op_basi(DisasContext *s, DisasOps *o) { + DisasCompare c; + bool is_imm; + int imm; + pc_to_link_info(o->out, s, s->pc_tmp); - return help_goto_direct(s, s->base.pc_next + (int64_t)get_field(s, i2)= * 2); + + disas_jdest(s, i2, is_imm, imm, o->in2); + disas_jcc(s, &c, 0xf); + return help_branch(s, &c, is_imm, imm, o->in2); } =20 static DisasJumpType op_bc(DisasContext *s, DisasOps *o) { int m1 =3D get_field(s, m1); - bool is_imm =3D have_field(s, i2); - int imm =3D is_imm ? get_field(s, i2) : 0; DisasCompare c; + bool is_imm; + int imm; =20 /* BCR with R2 =3D 0 causes no branching */ if (have_field(s, r2) && get_field(s, r2) =3D=3D 0) { @@ -1562,6 +1595,7 @@ static DisasJumpType op_bc(DisasContext *s, DisasOps = *o) return DISAS_NEXT; } =20 + disas_jdest(s, i2, is_imm, imm, o->in2); disas_jcc(s, &c, m1); return help_branch(s, &c, is_imm, imm, o->in2); } @@ -1569,10 +1603,10 @@ static DisasJumpType op_bc(DisasContext *s, DisasOp= s *o) static DisasJumpType op_bct32(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s, r1); - bool is_imm =3D have_field(s, i2); - int imm =3D is_imm ? get_field(s, i2) : 0; DisasCompare c; + bool is_imm; TCGv_i64 t; + int imm; =20 c.cond =3D TCG_COND_NE; c.is_64 =3D false; @@ -1584,6 +1618,7 @@ static DisasJumpType op_bct32(DisasContext *s, DisasO= ps *o) c.u.s32.b =3D tcg_constant_i32(0); tcg_gen_extrl_i64_i32(c.u.s32.a, t); =20 + disas_jdest(s, i2, is_imm, imm, o->in2); return help_branch(s, &c, is_imm, imm, o->in2); } =20 @@ -1611,9 +1646,9 @@ static DisasJumpType op_bcth(DisasContext *s, DisasOp= s *o) static DisasJumpType op_bct64(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s, r1); - bool is_imm =3D have_field(s, i2); - int imm =3D is_imm ? get_field(s, i2) : 0; DisasCompare c; + bool is_imm; + int imm; =20 c.cond =3D TCG_COND_NE; c.is_64 =3D true; @@ -1622,6 +1657,7 @@ static DisasJumpType op_bct64(DisasContext *s, DisasO= ps *o) c.u.s64.a =3D regs[r1]; c.u.s64.b =3D tcg_constant_i64(0); =20 + disas_jdest(s, i2, is_imm, imm, o->in2); return help_branch(s, &c, is_imm, imm, o->in2); } =20 @@ -1629,10 +1665,10 @@ static DisasJumpType op_bx32(DisasContext *s, Disas= Ops *o) { int r1 =3D get_field(s, r1); int r3 =3D get_field(s, r3); - bool is_imm =3D have_field(s, i2); - int imm =3D is_imm ? get_field(s, i2) : 0; DisasCompare c; + bool is_imm; TCGv_i64 t; + int imm; =20 c.cond =3D (s->insn->data ? TCG_COND_LE : TCG_COND_GT); c.is_64 =3D false; @@ -1645,6 +1681,7 @@ static DisasJumpType op_bx32(DisasContext *s, DisasOp= s *o) tcg_gen_extrl_i64_i32(c.u.s32.b, regs[r3 | 1]); store_reg32_i64(r1, t); =20 + disas_jdest(s, i2, is_imm, imm, o->in2); return help_branch(s, &c, is_imm, imm, o->in2); } =20 @@ -1652,9 +1689,9 @@ static DisasJumpType op_bx64(DisasContext *s, DisasOp= s *o) { int r1 =3D get_field(s, r1); int r3 =3D get_field(s, r3); - bool is_imm =3D have_field(s, i2); - int imm =3D is_imm ? get_field(s, i2) : 0; DisasCompare c; + bool is_imm; + int imm; =20 c.cond =3D (s->insn->data ? TCG_COND_LE : TCG_COND_GT); c.is_64 =3D true; @@ -1668,6 +1705,7 @@ static DisasJumpType op_bx64(DisasContext *s, DisasOp= s *o) tcg_gen_add_i64(regs[r1], regs[r1], regs[r3]); c.u.s64.a =3D regs[r1]; =20 + disas_jdest(s, i2, is_imm, imm, o->in2); return help_branch(s, &c, is_imm, imm, o->in2); } =20 @@ -1685,10 +1723,9 @@ static DisasJumpType op_cj(DisasContext *s, DisasOps= *o) c.u.s64.a =3D o->in1; c.u.s64.b =3D o->in2; =20 - is_imm =3D have_field(s, i4); - if (is_imm) { - imm =3D get_field(s, i4); - } else { + o->out =3D NULL; + disas_jdest(s, i4, is_imm, imm, o->out); + if (!is_imm && !o->out) { imm =3D 0; o->out =3D get_address(s, 0, get_field(s, b4), get_field(s, d4)); @@ -5764,15 +5801,13 @@ static void in2_a2(DisasContext *s, DisasOps *o) =20 static TCGv gen_ri2(DisasContext *s) { - int64_t delta =3D (int64_t)get_field(s, i2) * 2; - TCGv ri2; + TCGv ri2 =3D NULL; + bool is_imm; + int imm; =20 - if (unlikely(s->ex_value)) { - ri2 =3D tcg_temp_new_i64(); - tcg_gen_ld_i64(ri2, cpu_env, offsetof(CPUS390XState, ex_target)); - tcg_gen_addi_i64(ri2, ri2, delta); - } else { - ri2 =3D tcg_constant_i64(s->base.pc_next + delta); + disas_jdest(s, i2, is_imm, imm, ri2); + if (is_imm) { + ri2 =3D tcg_constant_i64(s->base.pc_next + imm * 2); } =20 return ri2; --=20 2.31.1 From nobody Thu May 16 13:27:15 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=1684158036; cv=none; d=zohomail.com; s=zohoarc; b=Psg+isnpcLY8sLb3Mm8AllYGEuYbSPDw1ILcLdzn2IbDHFJQKXM4toTKtCCWrXAgFaBwDdz0KLrEnd/kCBfdBOMvmcFJYXxVkFk/6vtKKx7FyWbqD5MwfzNI0/EnF2GjcID4Xq/RLQurfBA3vNofzLt2AYFUiwaoXtTEYKvhRts= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684158036; h=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=3cvVo1HLTG3tB+XejkUsy3xh5m+2mDmGhHSUoVztGec=; b=G1iDweetehMKHTQN8DYdVb93Se66lBJyBmE1aDolYdOBIEvIXB/8PjnQnzrRZ5s1eyu7YdrRtlmLpQAyy7XWLMXUXnfYJEP4gXNPHCOHE529sFhSHZoxyb8BTI18mtik2Kz5uE4v63nRSGI+0iVdBpx03aAIRIRhJfdfbAwDUC4= 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 1684158036789763.4939434545581; Mon, 15 May 2023 06:40:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyXsX-000072-SZ; Mon, 15 May 2023 09:04:41 -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 1pyXr7-0004rL-3A for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:13 -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 1pyXr5-00016K-2i for qemu-devel@nongnu.org; Mon, 15 May 2023 09:03:12 -0400 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-108-uPnS1xMsPmK7LSnrn77whg-1; Mon, 15 May 2023 09:03:03 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3446D3C0CF0B; Mon, 15 May 2023 13:03:01 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 72FCC40C6EC4; Mon, 15 May 2023 13:03:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684155785; 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=3cvVo1HLTG3tB+XejkUsy3xh5m+2mDmGhHSUoVztGec=; b=QJfYISPqMelen5/rOFU9oTrkRI5VVGWrLPPfeqT3UMI/V/dd6DqY/tyFXCzz9wUzEXfGel jpMYSala+37JzcZHsI0ChuOK2Puk9gyU4rfhRcJY60ZRJdRceTDr7bvLYH8p2f36dEWuL3 voug2qsCI/uJKogIU4ATwTFSTXra/VM= X-MC-Unique: uPnS1xMsPmK7LSnrn77whg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Ilya Leoshkevich Subject: [PULL 21/21] tests/tcg/s390x: Test EXECUTE of relative branches Date: Mon, 15 May 2023 15:02:33 +0200 Message-Id: <20230515130233.418183-22-thuth@redhat.com> In-Reply-To: <20230515130233.418183-1-thuth@redhat.com> References: <20230515130233.418183-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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: 1684158037121100001 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich Acked-by: Richard Henderson Message-Id: <20230426235813.198183-3-iii@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/ex-branch.c | 158 ++++++++++++++++++++++++++++++++ tests/tcg/s390x/Makefile.target | 1 + 2 files changed, 159 insertions(+) create mode 100644 tests/tcg/s390x/ex-branch.c diff --git a/tests/tcg/s390x/ex-branch.c b/tests/tcg/s390x/ex-branch.c new file mode 100644 index 0000000000..c606719152 --- /dev/null +++ b/tests/tcg/s390x/ex-branch.c @@ -0,0 +1,158 @@ +/* Check EXECUTE with relative branch instructions as targets. */ +#include +#include +#include +#include +#include + +struct test { + const char *name; + void (*func)(long *link, long *magic); + long exp_link; +}; + +/* Branch instructions and their expected effects. */ +#define LINK_64(test) ((long)test ## _exp_link) +#define LINK_NONE(test) -1L +#define FOR_EACH_INSN(F) = \ + F(bras, "%[link]", LINK_64) = \ + F(brasl, "%[link]", LINK_64) = \ + F(brc, "0x8", LINK_NONE) = \ + F(brcl, "0x8", LINK_NONE) = \ + F(brct, "%%r0", LINK_NONE) = \ + F(brctg, "%%r0", LINK_NONE) = \ + F(brxh, "%%r2,%%r0", LINK_NONE) = \ + F(brxhg, "%%r2,%%r0", LINK_NONE) = \ + F(brxle, "%%r0,%%r1", LINK_NONE) = \ + F(brxlg, "%%r0,%%r1", LINK_NONE) = \ + F(crj, "%%r0,%%r0,8", LINK_NONE) = \ + F(cgrj, "%%r0,%%r0,8", LINK_NONE) = \ + F(cij, "%%r0,0,8", LINK_NONE) = \ + F(cgij, "%%r0,0,8", LINK_NONE) = \ + F(clrj, "%%r0,%%r0,8", LINK_NONE) = \ + F(clgrj, "%%r0,%%r0,8", LINK_NONE) = \ + F(clij, "%%r0,0,8", LINK_NONE) = \ + F(clgij, "%%r0,0,8", LINK_NONE) + +#define INIT_TEST = \ + "xgr %%r0,%%r0\n" /* %r0 =3D 0; %cc =3D 0 */ = \ + "lghi %%r1,1\n" /* %r1 =3D 1 */ = \ + "lghi %%r2,2\n" /* %r2 =3D 2 */ + +#define CLOBBERS_TEST "cc", "0", "1", "2" + +#define DEFINE_TEST(insn, args, exp_link) = \ + extern char insn ## _exp_link[]; = \ + static void test_ ## insn(long *link, long *magic) = \ + { = \ + asm(INIT_TEST = \ + #insn " " args ",0f\n" = \ + ".globl " #insn "_exp_link\n" = \ + #insn "_exp_link:\n" = \ + ".org . + 90\n" = \ + "0: lgfi %[magic],0x12345678\n" = \ + : [link] "+r" (*link) = \ + , [magic] "+r" (*magic) = \ + : : CLOBBERS_TEST); = \ + } = \ + extern char ex_ ## insn ## _exp_link[]; = \ + static void test_ex_ ## insn(long *link, long *magic) = \ + { = \ + unsigned long target; = \ + = \ + asm(INIT_TEST = \ + "larl %[target],0f\n" = \ + "ex %%r0,0(%[target])\n" = \ + ".globl ex_" #insn "_exp_link\n" = \ + "ex_" #insn "_exp_link:\n" = \ + ".org . + 60\n" = \ + "0: " #insn " " args ",1f\n" = \ + ".org . + 120\n" = \ + "1: lgfi %[magic],0x12345678\n" = \ + : [target] "=3Dr" (target) = \ + , [link] "+r" (*link) = \ + , [magic] "+r" (*magic) = \ + : : CLOBBERS_TEST); = \ + } = \ + extern char exrl_ ## insn ## _exp_link[]; = \ + static void test_exrl_ ## insn(long *link, long *magic) = \ + { = \ + asm(INIT_TEST = \ + "exrl %%r0,0f\n" = \ + ".globl exrl_" #insn "_exp_link\n" = \ + "exrl_" #insn "_exp_link:\n" = \ + ".org . + 60\n" = \ + "0: " #insn " " args ",1f\n" = \ + ".org . + 120\n" = \ + "1: lgfi %[magic],0x12345678\n" = \ + : [link] "+r" (*link) = \ + , [magic] "+r" (*magic) = \ + : : CLOBBERS_TEST); = \ + } + +/* Test functions. */ +FOR_EACH_INSN(DEFINE_TEST) + +/* Test definitions. */ +#define REGISTER_TEST(insn, args, _exp_link) = \ + { = \ + .name =3D #insn, = \ + .func =3D test_ ## insn, = \ + .exp_link =3D (_exp_link(insn)), = \ + }, = \ + { = \ + .name =3D "ex " #insn, = \ + .func =3D test_ex_ ## insn, = \ + .exp_link =3D (_exp_link(ex_ ## insn)), = \ + }, = \ + { = \ + .name =3D "exrl " #insn, = \ + .func =3D test_exrl_ ## insn, = \ + .exp_link =3D (_exp_link(exrl_ ## insn)), = \ + }, + +static const struct test tests[] =3D { + FOR_EACH_INSN(REGISTER_TEST) +}; + +int main(int argc, char **argv) +{ + const struct test *test; + int ret =3D EXIT_SUCCESS; + bool verbose =3D false; + long link, magic; + size_t i; + + for (i =3D 1; i < argc; i++) { + if (strcmp(argv[i], "-v") =3D=3D 0) { + verbose =3D true; + } + } + + for (i =3D 0; i < sizeof(tests) / sizeof(tests[0]); i++) { + test =3D &tests[i]; + if (verbose) { + fprintf(stderr, "[ RUN ] %s\n", test->name); + } + link =3D -1; + magic =3D -1; + test->func(&link, &magic); +#define ASSERT_EQ(expected, actual) do { = \ + if (expected !=3D actual) { = \ + fprintf(stderr, "%s: " #expected " (0x%lx) !=3D " #actual " (0x%lx= )\n", \ + test->name, expected, actual); = \ + ret =3D EXIT_FAILURE; = \ + } = \ +} while (0) + ASSERT_EQ(test->exp_link, link); + ASSERT_EQ(0x12345678L, magic); +#undef ASSERT_EQ + } + + if (verbose) { + fprintf(stderr, ret =3D=3D EXIT_SUCCESS ? "[ PASSED ]\n" : + "[ FAILED ]\n"); + } + + return ret; +} diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.tar= get index 0031868b13..23dc8b6a63 100644 --- a/tests/tcg/s390x/Makefile.target +++ b/tests/tcg/s390x/Makefile.target @@ -34,6 +34,7 @@ TESTS+=3Dcdsg TESTS+=3Dchrl TESTS+=3Drxsbg TESTS+=3Dex-relative-long +TESTS+=3Dex-branch =20 cdsg: CFLAGS+=3D-pthread cdsg: LDFLAGS+=3D-pthread --=20 2.31.1