From nobody Tue May 14 23:40:07 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=1677497956; cv=none; d=zohomail.com; s=zohoarc; b=a22p7z1rHMZfYykMKz01phR47Kqo6Q6XOsylL3UL0PKZmLelW7I9xMo/0A2JbMYtAY9i5LeNLEIrGdvFNkCCab18glfDym/N36OpiZFUMW2y8NISiX9v/p+hgwlBTwuxg87Kzc1H86YYAuvPvQCJmVg3WDLLXFPHkQPUWc6upmc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497956; 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=BvdedQHE2XFHgWmaM09tYUZ1I/EqK7zCoouJXMb+WOQ=; b=nrhC2xEovYMOHG/WLkG3lhlRr8LRH6k0I6vTZPbASMTlnTKWkVAqpscEUCzvr+ysz9aMeZ4bQ2eStScS4hc3YXGxDwY8biGvl5kPL3D75pR+Blq26YnlV/moEkNumld8Hje2rJFdojFswJ7onuFmrecemAAhytT4i3n6PPs6TSY= 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 167749795654438.09619303559384; Mon, 27 Feb 2023 03:39:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbo8-0005QE-Gf; Mon, 27 Feb 2023 06:36:40 -0500 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 1pWbo0-0005Oc-Np for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:33 -0500 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 1pWbny-0005ce-M0 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:32 -0500 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-100-MinSBph2ONq-lZQN3nh7Nw-1; Mon, 27 Feb 2023 06:36:25 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5462185CBE2; Mon, 27 Feb 2023 11:36:25 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93A661121314; Mon, 27 Feb 2023 11:36:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497787; 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=BvdedQHE2XFHgWmaM09tYUZ1I/EqK7zCoouJXMb+WOQ=; b=FVJMK9/L6/oUnkmcviTR3TFSEPX4KaK6Ig6gpuQ3wRVB1IPQA6MFDcJYFr2BF/AKrq1lLd CkpKcjOp3BjmMNYjpmp/oGezUK/h5czcIyl+8wOrce91n+PimDj0pGicx7sdma+hfCk9HQ syFCeaeyECBYyuFqMMnG2kciECaZxgA= X-MC-Unique: MinSBph2ONq-lZQN3nh7Nw-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PULL 01/33] tests/qtest/rtl8139-test: Make the test less verbose by default Date: Mon, 27 Feb 2023 12:35:49 +0100 Message-Id: <20230227113621.58468-2-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677497956998100001 We are facing the issues that some test logs in the gitlab CI are too big (and thus cut off). The rtl8139-test is one of the few qtests that prints many lines of output by default when running with V=3D1, so it contributes to this problem. Almost all other qtests are silent with V=3D1 and only print debug messages with V=3D2 and higher. Thus let's change the rtl8139-test to behave more like the other tests and only print the debug messages with V=3D2 (or higher). Message-Id: <20230215124122.72037-1-thuth@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Thomas Huth --- tests/qtest/rtl8139-test.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/qtest/rtl8139-test.c b/tests/qtest/rtl8139-test.c index 8fa3313cc3..1beb83805c 100644 --- a/tests/qtest/rtl8139-test.c +++ b/tests/qtest/rtl8139-test.c @@ -12,6 +12,8 @@ #include "libqos/pci-pc.h" #include "qemu/timer.h" =20 +static int verbosity_level; + /* Tests only initialization so far. TODO: Replace with functional tests */ static void nop(void) { @@ -45,12 +47,16 @@ static QPCIDevice *get_device(void) static unsigned __attribute__((unused)) in_##name(void) \ { \ unsigned res =3D qpci_io_read##len(dev, dev_bar, (val)); \ - g_test_message("*%s -> %x", #name, res); \ + if (verbosity_level >=3D 2) { \ + g_test_message("*%s -> %x", #name, res); \ + } \ return res; \ } \ static void out_##name(unsigned v) \ { \ - g_test_message("%x -> *%s", v, #name); \ + if (verbosity_level >=3D 2) { \ + g_test_message("%x -> *%s", v, #name); \ + } \ qpci_io_write##len(dev, dev_bar, (val), v); \ } =20 @@ -195,6 +201,11 @@ static void test_init(void) int main(int argc, char **argv) { int ret; + char *v_env =3D getenv("V"); + + if (v_env) { + verbosity_level =3D atoi(v_env); + } =20 qtest_start("-device rtl8139"); =20 --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497957; cv=none; d=zohomail.com; s=zohoarc; b=apYp9noaPfcX8j+uZsA4kYpYotXjkzvaTB1Jclkf7w/UYc+y2MerswXHhEW7qNWtojq/yaEXCLHqBukvpFVk0JuGxXVbOMpWj+X8ViPSXApTV0wo/74+Yc6pNyjHwEE5iAjFbFJJVnx/imIY+ahmQGjMXhRAGXJHlQXYdSlbjJA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497957; 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=CCIoh355eR2gifpP69uJvxJdIfAbhg3hOGe1Eb6bkWg=; b=ZFg1ZdzKIzNcEwDIDP6Ba9hqm+YlAuJA7ypZCI2Tr0TjXasSJtzQI3tKzxBG9XfkpEm2leDZUElx7wsnmyFju5nHaMellJgEEGArgvwhctgEdbtK0yPA2O34uxwNaFu3cYRs3pN5XjxqHdfGTPr4ObrnuyF7VeXHkcbQzM2eCcQ= 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 1677497957005213.0314770559711; Mon, 27 Feb 2023 03:39:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbo9-0005UM-BL; Mon, 27 Feb 2023 06:36:41 -0500 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 1pWbo2-0005P9-CR for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:35 -0500 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 1pWbnz-0005eB-2e for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:33 -0500 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-77-WRfIqcCPPIy3R5DL82N7iw-1; Mon, 27 Feb 2023 06:36:26 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 56E763C0E441; Mon, 27 Feb 2023 11:36:26 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 963D51121314; Mon, 27 Feb 2023 11:36:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497790; 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=CCIoh355eR2gifpP69uJvxJdIfAbhg3hOGe1Eb6bkWg=; b=h2lLhv/p3tbDBnlEt5YRIG+rEQwtaeFR4Gztv35YlZjYHL6XUTaggb15VFCOZGwWhGlXcJ Ey20kYSPx0UuJ2ooB/uxxdiSvwpajOCQEK5rX3VhQLjBeQok8qKf+WVJJ9vQxbCO2PRKwM qUzENGR6iWOvJwiPGItLcBebMNRxAtc= X-MC-Unique: WRfIqcCPPIy3R5DL82N7iw-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 02/33] Do not include hw/hw.h if it is not necessary Date: Mon, 27 Feb 2023 12:35:50 +0100 Message-Id: <20230227113621.58468-3-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677497959060100007 hw.h only contains the protoype of one function nowadays, hw_error(), so all files that do not use this function anymore also do not need to include this header anymore. Message-Id: <20230216142915.304481-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- include/hw/ssi/ibex_spi_host.h | 1 - include/hw/tricore/tricore_testdevice.h | 1 - hw/pci-host/mv64361.c | 1 - hw/ppc/pegasos2.c | 1 - hw/sensor/dps310.c | 1 - 5 files changed, 5 deletions(-) diff --git a/include/hw/ssi/ibex_spi_host.h b/include/hw/ssi/ibex_spi_host.h index 8089cc1c31..5bd5557b9a 100644 --- a/include/hw/ssi/ibex_spi_host.h +++ b/include/hw/ssi/ibex_spi_host.h @@ -28,7 +28,6 @@ #define IBEX_SPI_HOST_H =20 #include "hw/sysbus.h" -#include "hw/hw.h" #include "hw/ssi/ssi.h" #include "qemu/fifo8.h" #include "qom/object.h" diff --git a/include/hw/tricore/tricore_testdevice.h b/include/hw/tricore/t= ricore_testdevice.h index 1e2b8942ac..8b4fe15f24 100644 --- a/include/hw/tricore/tricore_testdevice.h +++ b/include/hw/tricore/tricore_testdevice.h @@ -19,7 +19,6 @@ #define HW_TRICORE_TESTDEVICE_H =20 #include "hw/sysbus.h" -#include "hw/hw.h" =20 #define TYPE_TRICORE_TESTDEVICE "tricore_testdevice" #define TRICORE_TESTDEVICE(obj) \ diff --git a/hw/pci-host/mv64361.c b/hw/pci-host/mv64361.c index f43f33fbd9..298564f1f5 100644 --- a/hw/pci-host/mv64361.c +++ b/hw/pci-host/mv64361.c @@ -11,7 +11,6 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "hw/hw.h" #include "hw/sysbus.h" #include "hw/pci/pci_device.h" #include "hw/pci/pci_host.h" diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index a9563f4fb2..7cc375df05 100644 --- a/hw/ppc/pegasos2.c +++ b/hw/ppc/pegasos2.c @@ -10,7 +10,6 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "hw/hw.h" #include "hw/ppc/ppc.h" #include "hw/sysbus.h" #include "hw/pci/pci_host.h" diff --git a/hw/sensor/dps310.c b/hw/sensor/dps310.c index d60a18ac41..addee99b19 100644 --- a/hw/sensor/dps310.c +++ b/hw/sensor/dps310.c @@ -9,7 +9,6 @@ =20 #include "qemu/osdep.h" #include "qemu/log.h" -#include "hw/hw.h" #include "hw/i2c/i2c.h" #include "qapi/error.h" #include "qapi/visitor.h" --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497865; cv=none; d=zohomail.com; s=zohoarc; b=YHizplYty8t8eKQGD8HH2pMZFXLCL6NVbJrGBhRsCY/6fPvoqxrPNU6Zcg75pFYsh0EoZ1487/KTzxfnInp9fIMSOiZrVhm7lN6udxne+sUx0cBCoWAAOnJV+VgV1Qh1ND82wfeuNmBYPWyYKr4eyH+P0nSlE3USzwlz8+gqZ5k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497865; 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=bR+yLt3BsLKfXeFaXI6C1rcWvd6LWqjwOqUQ6ldWEp8=; b=e/yZpu8MZCH49qkg6pfLqfnF6caJZdnusePOBefOeudldLnVZx+Jmtp+040AvfvxwNhCX3+ildMCj2POteN4PhEuQcMGwu98ZL84a9EJseOqTyga2YzViXp60jv1BzT9jm4CAfFJXxnxcMQCFDbtR+CZGqzDMoQKl9M5EKO//m4= 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 1677497865294698.3882202162204; Mon, 27 Feb 2023 03:37:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbo9-0005UK-5v; Mon, 27 Feb 2023 06:36:41 -0500 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 1pWbo2-0005PB-EM for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:35 -0500 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 1pWbo0-0005eF-FA for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:33 -0500 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-298-vK-weDrCMJ6PkVgoSbiMGA-1; Mon, 27 Feb 2023 06:36:27 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7E580183B3C1; Mon, 27 Feb 2023 11:36:27 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 984C91121314; Mon, 27 Feb 2023 11:36:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497791; 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=bR+yLt3BsLKfXeFaXI6C1rcWvd6LWqjwOqUQ6ldWEp8=; b=cXKN+orbcFCFogQNXOxDFpsh1H+5hdoJS43sGFdoBDTbCnytNwP2NMAVvwj7qV2YzDxx0e OM1BrbwKBOq82DtCyJvkjz+LitgvNZEKEbuwcAf81wsqMPdpqDfk6wc+G7Tg6Q+pR3SW55 npJiNac4d1ve4E1I3F1E3nsmc1XMvPc= X-MC-Unique: vK-weDrCMJ6PkVgoSbiMGA-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Farman Subject: [PULL 03/33] hw/vfio/ccw: Simplify using DEVICE() macro Date: Mon, 27 Feb 2023 12:35:51 +0100 Message-Id: <20230227113621.58468-4-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677497866324100001 From: Philippe Mathieu-Daud=C3=A9 QOM parenthood relationship is: VFIOCCWDevice -> S390CCWDevice -> CcwDevice -> DeviceState We can directly use the QOM DEVICE() macro to get the parent object. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Eric Farman Message-Id: <20230213170145.45666-3-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/vfio/ccw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 0354737666..503de94ce1 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -618,7 +618,7 @@ static void vfio_ccw_get_device(VFIOGroup *group, VFIOC= CWDevice *vcdev, vcdev->vdev.ops =3D &vfio_ccw_ops; vcdev->vdev.type =3D VFIO_DEVICE_TYPE_CCW; vcdev->vdev.name =3D name; - vcdev->vdev.dev =3D &vcdev->cdev.parent_obj.parent_obj; + vcdev->vdev.dev =3D DEVICE(vcdev); =20 return; =20 --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497852; cv=none; d=zohomail.com; s=zohoarc; b=UCkBps4aLQYu6lD/1GyGGKaFtvCqz8BoFnrOTTDFNd0ZhZ/2AZ6BEjlksszEQVKw60sucb8gPBDpTKIKGp4ashNiGOdaeIgIAW+uTIYH86xg1Ef0TmBMBBOMweSY3h9jLGIVU189Xo3GifI+vEbpMtbvgO0aRv8d/eoQslL24BQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497852; 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=Jl85V4yF+bE/uUwIgiylKeXfLeedtsatGAppAmJc05g=; b=hdAv/4zNSO1nQDOStCdS3MBVKJplgagGTcocmwtrey+S8bXK6v2GByWgdJsuwTSZN7T2aza2N+epJCkL/UJk/LMIjlywxE0jxCpgizk0VIu00HWyvjeUqhvFfstycCS94txLvV9+RZbXhUHDMEcMvptR1HIQiO4jAGvg/vxDpzs= 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 1677497852757598.6791707190006; Mon, 27 Feb 2023 03:37:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWboB-0005W0-Tw; Mon, 27 Feb 2023 06:36:43 -0500 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 1pWbo7-0005R3-Ud for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:40 -0500 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 1pWbo2-0005ek-5H for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:35 -0500 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-184-Ur4vv3CWPYyYHmZYtrF-MQ-1; Mon, 27 Feb 2023 06:36:29 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A7B7F85CBE2; Mon, 27 Feb 2023 11:36:28 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id C23131121314; Mon, 27 Feb 2023 11:36:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497793; 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=Jl85V4yF+bE/uUwIgiylKeXfLeedtsatGAppAmJc05g=; b=JjeK7aamDUYbLdlMJFeO1piG8JwLNW2eU2KgRbLlpEhEXjtlUlpCyRFBP+y8VqcTGezx3z CKoa2icPkcsvxKkwxJIZ4ihyOyQb3wI3eiVshCR6WPZPLr4SH/OBAxUawjjuFWYUD19AoM j6NEVjtrpTvJ02IVv8vlvfoyxpec3T4= X-MC-Unique: Ur4vv3CWPYyYHmZYtrF-MQ-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Farman Subject: [PULL 04/33] hw/vfio/ccw: Use intermediate S390CCWDevice variable Date: Mon, 27 Feb 2023 12:35:52 +0100 Message-Id: <20230227113621.58468-5-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677497854240100003 From: Philippe Mathieu-Daud=C3=A9 'cdev' is VFIOCCWDevice's private parent object. Access it using the S390_CCW_DEVICE() QOM macro. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Eric Farman Message-Id: <20230213170145.45666-4-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/vfio/ccw.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 503de94ce1..2c20e3c202 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -588,9 +588,10 @@ static void vfio_ccw_put_device(VFIOCCWDevice *vcdev) static void vfio_ccw_get_device(VFIOGroup *group, VFIOCCWDevice *vcdev, Error **errp) { - char *name =3D g_strdup_printf("%x.%x.%04x", vcdev->cdev.hostid.cssid, - vcdev->cdev.hostid.ssid, - vcdev->cdev.hostid.devid); + S390CCWDevice *cdev =3D S390_CCW_DEVICE(vcdev); + char *name =3D g_strdup_printf("%x.%x.%04x", cdev->hostid.cssid, + cdev->hostid.ssid, + cdev->hostid.devid); VFIODevice *vbasedev; =20 QLIST_FOREACH(vbasedev, &group->device_list, next) { @@ -611,7 +612,7 @@ static void vfio_ccw_get_device(VFIOGroup *group, VFIOC= CWDevice *vcdev, */ vcdev->vdev.ram_block_discard_allowed =3D true; =20 - if (vfio_get_device(group, vcdev->cdev.mdevid, &vcdev->vdev, errp)) { + if (vfio_get_device(group, cdev->mdevid, &vcdev->vdev, errp)) { goto out_err; } =20 --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497919; cv=none; d=zohomail.com; s=zohoarc; b=DZUtBQizXCEt9TTPeDpj2FNlWcDS1qFAC5+HNk0aD9Lztwzub582OwieZkWtdYCZaCgpB2kPr8X0mmG1LacjCaazmIWR8hh36iWLs6DN1WVMl3ITaLIXpf36lrbRJf/jcfcTDsb2B7rpJrjDhvzrlXwzjKHNAjcba/uM1SgrJW8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497919; 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=F8+W+/l0330hUJh67l6iAzmmwGDSFspeu4+8oMy+hF4=; b=gbSTROK8R9dWZhax+MTAMQMazo3Y7z2rnrwy+5EfHwnhtYc2ch51grKf+i8juIk6aii/02fovLNPW610cynwWsb8Sd8bbVvqkcad9ZNwzcplUhf/qu7rMT6EWTnOHmf9VnX+mvpVK+FNRi6eD9c8Pr8B/M4rDm7KGps6j/Ck9/g= 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 1677497919664399.90672955535763; Mon, 27 Feb 2023 03:38:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbo9-0005Uw-TR; Mon, 27 Feb 2023 06:36:41 -0500 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 1pWbo2-0005PA-De for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:35 -0500 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 1pWbo0-0005eH-FO for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:33 -0500 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-434-AX3mnlmkOem3Rwzr0tudiw-1; Mon, 27 Feb 2023 06:36:30 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B22E13815EE3; Mon, 27 Feb 2023 11:36:29 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE0891121314; Mon, 27 Feb 2023 11:36:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497791; 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=F8+W+/l0330hUJh67l6iAzmmwGDSFspeu4+8oMy+hF4=; b=MeiLKcSza8Gi1BZMJQS2DUFFtvJGDGZw3mSzxZoJUGIP4UwZSvto2FzvuB/kNztaDIMKCI NmfYmVOaCjy+SkSJoR7zVCarr+vbWiPbruE6McmRcXW3ysJdYkxxY5zgVbn+s3J9DE94fs DD/Fh8jKWEhE9CHYxNzIGB4yqejezKU= X-MC-Unique: AX3mnlmkOem3Rwzr0tudiw-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 05/33] hw/vfio/ccw: Replace DO_UPCAST(S390CCWDevice) by S390_CCW_DEVICE() Date: Mon, 27 Feb 2023 12:35:53 +0100 Message-Id: <20230227113621.58468-6-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677497920780100001 From: Philippe Mathieu-Daud=C3=A9 Use the S390_CCW_DEVICE() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Message-Id: <20230213170145.45666-5-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/vfio/ccw.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 2c20e3c202..2ea7b4a63c 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -251,8 +251,7 @@ again: =20 static void vfio_ccw_reset(DeviceState *dev) { - CcwDevice *ccw_dev =3D DO_UPCAST(CcwDevice, parent_obj, dev); - S390CCWDevice *cdev =3D DO_UPCAST(S390CCWDevice, parent_obj, ccw_dev); + S390CCWDevice *cdev =3D S390_CCW_DEVICE(dev); VFIOCCWDevice *vcdev =3D DO_UPCAST(VFIOCCWDevice, cdev, cdev); =20 ioctl(vcdev->vdev.fd, VFIO_DEVICE_RESET); @@ -657,8 +656,7 @@ static VFIOGroup *vfio_ccw_get_group(S390CCWDevice *cde= v, Error **errp) static void vfio_ccw_realize(DeviceState *dev, Error **errp) { VFIOGroup *group; - CcwDevice *ccw_dev =3D DO_UPCAST(CcwDevice, parent_obj, dev); - S390CCWDevice *cdev =3D DO_UPCAST(S390CCWDevice, parent_obj, ccw_dev); + S390CCWDevice *cdev =3D S390_CCW_DEVICE(dev); VFIOCCWDevice *vcdev =3D DO_UPCAST(VFIOCCWDevice, cdev, cdev); S390CCWDeviceClass *cdc =3D S390_CCW_DEVICE_GET_CLASS(cdev); Error *err =3D NULL; @@ -729,8 +727,7 @@ out_err_propagate: =20 static void vfio_ccw_unrealize(DeviceState *dev) { - CcwDevice *ccw_dev =3D DO_UPCAST(CcwDevice, parent_obj, dev); - S390CCWDevice *cdev =3D DO_UPCAST(S390CCWDevice, parent_obj, ccw_dev); + S390CCWDevice *cdev =3D S390_CCW_DEVICE(dev); VFIOCCWDevice *vcdev =3D DO_UPCAST(VFIOCCWDevice, cdev, cdev); S390CCWDeviceClass *cdc =3D S390_CCW_DEVICE_GET_CLASS(cdev); VFIOGroup *group =3D vcdev->vdev.group; --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497880; cv=none; d=zohomail.com; s=zohoarc; b=Ky9x0ze0CctxwqpRIPt17YFvDbDqnd4owAxfo6rekCB00ea3dGU7NZNiuQumKqZWHy3ujJcUyL2twM0x31VQXWw2s7SsBLaR00nqxHVl/C/a8zCnLU6S6u3VGi30B9dMqSkDp4XGSlz08lDXhmXygHzqxZxQKpTGQoWbw5lKqrg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497880; 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=glytSs2pWzm45dgiOYImbDeuuZoq6m1kxVGdLQjZoqk=; b=nbqvYFDsozrn+wy/1+3Ndv8qA3B25FxfL/3rbEtTJ11zeno1jWXGJq0PDp4T7IzvfkiEsJ75mAHngRRpKO7Ee2LWrML9fNVA+WzWJcg2DtE6vRgGiFxurvlAsE8NNglN/o8JakJjlT26vpciET+2GLDbTEpApYjT5RSC40khd5c= 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 167749788060943.701844491906286; Mon, 27 Feb 2023 03:38:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbo9-0005UI-2l; Mon, 27 Feb 2023 06:36:41 -0500 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 1pWbo3-0005Ps-GV for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:35 -0500 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 1pWbo1-0005eb-7z for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:34 -0500 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-417-chJp-IYOOja_ZqGXsNoJsw-1; Mon, 27 Feb 2023 06:36:31 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DF7FE830F81; Mon, 27 Feb 2023 11:36:30 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 022BD1121314; Mon, 27 Feb 2023 11:36:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497792; 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=glytSs2pWzm45dgiOYImbDeuuZoq6m1kxVGdLQjZoqk=; b=SLpjYVLUp63Q2BjrbCk0jwx4at3TvTwJIXE4/xpkb3hWl8Hnh2G/+RerYvsI5t6XFDQh04 Lm/SMaA2ijorcplMt50DFOAWMtSH+LipNkBW1jRHEprtTLQTRy31wnEyLkZ5gdXr97IIIB 0yaaLUbuhp/pSCqcdbY2qR0VX63PC4U= X-MC-Unique: chJp-IYOOja_ZqGXsNoJsw-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Farman Subject: [PULL 06/33] hw/vfio/ccw: Remove pointless S390CCWDevice variable Date: Mon, 27 Feb 2023 12:35:54 +0100 Message-Id: <20230227113621.58468-7-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677497882388100015 From: Philippe Mathieu-Daud=C3=A9 QOM parenthood relationship is: VFIOCCWDevice -> S390CCWDevice -> CcwDevice -> DeviceState No need to double-cast, call CCW_DEVICE() on VFIOCCWDevice. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Eric Farman Message-Id: <20230213170145.45666-6-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/vfio/ccw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 2ea7b4a63c..cd66b66742 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -314,8 +314,7 @@ static void vfio_ccw_io_notifier_handler(void *opaque) { VFIOCCWDevice *vcdev =3D opaque; struct ccw_io_region *region =3D vcdev->io_region; - S390CCWDevice *cdev =3D S390_CCW_DEVICE(vcdev); - CcwDevice *ccw_dev =3D CCW_DEVICE(cdev); + CcwDevice *ccw_dev =3D CCW_DEVICE(vcdev); SubchDev *sch =3D ccw_dev->sch; SCHIB *schib =3D &sch->curr_status; SCSW s; --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498083; cv=none; d=zohomail.com; s=zohoarc; b=Qdj9Pn/JSykfH22qLwD5h0Q/BVXfMhjT7OenrUkFGzE+u0+ghpYlNa1/W3bMXFCmkTNX6aamha9BQStdL2kMpS1uEU73hKwWVbL9nTncSBz7EgBg0jSF27iqH/ChPN6kepOr+xS+TeLzs3HoJTFGBjy3iSJvXbO5PT69OFYwwxo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498083; 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=aO3EBuZP2ABmdi0vBlEipdhvCOE2f/2c5NmCr4yWzzE=; b=chpOoQdfFiWErw/wjxQrABOxeA251Uh2vq0Q2ui8tD9sdZPosrmDVKyAEFrY962XaJevlVub92llWstktQyPEITRJFwJ8c3jIsT2p+jsOeXCVBnXnsfbRYhg+Fa3/XwDlW7B8N59VPKszlBEDN2Q5lEaHZIpmC4VArlRsfJxfHw= 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 1677498083262839.0398751718976; Mon, 27 Feb 2023 03:41:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWboC-0005W3-0r; Mon, 27 Feb 2023 06:36:44 -0500 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 1pWbo9-0005UO-9U for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:41 -0500 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 1pWbo7-0005fL-Ha for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:41 -0500 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-194-4CsjKjLZNQKgl1PqBDmo3Q-1; Mon, 27 Feb 2023 06:36:32 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 183013C0E445; Mon, 27 Feb 2023 11:36:32 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F88D1121314; Mon, 27 Feb 2023 11:36:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497795; 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=aO3EBuZP2ABmdi0vBlEipdhvCOE2f/2c5NmCr4yWzzE=; b=NIj5qutHob3FV2bhnKcM45xRTYCxMUy/o3D+R3gc/3GPNdAmg0AqoK2Svi0PSZUx6edYjj CnfEk6AbzoVg56aAVEVxByjnr7L55YfB06MyZTY5l+09AZ0IhpDHfMZ0s5kHLmQVCoetW4 kI7SPxGetApJUWBsQ0Ms6cr5yV4tfQA= X-MC-Unique: 4CsjKjLZNQKgl1PqBDmo3Q-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Farman Subject: [PULL 07/33] hw/vfio/ccw: Replace DO_UPCAST(VFIOCCWDevice) by VFIO_CCW() Date: Mon, 27 Feb 2023 12:35:55 +0100 Message-Id: <20230227113621.58468-8-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677498083979100001 From: Philippe Mathieu-Daud=C3=A9 Use the VFIO_CCW() QOM type-checking macro to avoid DO_UPCAST(). Reviewed-by: Eric Farman Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230213170145.45666-7-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/vfio/ccw.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index cd66b66742..1e2fce83b0 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -76,8 +76,7 @@ struct VFIODeviceOps vfio_ccw_ops =3D { =20 static IOInstEnding vfio_ccw_handle_request(SubchDev *sch) { - S390CCWDevice *cdev =3D sch->driver_data; - VFIOCCWDevice *vcdev =3D DO_UPCAST(VFIOCCWDevice, cdev, cdev); + VFIOCCWDevice *vcdev =3D VFIO_CCW(sch->driver_data); struct ccw_io_region *region =3D vcdev->io_region; int ret; =20 @@ -125,8 +124,7 @@ again: =20 static IOInstEnding vfio_ccw_handle_store(SubchDev *sch) { - S390CCWDevice *cdev =3D sch->driver_data; - VFIOCCWDevice *vcdev =3D DO_UPCAST(VFIOCCWDevice, cdev, cdev); + VFIOCCWDevice *vcdev =3D VFIO_CCW(sch->driver_data); SCHIB *schib =3D &sch->curr_status; struct ccw_schib_region *region =3D vcdev->schib_region; SCHIB *s; @@ -170,8 +168,7 @@ static IOInstEnding vfio_ccw_handle_store(SubchDev *sch) =20 static int vfio_ccw_handle_clear(SubchDev *sch) { - S390CCWDevice *cdev =3D sch->driver_data; - VFIOCCWDevice *vcdev =3D DO_UPCAST(VFIOCCWDevice, cdev, cdev); + VFIOCCWDevice *vcdev =3D VFIO_CCW(sch->driver_data); struct ccw_cmd_region *region =3D vcdev->async_cmd_region; int ret; =20 @@ -210,8 +207,7 @@ again: =20 static int vfio_ccw_handle_halt(SubchDev *sch) { - S390CCWDevice *cdev =3D sch->driver_data; - VFIOCCWDevice *vcdev =3D DO_UPCAST(VFIOCCWDevice, cdev, cdev); + VFIOCCWDevice *vcdev =3D VFIO_CCW(sch->driver_data); struct ccw_cmd_region *region =3D vcdev->async_cmd_region; int ret; =20 @@ -251,8 +247,7 @@ again: =20 static void vfio_ccw_reset(DeviceState *dev) { - S390CCWDevice *cdev =3D S390_CCW_DEVICE(dev); - VFIOCCWDevice *vcdev =3D DO_UPCAST(VFIOCCWDevice, cdev, cdev); + VFIOCCWDevice *vcdev =3D VFIO_CCW(dev); =20 ioctl(vcdev->vdev.fd, VFIO_DEVICE_RESET); } @@ -656,7 +651,7 @@ static void vfio_ccw_realize(DeviceState *dev, Error **= errp) { VFIOGroup *group; S390CCWDevice *cdev =3D S390_CCW_DEVICE(dev); - VFIOCCWDevice *vcdev =3D DO_UPCAST(VFIOCCWDevice, cdev, cdev); + VFIOCCWDevice *vcdev =3D VFIO_CCW(cdev); S390CCWDeviceClass *cdc =3D S390_CCW_DEVICE_GET_CLASS(cdev); Error *err =3D NULL; =20 @@ -727,7 +722,7 @@ out_err_propagate: static void vfio_ccw_unrealize(DeviceState *dev) { S390CCWDevice *cdev =3D S390_CCW_DEVICE(dev); - VFIOCCWDevice *vcdev =3D DO_UPCAST(VFIOCCWDevice, cdev, cdev); + VFIOCCWDevice *vcdev =3D VFIO_CCW(cdev); S390CCWDeviceClass *cdc =3D S390_CCW_DEVICE_GET_CLASS(cdev); VFIOGroup *group =3D vcdev->vdev.group; =20 --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497930; cv=none; d=zohomail.com; s=zohoarc; b=Qdfk2+dmvMQ85/yCadPQf1hKQqFaBvMsptbXs/ciKs5qfO0dD8HaSRTD5Y8wMWU6GNfhpsag1s6FR0H5qZVCNPY00U0ZPe+cVzp4t6Jkjkpz8CfJ5ubSL4mXk5tx77XH1GakNZXzJel11Oh5ZAUDyuB59uYwZk4Vht6C7ns9go0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497930; 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=Y8hPVKS129O4OqRumpSDuzuvxgt1IK9M7brEl9I5epE=; b=Ye77g8KbQyx9SaF4MhNwmkgb3/DfFPa34KL+ZdpKTd0zS5sGUlM6Iw2BSrVOAJUUWvovtnWAFeiyRQ0QyFuBo9KxhjOCxvXuh+S+4yGrsUiSkuV7Ou3vbMb8uIcndHEcdH57R9ICmWiwVYmlweND/P4LdszSpZgsjM0JGrEbhEc= 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 1677497930067817.8262147321726; Mon, 27 Feb 2023 03:38:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWboC-0005WF-8Y; Mon, 27 Feb 2023 06:36:44 -0500 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 1pWbo9-0005UL-50 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:41 -0500 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 1pWbo7-0005fP-Mg for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:40 -0500 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-552-gjFhKlkYMAqcDc-QmrxZ_A-1; Mon, 27 Feb 2023 06:36:33 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 65C5C830F82; Mon, 27 Feb 2023 11:36:33 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DFD11121314; Mon, 27 Feb 2023 11:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497797; 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=Y8hPVKS129O4OqRumpSDuzuvxgt1IK9M7brEl9I5epE=; b=h0itrQfW5/8A9nxiHK/14Vmylo4l2v1uD9kCxt6lLE57oh2oQgq+YhmmJ/t5bcNHD15oVn KUs2QnMYJE9g0j0MtpmRSnfCF4P3F2kRQUotKpcPJzrac5oIi774djDQ7dCxPGO5XxYGut K8CKLm5nutRNXh+EFEEFPa5QI+zasT0= X-MC-Unique: gjFhKlkYMAqcDc-QmrxZ_A-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Sebastian Mitterle , Janosch Frank , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 08/33] target/s390x/arch_dump: Fix memory corruption in s390x_write_elf64_notes() Date: Mon, 27 Feb 2023 12:35:56 +0100 Message-Id: <20230227113621.58468-9-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677497930750100005 "note_size" can be smaller than sizeof(note), so unconditionally calling memset(notep, 0, sizeof(note)) could cause a memory corruption here in case notep has been allocated dynamically, thus let's use note_size as length argument for memset() instead. Reported-by: Sebastian Mitterle Fixes: 113d8f4e95 ("s390x: pv: Add dump support") Message-Id: <20230214141056.680969-1-thuth@redhat.com> Reviewed-by: Janosch Frank Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- target/s390x/arch_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c index a2329141e8..a7c44ba49d 100644 --- a/target/s390x/arch_dump.c +++ b/target/s390x/arch_dump.c @@ -248,7 +248,7 @@ static int s390x_write_elf64_notes(const char *note_nam= e, notep =3D g_malloc(note_size); } =20 - memset(notep, 0, sizeof(note)); + memset(notep, 0, note_size); =20 /* Setup note header data */ notep->hdr.n_descsz =3D cpu_to_be32(content_size); --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498061; cv=none; d=zohomail.com; s=zohoarc; b=hoqUjofAQmHt2+i0yLaVNqRaW+Xn/lUpLUFHUxgwm3+cODSG73TtgvS+admNqTVYweBrNxdKpGtbkqc8ZCbpc3G8Vq28v+53ikE3KPWL3G/XVRKLYKklr/QKZAEmWQ43tqxSqAaxEGwLX23QpyVSQQaqZn3MJ8FOxdf1IISBxfA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498061; 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=3HG6jRm/qjM4kk0nXdEquLhIJKaa+w72K1oXuqkJeUs=; b=VipXW6eakwF5nRZ9tmYirQqKc4RR1BC3Exn62lD+sOdoACfULJ9OfEWkGkPkIdQ27UYwb7dBTKKLrtv+a/9R+K0IgD91QiovazFBgMuy3urK8oROt71+shIkJg/H/RIkrx3r0VX29y0nUXyybVeEuKDwrfu7F1m0C3AglF7deVw= 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 1677498061400238.24888841757752; Mon, 27 Feb 2023 03:41:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWboC-0005X0-PC; Mon, 27 Feb 2023 06:36:44 -0500 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 1pWboA-0005VQ-LU for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:42 -0500 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 1pWbo7-0005fV-Oi for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:42 -0500 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-635-Ijyemj6eMXWI0NfPLGK2fw-1; Mon, 27 Feb 2023 06:36:34 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 691803815EE3; Mon, 27 Feb 2023 11:36:34 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id A72901121314; Mon, 27 Feb 2023 11:36:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497798; 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=3HG6jRm/qjM4kk0nXdEquLhIJKaa+w72K1oXuqkJeUs=; b=ejMiRkssB5/D0WQRXp/eD2HVhjtbsQPfgNs0kmFXNdhpVIFg6cwlZgTCaLd7IqPI1peD6p qPP4jR6MV1iNuZbf96EnPFuqdnTHc0UxwIMQFY22gM9rQbHZ7vE03CPYSXCVrpUL2m4wof 5wKlpkt+tR6rSciAjJDJldpuOhL3Xps= X-MC-Unique: Ijyemj6eMXWI0NfPLGK2fw-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 09/33] target/s390x/arch_dump: Simplify memory allocation in s390x_write_elf64_notes() Date: Mon, 27 Feb 2023 12:35:57 +0100 Message-Id: <20230227113621.58468-10-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677498061683100005 We are not on a hot path here, so there is no real need for the logic here with the split heap and stack space allocation. Simplify it by always allocating memory from the heap. Suggested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230215085703.746788-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- target/s390x/arch_dump.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c index a7c44ba49d..cb98f4894d 100644 --- a/target/s390x/arch_dump.c +++ b/target/s390x/arch_dump.c @@ -227,25 +227,25 @@ static int s390x_write_elf64_notes(const char *note_n= ame, DumpState *s, const NoteFuncDesc *funcs) { - Note note, *notep; + g_autofree Note *notep =3D NULL; const NoteFuncDesc *nf; - int note_size, content_size; + int note_size, prev_size =3D 0, content_size; int ret =3D -1; =20 - assert(strlen(note_name) < sizeof(note.name)); + assert(strlen(note_name) < sizeof(notep->name)); =20 for (nf =3D funcs; nf->note_contents_func; nf++) { - notep =3D ¬e; if (nf->pvonly && !s390_is_pv()) { continue; } =20 content_size =3D nf->note_size_func ? nf->note_size_func() : nf->c= ontents_size; - note_size =3D sizeof(note) - sizeof(notep->contents) + content_siz= e; + note_size =3D sizeof(Note) - sizeof(notep->contents) + content_siz= e; =20 - /* Notes with dynamic sizes need to allocate a note */ - if (nf->note_size_func) { + if (prev_size < note_size) { + g_free(notep); notep =3D g_malloc(note_size); + prev_size =3D note_size; } =20 memset(notep, 0, note_size); @@ -258,15 +258,9 @@ static int s390x_write_elf64_notes(const char *note_na= me, /* Get contents and write them out */ (*nf->note_contents_func)(notep, cpu, id); ret =3D f(notep, note_size, s); - - if (nf->note_size_func) { - g_free(notep); - } - if (ret < 0) { return -1; } - } =20 return 0; --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498061; cv=none; d=zohomail.com; s=zohoarc; b=h4PaWH58eBQnxnzENOKsGcPhSeb/9TrKDC5ZUPR3COn4hDCuPu5ZcatxgAwq+mO4g+dtER/XZHLXAl/wl5R3g3z2fPwE68Mt54QRQrTqfWyuU4Ga8i2lhYD2arvXLKHWgvbtz1ZC0IAMQvbgZutltsk5CfLvuEEGOTkI/rg1wQQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498061; 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=QKAMphEjWC3G2kT87C3UlKB2yZG6Vl47kFoNLNmNTk8=; b=d7ER3GdWl1YytfN8X38yse4R2Gm8B+t3qP9xHqG5Ky0SGREN3EoZxLTRNHH54wmZbK0T5dWqvZmpD68wWydEP9XC4gKJ3l9wyQMKkzXup69IiwnzCmpFmLPqD1UcS2pWxoutYRy+kqujn7hLBmiLew4/45d0VJy82C4i5a7Yenw= 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 1677498061403819.8313150439856; Mon, 27 Feb 2023 03:41:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWboK-0005hk-Cx; Mon, 27 Feb 2023 06:36:52 -0500 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 1pWboF-0005dr-BR for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:47 -0500 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 1pWboD-0005gq-Fc for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:46 -0500 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-562-aPiggFU8NHWU9mlI2j3wGw-1; Mon, 27 Feb 2023 06:36:36 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 998F83C0E445; Mon, 27 Feb 2023 11:36:35 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id AE9BA1121314; Mon, 27 Feb 2023 11:36:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497804; 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=QKAMphEjWC3G2kT87C3UlKB2yZG6Vl47kFoNLNmNTk8=; b=FNy2QCbjjojcG5yXcS4vTCmxdxh8N7tD5A0NmHxmalOyyO2F0tXh2lGCLTHNztElWvQZAr klFRjbPz9vQin9EDHpqot5m0T1YsdKlqUoba2SfDmASFkUwbgXAIp2+6ROExnTyeNMJqfY KD2j3OVh/WE4LJR7VyG3VvBVLJQSOk0= X-MC-Unique: aPiggFU8NHWU9mlI2j3wGw-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Richard Henderson , David Hildenbrand Subject: [PULL 10/33] target/s390x: Fix s390_probe_access for user-only Date: Mon, 27 Feb 2023 12:35:58 +0100 Message-Id: <20230227113621.58468-11-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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 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: 1677498061684100006 Content-Type: text/plain; charset="utf-8" From: Richard Henderson In db9aab5783a2 we broke the contract of s390_probe_access, in that it no longer returned an exception code, nor set __excp_addr. Fix both. Reported-by: David Hildenbrand Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand Message-Id: <20230109201856.3916639-2-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/mem_helper.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index d6725fd18c..9a6dce4cda 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -138,23 +138,27 @@ typedef struct S390Access { * For !CONFIG_USER_ONLY, the TEC is stored stored to env->tlb_fill_tec. * For CONFIG_USER_ONLY, the faulting address is stored to env->__excp_add= r. */ -static int s390_probe_access(CPUArchState *env, target_ulong addr, int siz= e, - MMUAccessType access_type, int mmu_idx, - bool nonfault, void **phost, uintptr_t ra) +static inline int s390_probe_access(CPUArchState *env, target_ulong addr, + int size, MMUAccessType access_type, + int mmu_idx, bool nonfault, + void **phost, uintptr_t ra) { -#if defined(CONFIG_USER_ONLY) - return probe_access_flags(env, addr, access_type, mmu_idx, - nonfault, phost, ra); -#else - int flags; + int flags =3D probe_access_flags(env, addr, access_type, mmu_idx, + nonfault, phost, ra); =20 - env->tlb_fill_exc =3D 0; - flags =3D probe_access_flags(env, addr, access_type, mmu_idx, nonfault= , phost, - ra); - if (env->tlb_fill_exc) { + if (unlikely(flags & TLB_INVALID_MASK)) { + assert(!nonfault); +#ifdef CONFIG_USER_ONLY + /* Address is in TEC in system mode; see s390_cpu_record_sigsegv. = */ + env->__excp_addr =3D addr & TARGET_PAGE_MASK; + return (page_get_flags(addr) & PAGE_VALID + ? PGM_PROTECTION : PGM_ADDRESSING); +#else return env->tlb_fill_exc; +#endif } =20 +#ifndef CONFIG_USER_ONLY if (unlikely(flags & TLB_WATCHPOINT)) { /* S390 does not presently use transaction attributes. */ cpu_check_watchpoint(env_cpu(env), addr, size, @@ -162,8 +166,9 @@ static int s390_probe_access(CPUArchState *env, target_= ulong addr, int size, (access_type =3D=3D MMU_DATA_STORE ? BP_MEM_WRITE : BP_MEM_READ), ra); } - return 0; #endif + + return 0; } =20 static int access_prepare_nf(S390Access *access, CPUS390XState *env, --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497890; cv=none; d=zohomail.com; s=zohoarc; b=JxxlxZ+Tac0etoD6sxJMVpwD5RI9ve1vKU6J/7dAFdaqFX0dItnOwLpPeh5YSB7WfC2Hw8stJ6GRY2EGzUPkMqkPW0CVF5dhp1dZLkjMZULW72XAkANZJDA+8v/MqhG9f1szKNrjgv8mqCaQFrJesRAF2cOdQ+V2PZ86X3ioBIk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497890; 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=uAKwmeTOeyn7JLLAVF91NlLOO4Jtbx8guz8PqtxwXWo=; b=YtNPAz+JJ7/FyRk4uyxpYCYKfc98kOfhQbREH1gaudGcvwc/uIhhfMlWpD6+ZQq0yERIOtgaphIi1vCadrAjKTp3thIxxEepOFv/BGlZ4xcHUB3kuoNcqW/Kl4qz+ASSWOEpspqL/hkm7BgLHLdrMNNLnDUGyIL3zPjzhguadi0= 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 1677497890721130.1199176038224; Mon, 27 Feb 2023 03:38:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWboL-0005mW-59; Mon, 27 Feb 2023 06:36:53 -0500 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 1pWboB-0005Vo-7u for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:43 -0500 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 1pWbo8-0005fo-SM for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:42 -0500 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-629-QMhUR_nSMJa4yJPLCaIgxA-1; Mon, 27 Feb 2023 06:36:37 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CC43C3815EEC; Mon, 27 Feb 2023 11:36:36 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id DFAA51121314; Mon, 27 Feb 2023 11:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497800; 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=uAKwmeTOeyn7JLLAVF91NlLOO4Jtbx8guz8PqtxwXWo=; b=g/ikOSqDMida5zsGvwnzoDQvOYFSQSq5Past3Vp6e8Y3cpTwrPepSTvnFos4gviIKjK8m6 NY+l/Rj/li9HThOG5jwA94Azi7IJ2VURiUxNaBVZrLqZ5GSaSujGndMW+EsG4OMW8zrkq2 p0DqIHgYXuSE8HkUX8xd95qyqS/TNBU= X-MC-Unique: QMhUR_nSMJa4yJPLCaIgxA-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Richard Henderson , David Hildenbrand Subject: [PULL 11/33] target/s390x: Pass S390Access pointer into access_prepare Date: Mon, 27 Feb 2023 12:35:59 +0100 Message-Id: <20230227113621.58468-12-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677497892436100003 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Passing a pointer from the caller down to access_prepare_nf eliminates a structure copy. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand Message-Id: <20230109201856.3916639-3-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/mem_helper.c | 100 +++++++++++++++++----------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 9a6dce4cda..28bf3bd53c 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -212,15 +212,14 @@ static int access_prepare_nf(S390Access *access, CPUS= 390XState *env, return 0; } =20 -static S390Access access_prepare(CPUS390XState *env, vaddr vaddr, int size, - MMUAccessType access_type, int mmu_idx, - uintptr_t ra) +static inline void access_prepare(S390Access *ret, CPUS390XState *env, + vaddr vaddr, int size, + MMUAccessType access_type, int mmu_idx, + uintptr_t ra) { - S390Access ret; - int exc =3D access_prepare_nf(&ret, env, false, vaddr, size, + int exc =3D access_prepare_nf(ret, env, false, vaddr, size, access_type, mmu_idx, ra); assert(!exc); - return ret; } =20 /* Helper to handle memset on a single page. */ @@ -412,9 +411,9 @@ static uint32_t do_helper_nc(CPUS390XState *env, uint32= _t l, uint64_t dest, /* NC always processes one more byte than specified - maximum is 256 */ l++; =20 - srca1 =3D access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra); - srca2 =3D access_prepare(env, dest, l, MMU_DATA_LOAD, mmu_idx, ra); - desta =3D access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra); + access_prepare(&srca1, env, src, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&srca2, env, dest, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra); for (i =3D 0; i < l; i++) { const uint8_t x =3D access_get_byte(env, &srca1, i, ra) & access_get_byte(env, &srca2, i, ra); @@ -446,9 +445,9 @@ static uint32_t do_helper_xc(CPUS390XState *env, uint32= _t l, uint64_t dest, /* XC always processes one more byte than specified - maximum is 256 */ l++; =20 - srca1 =3D access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra); - srca2 =3D access_prepare(env, dest, l, MMU_DATA_LOAD, mmu_idx, ra); - desta =3D access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra); + access_prepare(&srca1, env, src, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&srca2, env, dest, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra); =20 /* xor with itself is the same as memset(0) */ if (src =3D=3D dest) { @@ -487,9 +486,9 @@ static uint32_t do_helper_oc(CPUS390XState *env, uint32= _t l, uint64_t dest, /* OC always processes one more byte than specified - maximum is 256 */ l++; =20 - srca1 =3D access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra); - srca2 =3D access_prepare(env, dest, l, MMU_DATA_LOAD, mmu_idx, ra); - desta =3D access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra); + access_prepare(&srca1, env, src, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&srca2, env, dest, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra); for (i =3D 0; i < l; i++) { const uint8_t x =3D access_get_byte(env, &srca1, i, ra) | access_get_byte(env, &srca2, i, ra); @@ -520,8 +519,8 @@ static uint32_t do_helper_mvc(CPUS390XState *env, uint3= 2_t l, uint64_t dest, /* MVC always copies one more byte than specified - maximum is 256 */ l++; =20 - srca =3D access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra); - desta =3D access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra); + access_prepare(&srca, env, src, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra); =20 /* * "When the operands overlap, the result is obtained as if the operan= ds @@ -559,8 +558,8 @@ void HELPER(mvcrl)(CPUS390XState *env, uint64_t l, uint= 64_t dest, uint64_t src) /* MVCRL always copies one more byte than specified - maximum is 256 */ l++; =20 - srca =3D access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra); - desta =3D access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra); + access_prepare(&srca, env, src, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra); =20 for (i =3D l - 1; i >=3D 0; i--) { uint8_t byte =3D access_get_byte(env, &srca, i, ra); @@ -580,8 +579,8 @@ void HELPER(mvcin)(CPUS390XState *env, uint32_t l, uint= 64_t dest, uint64_t src) l++; =20 src =3D wrap_address(env, src - l + 1); - srca =3D access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra); - desta =3D access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra); + access_prepare(&srca, env, src, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra); for (i =3D 0; i < l; i++) { const uint8_t x =3D access_get_byte(env, &srca, l - i - 1, ra); =20 @@ -600,9 +599,9 @@ void HELPER(mvn)(CPUS390XState *env, uint32_t l, uint64= _t dest, uint64_t src) /* MVN always copies one more byte than specified - maximum is 256 */ l++; =20 - srca1 =3D access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra); - srca2 =3D access_prepare(env, dest, l, MMU_DATA_LOAD, mmu_idx, ra); - desta =3D access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra); + access_prepare(&srca1, env, src, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&srca2, env, dest, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra); for (i =3D 0; i < l; i++) { const uint8_t x =3D (access_get_byte(env, &srca1, i, ra) & 0x0f) | (access_get_byte(env, &srca2, i, ra) & 0xf0); @@ -623,8 +622,8 @@ void HELPER(mvo)(CPUS390XState *env, uint32_t l, uint64= _t dest, uint64_t src) S390Access srca, desta; int i, j; =20 - srca =3D access_prepare(env, src, len_src, MMU_DATA_LOAD, mmu_idx, ra); - desta =3D access_prepare(env, dest, len_dest, MMU_DATA_STORE, mmu_idx,= ra); + access_prepare(&srca, env, src, len_src, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&desta, env, dest, len_dest, MMU_DATA_STORE, mmu_idx, r= a); =20 /* Handle rightmost byte */ byte_dest =3D cpu_ldub_data_ra(env, dest + len_dest - 1, ra); @@ -656,9 +655,9 @@ void HELPER(mvz)(CPUS390XState *env, uint32_t l, uint64= _t dest, uint64_t src) /* MVZ always copies one more byte than specified - maximum is 256 */ l++; =20 - srca1 =3D access_prepare(env, src, l, MMU_DATA_LOAD, mmu_idx, ra); - srca2 =3D access_prepare(env, dest, l, MMU_DATA_LOAD, mmu_idx, ra); - desta =3D access_prepare(env, dest, l, MMU_DATA_STORE, mmu_idx, ra); + access_prepare(&srca1, env, src, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&srca2, env, dest, l, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&desta, env, dest, l, MMU_DATA_STORE, mmu_idx, ra); for (i =3D 0; i < l; i++) { const uint8_t x =3D (access_get_byte(env, &srca1, i, ra) & 0xf0) | (access_get_byte(env, &srca2, i, ra) & 0x0f); @@ -1002,8 +1001,8 @@ uint32_t HELPER(mvst)(CPUS390XState *env, uint32_t r1= , uint32_t r2) * this point). We might over-indicate watchpoints within the pages * (if we ever care, we have to limit processing to a single byte). */ - srca =3D access_prepare(env, s, len, MMU_DATA_LOAD, mmu_idx, ra); - desta =3D access_prepare(env, d, len, MMU_DATA_STORE, mmu_idx, ra); + access_prepare(&srca, env, s, len, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&desta, env, d, len, MMU_DATA_STORE, mmu_idx, ra); for (i =3D 0; i < len; i++) { const uint8_t v =3D access_get_byte(env, &srca, i, ra); =20 @@ -1090,19 +1089,19 @@ static inline uint32_t do_mvcl(CPUS390XState *env, len =3D MIN(MIN(*srclen, -(*src | TARGET_PAGE_MASK)), len); *destlen -=3D len; *srclen -=3D len; - srca =3D access_prepare(env, *src, len, MMU_DATA_LOAD, mmu_idx, ra= ); - desta =3D access_prepare(env, *dest, len, MMU_DATA_STORE, mmu_idx,= ra); + access_prepare(&srca, env, *src, len, MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&desta, env, *dest, len, MMU_DATA_STORE, mmu_idx, r= a); access_memmove(env, &desta, &srca, ra); *src =3D wrap_address(env, *src + len); *dest =3D wrap_address(env, *dest + len); } else if (wordsize =3D=3D 1) { /* Pad the remaining area */ *destlen -=3D len; - desta =3D access_prepare(env, *dest, len, MMU_DATA_STORE, mmu_idx,= ra); + access_prepare(&desta, env, *dest, len, MMU_DATA_STORE, mmu_idx, r= a); access_memset(env, &desta, pad, ra); *dest =3D wrap_address(env, *dest + len); } else { - desta =3D access_prepare(env, *dest, len, MMU_DATA_STORE, mmu_idx,= ra); + access_prepare(&desta, env, *dest, len, MMU_DATA_STORE, mmu_idx, r= a); =20 /* The remaining length selects the padding byte. */ for (i =3D 0; i < len; (*destlen)--, i++) { @@ -1158,16 +1157,16 @@ uint32_t HELPER(mvcl)(CPUS390XState *env, uint32_t = r1, uint32_t r2) while (destlen) { cur_len =3D MIN(destlen, -(dest | TARGET_PAGE_MASK)); if (!srclen) { - desta =3D access_prepare(env, dest, cur_len, MMU_DATA_STORE, m= mu_idx, - ra); + access_prepare(&desta, env, dest, cur_len, + MMU_DATA_STORE, mmu_idx, ra); access_memset(env, &desta, pad, ra); } else { cur_len =3D MIN(MIN(srclen, -(src | TARGET_PAGE_MASK)), cur_le= n); =20 - srca =3D access_prepare(env, src, cur_len, MMU_DATA_LOAD, mmu_= idx, - ra); - desta =3D access_prepare(env, dest, cur_len, MMU_DATA_STORE, m= mu_idx, - ra); + access_prepare(&srca, env, src, cur_len, + MMU_DATA_LOAD, mmu_idx, ra); + access_prepare(&desta, env, dest, cur_len, + MMU_DATA_STORE, mmu_idx, ra); access_memmove(env, &desta, &srca, ra); src =3D wrap_address(env, src + cur_len); srclen -=3D cur_len; @@ -2272,8 +2271,8 @@ uint32_t HELPER(mvcs)(CPUS390XState *env, uint64_t l,= uint64_t a1, uint64_t a2, return cc; } =20 - srca =3D access_prepare(env, a2, l, MMU_DATA_LOAD, MMU_PRIMARY_IDX, ra= ); - desta =3D access_prepare(env, a1, l, MMU_DATA_STORE, MMU_SECONDARY_IDX= , ra); + access_prepare(&srca, env, a2, l, MMU_DATA_LOAD, MMU_PRIMARY_IDX, ra); + access_prepare(&desta, env, a1, l, MMU_DATA_STORE, MMU_SECONDARY_IDX, = ra); access_memmove(env, &desta, &srca, ra); return cc; } @@ -2306,9 +2305,8 @@ uint32_t HELPER(mvcp)(CPUS390XState *env, uint64_t l,= uint64_t a1, uint64_t a2, } else if (!l) { return cc; } - - srca =3D access_prepare(env, a2, l, MMU_DATA_LOAD, MMU_SECONDARY_IDX, = ra); - desta =3D access_prepare(env, a1, l, MMU_DATA_STORE, MMU_PRIMARY_IDX, = ra); + access_prepare(&srca, env, a2, l, MMU_DATA_LOAD, MMU_SECONDARY_IDX, ra= ); + access_prepare(&desta, env, a1, l, MMU_DATA_STORE, MMU_PRIMARY_IDX, ra= ); access_memmove(env, &desta, &srca, ra); return cc; } @@ -2649,10 +2647,12 @@ uint32_t HELPER(mvcos)(CPUS390XState *env, uint64_t= dest, uint64_t src, =20 /* FIXME: Access using correct keys and AR-mode */ if (len) { - S390Access srca =3D access_prepare(env, src, len, MMU_DATA_LOAD, - mmu_idx_from_as(src_as), ra); - S390Access desta =3D access_prepare(env, dest, len, MMU_DATA_STORE, - mmu_idx_from_as(dest_as), ra); + S390Access srca, desta; + + access_prepare(&srca, env, src, len, MMU_DATA_LOAD, + mmu_idx_from_as(src_as), ra); + access_prepare(&desta, env, dest, len, MMU_DATA_STORE, + mmu_idx_from_as(dest_as), ra); =20 access_memmove(env, &desta, &srca, ra); } --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497919; cv=none; d=zohomail.com; s=zohoarc; b=gZli3klfSM9R/X7xjZGM07sF81voUhia+JFgWqVssHVCxC3tZv552M1fwKjo55JnaBbK/h4dUQ4Z5PCMoJyHX0vZbHMitCncaZ1/mCyeEZoQ+2y6KhbFWv4qegneDpRuEJdFv2Quw0X8sk9np/W1M5OjZVx9SB90ti8NrbvQbZo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497919; 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=PCSd52Fbr0D7r676adp3wM+pVSJrvc7Kl8d9UhYqqXU=; b=BkjSN+VHx3hiYO22OjLkWsOmzhhuturOXvShvecsx/AnHlV/rTB7Ogf/bbmBT8jF8h+3m6BBZCCQuU+K6tQ0h8D5SKAnvb2qa0ymoeCThXY1uS8SaqCYb3AuzQ7PGBT8eHxdFBzytASJPrgY4uugWiDC0W5W7ngL3A6g5RuJfqk= 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 1677497919474414.57588738997504; Mon, 27 Feb 2023 03:38:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWboD-0005Xy-Ib; Mon, 27 Feb 2023 06:36:45 -0500 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 1pWboB-0005W2-Uk for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:43 -0500 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 1pWboA-0005g9-7m for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:43 -0500 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-158-SAO2k0WjNwKSZhZOq0aZ0w-1; Mon, 27 Feb 2023 06:36:38 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0328F95D60A; Mon, 27 Feb 2023 11:36:38 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B0E11121314; Mon, 27 Feb 2023 11:36:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497801; 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=PCSd52Fbr0D7r676adp3wM+pVSJrvc7Kl8d9UhYqqXU=; b=BQMXRWU8wpTTgXG17rdtZz5yYJvfjWt8xmvf5b24KUUxHDlceBWJs1PXSqxvTUDb/P/Lw1 BvsJ421sL8vC32gbi4UXDpz2Zn8vHWA27dfptjjiUQSdfRd9wtrmY7lxioGwRkRCUeRXv4 1vMknjyOy91gzwoHJZXyff1y+Ru+9Yw= X-MC-Unique: SAO2k0WjNwKSZhZOq0aZ0w-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Richard Henderson , David Hildenbrand Subject: [PULL 12/33] target/s390x: Use void* for haddr in S390Access Date: Mon, 27 Feb 2023 12:36:00 +0100 Message-Id: <20230227113621.58468-13-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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 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: 1677497920929100003 Content-Type: text/plain; charset="utf-8" From: Richard Henderson The interface from probe_access_flags is void*, and matching that will be helpful. We already rely on the gcc extension for byte arithmetic on void*. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand Message-Id: <20230109201856.3916639-4-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/mem_helper.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 28bf3bd53c..4d157ba9cf 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -114,8 +114,8 @@ static inline void cpu_stsize_data_ra(CPUS390XState *en= v, uint64_t addr, typedef struct S390Access { target_ulong vaddr1; target_ulong vaddr2; - char *haddr1; - char *haddr2; + void *haddr1; + void *haddr2; uint16_t size1; uint16_t size2; /* @@ -268,8 +268,9 @@ static void access_memset(CPUS390XState *env, S390Acces= s *desta, desta->mmu_idx, ra); } =20 -static uint8_t do_access_get_byte(CPUS390XState *env, vaddr vaddr, char **= haddr, - int offset, int mmu_idx, uintptr_t ra) +static uint8_t do_access_get_byte(CPUS390XState *env, vaddr vaddr, + void **haddr, int offset, + int mmu_idx, uintptr_t ra) { #ifdef CONFIG_USER_ONLY return ldub_p(*haddr + offset); @@ -301,7 +302,7 @@ static uint8_t access_get_byte(CPUS390XState *env, S390= Access *access, offset - access->size1, access->mmu_idx, ra); } =20 -static void do_access_set_byte(CPUS390XState *env, vaddr vaddr, char **had= dr, +static void do_access_set_byte(CPUS390XState *env, vaddr vaddr, void **had= dr, int offset, uint8_t byte, int mmu_idx, uintptr_t ra) { --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497878; cv=none; d=zohomail.com; s=zohoarc; b=UOsLIQfMCq8tSq7ugmvwmWNT8PQ4yQf9iDQ57dIsX+H9vAxproUGpz6kM/4iEJ0MiieJ6AKtOeFEAO2KBY7a3NC9Rvn+TtZCGiLE82MQGwtr3XMhPVL2Xl+XsspfsFswghx6VwQP6LK5HYZ/beGPcMkkYwIGJ273PMmPQZHymOk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497878; 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=7qZyOf8rmw5OCUwVosJn2HKesgZmHQoVJenmudKYq3A=; b=K/2/eJSEdsEZ6YniLxz0DMMQ7vM0qH6K8HfDuAROPF5SwDLUUnbHKlOVtHDof51urzCRDKTBRvKNXZnSCK22C5uZEGwFD0VNaU/rkdmHDMvocqVEggaaFrB7pErsy0A2gj7B8cQwgnFa0rFhknZ5GE9m9n52dMXVY0ZmVUrfacc= 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 1677497878593725.5121978502812; Mon, 27 Feb 2023 03:37:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWboF-0005dA-Fg; Mon, 27 Feb 2023 06:36:47 -0500 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 1pWboD-0005XL-0K for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:45 -0500 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 1pWboB-0005gO-Fx for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:44 -0500 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-589-LukEIeTYP1K6pq1djUmfpA-1; Mon, 27 Feb 2023 06:36:39 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 30A4A183B3C1; Mon, 27 Feb 2023 11:36:39 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 459B41121314; Mon, 27 Feb 2023 11:36:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497802; 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=7qZyOf8rmw5OCUwVosJn2HKesgZmHQoVJenmudKYq3A=; b=iQZwMYbX9CMQBWonhYyq2KvMlx4J5vVDYifR8g3fOod6Ufgr04qlOZC3sy61dRreMCqSjv joawbG9SeR6ugWj2RuIJ5LwspFAFXw7eJjtszDNeEjNecVLE8Uu4E0XzQ8BttTNDawCf/o +s8dSsK9SwxHObZUDqYZQ35755rA7p4= X-MC-Unique: LukEIeTYP1K6pq1djUmfpA-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Richard Henderson , David Hildenbrand Subject: [PULL 13/33] target/s390x: Tidy access_prepare_nf Date: Mon, 27 Feb 2023 12:36:01 +0100 Message-Id: <20230227113621.58468-14-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677497880371100009 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Assign to access struct immediately, rather than waiting until the end of the function. This means we can pass address of haddr struct members instead of allocating extra space on the local stack. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand Message-Id: <20230109201856.3916639-5-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/mem_helper.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 4d157ba9cf..dc9b5ff088 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -176,39 +176,35 @@ static int access_prepare_nf(S390Access *access, CPUS= 390XState *env, MMUAccessType access_type, int mmu_idx, uintptr_t ra) { - void *haddr1, *haddr2 =3D NULL; int size1, size2, exc; - vaddr vaddr2 =3D 0; =20 assert(size > 0 && size <=3D 4096); =20 size1 =3D MIN(size, -(vaddr1 | TARGET_PAGE_MASK)), size2 =3D size - size1; =20 + memset(access, 0, sizeof(*access)); + access->vaddr1 =3D vaddr1; + access->size1 =3D size1; + access->size2 =3D size2; + access->mmu_idx =3D mmu_idx; + exc =3D s390_probe_access(env, vaddr1, size1, access_type, mmu_idx, no= nfault, - &haddr1, ra); - if (exc) { + &access->haddr1, ra); + if (unlikely(exc)) { return exc; } if (unlikely(size2)) { /* The access crosses page boundaries. */ - vaddr2 =3D wrap_address(env, vaddr1 + size1); + vaddr vaddr2 =3D wrap_address(env, vaddr1 + size1); + + access->vaddr2 =3D vaddr2; exc =3D s390_probe_access(env, vaddr2, size2, access_type, mmu_idx, - nonfault, &haddr2, ra); - if (exc) { + nonfault, &access->haddr2, ra); + if (unlikely(exc)) { return exc; } } - - *access =3D (S390Access) { - .vaddr1 =3D vaddr1, - .vaddr2 =3D vaddr2, - .haddr1 =3D haddr1, - .haddr2 =3D haddr2, - .size1 =3D size1, - .size2 =3D size2, - .mmu_idx =3D mmu_idx - }; return 0; } =20 --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497884; cv=none; d=zohomail.com; s=zohoarc; b=BzZnobqek5BhzfkpD0NP8vfo3U0TKOp1OK+kRp9O3gv4BLMJeuHK+WVHiB/Aiz3ldTznu9pJs+TJixzoKVtb2bOEvNjraJ+VgS8vs2hfrA5n4dayoM4q1r3F8yUb1SqyXsWu6iXkKNRH4tqqVjwuWSIGsYOJWZYfs1AGU1EbpP4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497884; 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=g2W75rkVRLi0PLmhomrqiDNgo/vNSDvKn4xxxoW/ipk=; b=OHVIB1bVYfRknGfq7ai71zAch4b4Oa6nVVOKzzKEKoLn2w76AeV5FxUkrzlRVmTCcqrqIwF3s/V9ZdCXt0UGYQKWIORG2E+deNqAa7pXtXHkWU9T0LTEAQyI+460SZMPeYCXLTFvKMGW7BXpIw/l5un+EJQeHC+zUdRHh11gT6g= 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 1677497884643459.78832178089317; Mon, 27 Feb 2023 03:38:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWboD-0005Xz-PQ; Mon, 27 Feb 2023 06:36:45 -0500 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 1pWboC-0005WO-EN for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:44 -0500 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 1pWboA-0005gC-Hn for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:44 -0500 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-621-jukybfDHNtuKV46Wsh582A-1; Mon, 27 Feb 2023 06:36:40 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5FC1D100F908; Mon, 27 Feb 2023 11:36:40 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73FD61121314; Mon, 27 Feb 2023 11:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497801; 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=g2W75rkVRLi0PLmhomrqiDNgo/vNSDvKn4xxxoW/ipk=; b=Vg6xXSEkfT261LAUP/dK516I2adB1DNJs7ivbSNuMotOZmf4t7dy9P9F0UaUZ4yV1xZOWE A3piq05LSAEw8h02qjN7OKjRwMFdX8KqFRHZPXUsuqDJBeNGyHwvYUIGYAMk6lNFmhxE+a GFKWV2bhTgfYqdPjdLrUW44kU9AVIks= X-MC-Unique: jukybfDHNtuKV46Wsh582A-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Richard Henderson , David Hildenbrand Subject: [PULL 14/33] target/s390x: Remove TLB_NOTDIRTY workarounds Date: Mon, 27 Feb 2023 12:36:02 +0100 Message-Id: <20230227113621.58468-15-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677497886430100003 Content-Type: text/plain; charset="utf-8" From: Richard Henderson When this code was written, it was using tlb_vaddr_to_host, which does not handle TLB_DIRTY. Since then, it has been converted to probe_access_flags, which does. Signed-off-by: Richard Henderson Acked-by: David Hildenbrand Message-Id: <20230109201856.3916639-6-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/mem_helper.c | 74 +++++++++++------------------------ 1 file changed, 22 insertions(+), 52 deletions(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index dc9b5ff088..e9d54b1dd5 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -122,11 +122,7 @@ typedef struct S390Access { * If we can't access the host page directly, we'll have to do I/O acc= ess * via ld/st helpers. These are internal details, so we store the * mmu idx to do the access here instead of passing it around in the - * helpers. Maybe, one day we can get rid of ld/st access - once we can - * handle TLB_NOTDIRTY differently. We don't expect these special acce= sses - * to trigger exceptions - only if we would have TLB_NOTDIRTY on LAP - * pages, we might trigger a new MMU translation - very unlikely that - * the mapping changes in between and we would trigger a fault. + * helpers. */ int mmu_idx; } S390Access; @@ -224,28 +220,14 @@ static void do_access_memset(CPUS390XState *env, vadd= r vaddr, char *haddr, uintptr_t ra) { #ifdef CONFIG_USER_ONLY - g_assert(haddr); memset(haddr, byte, size); #else - MemOpIdx oi =3D make_memop_idx(MO_UB, mmu_idx); - int i; - if (likely(haddr)) { memset(haddr, byte, size); } else { - /* - * Do a single access and test if we can then get access to the - * page. This is especially relevant to speed up TLB_NOTDIRTY. - */ - g_assert(size > 0); - cpu_stb_mmu(env, vaddr, byte, oi, ra); - haddr =3D tlb_vaddr_to_host(env, vaddr, MMU_DATA_STORE, mmu_idx); - if (likely(haddr)) { - memset(haddr + 1, byte, size - 1); - } else { - for (i =3D 1; i < size; i++) { - cpu_stb_mmu(env, vaddr + i, byte, oi, ra); - } + MemOpIdx oi =3D make_memop_idx(MO_UB, mmu_idx); + for (int i =3D 0; i < size; i++) { + cpu_stb_mmu(env, vaddr + i, byte, oi, ra); } } #endif @@ -265,25 +247,18 @@ static void access_memset(CPUS390XState *env, S390Acc= ess *desta, } =20 static uint8_t do_access_get_byte(CPUS390XState *env, vaddr vaddr, - void **haddr, int offset, + void *haddr, int offset, int mmu_idx, uintptr_t ra) { #ifdef CONFIG_USER_ONLY - return ldub_p(*haddr + offset); + return ldub_p(haddr + offset); #else - MemOpIdx oi =3D make_memop_idx(MO_UB, mmu_idx); - uint8_t byte; - - if (likely(*haddr)) { - return ldub_p(*haddr + offset); + if (likely(haddr)) { + return ldub_p(haddr + offset); + } else { + MemOpIdx oi =3D make_memop_idx(MO_UB, mmu_idx); + return cpu_ldb_mmu(env, vaddr + offset, oi, ra); } - /* - * Do a single access and test if we can then get access to the - * page. This is especially relevant to speed up TLB_NOTDIRTY. - */ - byte =3D cpu_ldb_mmu(env, vaddr + offset, oi, ra); - *haddr =3D tlb_vaddr_to_host(env, vaddr, MMU_DATA_LOAD, mmu_idx); - return byte; #endif } =20 @@ -291,32 +266,27 @@ static uint8_t access_get_byte(CPUS390XState *env, S3= 90Access *access, int offset, uintptr_t ra) { if (offset < access->size1) { - return do_access_get_byte(env, access->vaddr1, &access->haddr1, + return do_access_get_byte(env, access->vaddr1, access->haddr1, offset, access->mmu_idx, ra); } - return do_access_get_byte(env, access->vaddr2, &access->haddr2, + return do_access_get_byte(env, access->vaddr2, access->haddr2, offset - access->size1, access->mmu_idx, ra); } =20 -static void do_access_set_byte(CPUS390XState *env, vaddr vaddr, void **had= dr, +static void do_access_set_byte(CPUS390XState *env, vaddr vaddr, void *hadd= r, int offset, uint8_t byte, int mmu_idx, uintptr_t ra) { #ifdef CONFIG_USER_ONLY - stb_p(*haddr + offset, byte); + stb_p(haddr + offset, byte); #else - MemOpIdx oi =3D make_memop_idx(MO_UB, mmu_idx); =20 - if (likely(*haddr)) { - stb_p(*haddr + offset, byte); - return; + if (likely(haddr)) { + stb_p(haddr + offset, byte); + } else { + MemOpIdx oi =3D make_memop_idx(MO_UB, mmu_idx); + cpu_stb_mmu(env, vaddr + offset, byte, oi, ra); } - /* - * Do a single access and test if we can then get access to the - * page. This is especially relevant to speed up TLB_NOTDIRTY. - */ - cpu_stb_mmu(env, vaddr + offset, byte, oi, ra); - *haddr =3D tlb_vaddr_to_host(env, vaddr, MMU_DATA_STORE, mmu_idx); #endif } =20 @@ -324,10 +294,10 @@ static void access_set_byte(CPUS390XState *env, S390A= ccess *access, int offset, uint8_t byte, uintptr_t ra) { if (offset < access->size1) { - do_access_set_byte(env, access->vaddr1, &access->haddr1, offset, b= yte, + do_access_set_byte(env, access->vaddr1, access->haddr1, offset, by= te, access->mmu_idx, ra); } else { - do_access_set_byte(env, access->vaddr2, &access->haddr2, + do_access_set_byte(env, access->vaddr2, access->haddr2, offset - access->size1, byte, access->mmu_idx, = ra); } } --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497876; cv=none; d=zohomail.com; s=zohoarc; b=Hx2TZHX4VNNFmnJZ5e/lInAy6eQ5o2hxor2My/jStQBUALJBuQQyla2zsgWvgD5ftCEgbkgV3sY1YX3hvu42TrnURVUhjgobtQDa+DzFTpjWD43jfUDJIJlf1wBfa3e9eFIrh3T5zoyQTFITESBDq/Gxih7BbTrcRiBBGqR58jU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497876; 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=MJu1omemYgmdzSiPVvM1QWO79XReOAHvv5PBaV/QHbc=; b=YsqRE2xdn62/UVggbz4QiYQwRiIAVIJwprQvRYbCFiLuOm6tIEQ8pCdD88fjD4jYpsDpeufDPhfuxEMuwXgCCSUupfT8qQF/mbp1dHERJvgoDW1f9g1ZdtgR5U34jlahQLu58PUAsnie6/ay8AyZUwUZKvn8nVaYZPsWlhplflg= 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 167749787694979.93662688450786; Mon, 27 Feb 2023 03:37:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWboL-0005no-AZ; Mon, 27 Feb 2023 06:36:53 -0500 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 1pWboK-0005hW-8L for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:52 -0500 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 1pWboD-0005gu-Oa for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:48 -0500 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-314-74KnOLI2OAKFiiC3-nVJJA-1; Mon, 27 Feb 2023 06:36:41 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 89255101AA78; Mon, 27 Feb 2023 11:36:41 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id A44961121314; Mon, 27 Feb 2023 11:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497805; 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=MJu1omemYgmdzSiPVvM1QWO79XReOAHvv5PBaV/QHbc=; b=V2aWMSQJ0Z9U/C92Si5c6FPlzLa/uF7O/PrmcelnH53aRElQU4I4ct7a0SRWGyld9MYHQB HTcuEg2WpeubflUwx8tJHbtgHhnd/QmP4osCPsuC4s1COfkfutdrthwHceioSsQ0zgn5b9 prekFMBqoB0Y/fd1jj2IpKRSJoyK+54= X-MC-Unique: 74KnOLI2OAKFiiC3-nVJJA-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Richard Henderson , David Hildenbrand Subject: [PULL 15/33] target/s390x: Inline do_access_{get,set}_byte Date: Mon, 27 Feb 2023 12:36:03 +0100 Message-Id: <20230227113621.58468-16-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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 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: 1677497878364100003 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Inline into the parent functions with a simple test to select the page, and a new define to remove ifdefs. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand Message-Id: <20230109201856.3916639-7-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/mem_helper.c | 70 +++++++++++++++-------------------- 1 file changed, 30 insertions(+), 40 deletions(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index e9d54b1dd5..f28126fde6 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -35,6 +35,12 @@ #include "hw/boards.h" #endif =20 +#ifdef CONFIG_USER_ONLY +# define user_or_likely(X) true +#else +# define user_or_likely(X) likely(X) +#endif + /*************************************************************************= ****/ /* Softmmu support */ =20 @@ -246,59 +252,43 @@ static void access_memset(CPUS390XState *env, S390Acc= ess *desta, desta->mmu_idx, ra); } =20 -static uint8_t do_access_get_byte(CPUS390XState *env, vaddr vaddr, - void *haddr, int offset, - int mmu_idx, uintptr_t ra) -{ -#ifdef CONFIG_USER_ONLY - return ldub_p(haddr + offset); -#else - if (likely(haddr)) { - return ldub_p(haddr + offset); - } else { - MemOpIdx oi =3D make_memop_idx(MO_UB, mmu_idx); - return cpu_ldb_mmu(env, vaddr + offset, oi, ra); - } -#endif -} - static uint8_t access_get_byte(CPUS390XState *env, S390Access *access, int offset, uintptr_t ra) { - if (offset < access->size1) { - return do_access_get_byte(env, access->vaddr1, access->haddr1, - offset, access->mmu_idx, ra); - } - return do_access_get_byte(env, access->vaddr2, access->haddr2, - offset - access->size1, access->mmu_idx, ra); -} + target_ulong vaddr =3D access->vaddr1; + void *haddr =3D access->haddr1; =20 -static void do_access_set_byte(CPUS390XState *env, vaddr vaddr, void *hadd= r, - int offset, uint8_t byte, int mmu_idx, - uintptr_t ra) -{ -#ifdef CONFIG_USER_ONLY - stb_p(haddr + offset, byte); -#else + if (unlikely(offset >=3D access->size1)) { + offset -=3D access->size1; + vaddr =3D access->vaddr2; + haddr =3D access->haddr2; + } =20 - if (likely(haddr)) { - stb_p(haddr + offset, byte); + if (user_or_likely(haddr)) { + return ldub_p(haddr + offset); } else { - MemOpIdx oi =3D make_memop_idx(MO_UB, mmu_idx); - cpu_stb_mmu(env, vaddr + offset, byte, oi, ra); + MemOpIdx oi =3D make_memop_idx(MO_UB, access->mmu_idx); + return cpu_ldb_mmu(env, vaddr + offset, oi, ra); } -#endif } =20 static void access_set_byte(CPUS390XState *env, S390Access *access, int offset, uint8_t byte, uintptr_t ra) { - if (offset < access->size1) { - do_access_set_byte(env, access->vaddr1, access->haddr1, offset, by= te, - access->mmu_idx, ra); + target_ulong vaddr =3D access->vaddr1; + void *haddr =3D access->haddr1; + + if (unlikely(offset >=3D access->size1)) { + offset -=3D access->size1; + vaddr =3D access->vaddr2; + haddr =3D access->haddr2; + } + + if (user_or_likely(haddr)) { + stb_p(haddr + offset, byte); } else { - do_access_set_byte(env, access->vaddr2, access->haddr2, - offset - access->size1, byte, access->mmu_idx, = ra); + MemOpIdx oi =3D make_memop_idx(MO_UB, access->mmu_idx); + cpu_stb_mmu(env, vaddr + offset, byte, oi, ra); } } =20 --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497907; cv=none; d=zohomail.com; s=zohoarc; b=Aoix81xJgU8gmoC+jPYGcP8tMQGM1ZtiyNPMJXEYYlzi1NmoHR/QxN3o9AFQDezQAi2Za2sz6kCtlBxQ3DxroFWzDTpKqEgwun9UFUozEv3yDVyuJjHgNPt6ovrnl+d9ExbSVn8Cd08+whtfhescRLkU4+XSuj2JYk/9zKo/fF8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497907; 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=U7mbqNmgioHwFOABac5OkJAD03IW2iZfmJwZyH0uuQQ=; b=kQRogpuS87j2mc5uclcGEJufR2/wuaD+oIv1xdFMyfQ40C14VoHgIZ+2ptfk8WBEL6ru2eVid/nv6Q/KthUzXwJK56XBjg/YOALzjOoruw/Mm89012eYmMl0icJlTFBlzvEQC+LQseZ69yHkmAL124mpy0p52TpK8A3dh574YAI= 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 1677497907104520.5826041225682; Mon, 27 Feb 2023 03:38:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbol-0005yG-26; Mon, 27 Feb 2023 06:37:20 -0500 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 1pWboK-0005hR-8m for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:52 -0500 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 1pWboE-0005h1-PB for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:48 -0500 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-612-IP19m8yrPRuEphp3PKL6HQ-1; Mon, 27 Feb 2023 06:36:43 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B4A74101B42B; Mon, 27 Feb 2023 11:36:42 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id CDC9A1121314; Mon, 27 Feb 2023 11:36:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497806; 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=U7mbqNmgioHwFOABac5OkJAD03IW2iZfmJwZyH0uuQQ=; b=gYzFCdpha7C1IkGjw++w7JSteao0aaysbrApuWQHsfq+RiEmMPetDSYdB9/i7S7g7lHxEr 9yMkhR1CnLGf5ULOZ3tZnUaZW1DlfXfyDob22HNqVWRJ9auUD5dVzrPf78rDbuxQywoW4g BI3e5DwOIS2xYr6t2fyW20L1HT/IsEc= X-MC-Unique: IP19m8yrPRuEphp3PKL6HQ-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Richard Henderson , David Hildenbrand Subject: [PULL 16/33] target/s390x: Hoist some computation in access_memmove Date: Mon, 27 Feb 2023 12:36:04 +0100 Message-Id: <20230227113621.58468-17-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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 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: 1677497908593100003 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Ensure that the total length is in a local variable across the byte loop. Compute size1 difference once. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand Message-Id: <20230109201856.3916639-8-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/mem_helper.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index f28126fde6..e51a0db0fe 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -299,16 +299,17 @@ static void access_set_byte(CPUS390XState *env, S390A= ccess *access, static void access_memmove(CPUS390XState *env, S390Access *desta, S390Access *srca, uintptr_t ra) { + int len =3D desta->size1 + desta->size2; int diff; =20 - g_assert(desta->size1 + desta->size2 =3D=3D srca->size1 + srca->size2); + assert(len =3D=3D srca->size1 + srca->size2); =20 /* Fallback to slow access in case we don't have access to all host pa= ges */ if (unlikely(!desta->haddr1 || (desta->size2 && !desta->haddr2) || !srca->haddr1 || (srca->size2 && !srca->haddr2))) { int i; =20 - for (i =3D 0; i < desta->size1 + desta->size2; i++) { + for (i =3D 0; i < len; i++) { uint8_t byte =3D access_get_byte(env, srca, i, ra); =20 access_set_byte(env, desta, i, byte, ra); @@ -316,20 +317,20 @@ static void access_memmove(CPUS390XState *env, S390Ac= cess *desta, return; } =20 - if (srca->size1 =3D=3D desta->size1) { + diff =3D desta->size1 - srca->size1; + if (likely(diff =3D=3D 0)) { memmove(desta->haddr1, srca->haddr1, srca->size1); if (unlikely(srca->size2)) { memmove(desta->haddr2, srca->haddr2, srca->size2); } - } else if (srca->size1 < desta->size1) { - diff =3D desta->size1 - srca->size1; + } else if (diff > 0) { memmove(desta->haddr1, srca->haddr1, srca->size1); memmove(desta->haddr1 + srca->size1, srca->haddr2, diff); if (likely(desta->size2)) { memmove(desta->haddr2, srca->haddr2 + diff, desta->size2); } } else { - diff =3D srca->size1 - desta->size1; + diff =3D -diff; memmove(desta->haddr1, srca->haddr1, desta->size1); memmove(desta->haddr2, srca->haddr1 + desta->size1, diff); if (likely(srca->size2)) { --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498096; cv=none; d=zohomail.com; s=zohoarc; b=EWJp2I89lujgHiy2L1Dm3FSf0wGVFk9yocXACXP+iHYRqcbvBr4B60mb0BmsTOxuep58B6AGiWw4t+swkXuA6tEeL5J8Ps0FUNTl3MaAkxNj1/fg1hlyCEsaGlNFQM49HWevPh657vLiVhbw5mJmaalBJo1Y6w0hdqn61X5SMa8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498096; 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=kz7LWZv3Gn6BhTfJMFWIyqQhBIgiL0+d16XedkP5M4w=; b=KMn6k4+YK5WaNPUjqw13IqkGddaQhI88HsXWe5KNMyR/5mfqcP+FHtMkgfs2eYs2ulcYRq5kxuzwY69XeB1H6FzKD3CeHHVk9OArIKuNXxCLZxKmTq1JMnbccabq4a9brmwXFEZ4fVwCgFKjTkzLqyhflHg6IdLnP9PyBpteBTc= 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 1677498096678551.8269963308779; Mon, 27 Feb 2023 03:41:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpO-0007HA-S0; Mon, 27 Feb 2023 06:37:58 -0500 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 1pWboL-0005ob-TS for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:59 -0500 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 1pWboJ-0005hE-W7 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:53 -0500 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-627-BRYDWKNUMvCP5O5y7Aww3A-1; Mon, 27 Feb 2023 06:36:45 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C192B183B3C6; Mon, 27 Feb 2023 11:36:43 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 05ADC1121314; Mon, 27 Feb 2023 11:36:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497807; 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=kz7LWZv3Gn6BhTfJMFWIyqQhBIgiL0+d16XedkP5M4w=; b=iSRLeDVROq1+Rd9H3qVc5YbypHZutYVMOKlYl0Sr4+OR8KfApUbcFte+zZWs4c967NuAep GVXbzja6XBthRVLOqYQW4zTF7+1O+a0zWm+3lRJYZMO9uOcltnEtXuU0ij9vfoieO3/2+6 3tb5///m/qG03u3lGhEBzi8T2GL5vFE= X-MC-Unique: BRYDWKNUMvCP5O5y7Aww3A-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Claudio Imbrenda Subject: [PULL 17/33] s390x/pv: Add support for asynchronous teardown for reboot Date: Mon, 27 Feb 2023 12:36:05 +0100 Message-Id: <20230227113621.58468-18-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677498097830100007 Content-Type: text/plain; charset="utf-8" From: Claudio Imbrenda This patch adds support for the asynchronous teardown for reboot for protected VMs. When attempting to tear down a protected VM, try to use the new asynchronous interface first. If that fails, fall back to the classic synchronous one. The asynchronous interface involves invoking the new KVM_PV_ASYNC_DISABLE_PREPARE command for the KVM_S390_PV_COMMAND ioctl. This will prepare the current protected VM for asynchronous teardown. Once the protected VM is prepared for teardown, execution can continue immediately. Once the protected VM has been prepared, a new thread is started to actually perform the teardown. The new thread uses the new KVM_PV_ASYNC_DISABLE command for the KVM_S390_PV_COMMAND ioctl. The previously prepared protected VM is torn down in the new thread. Once KVM_PV_ASYNC_DISABLE is invoked, it is possible to use KVM_PV_ASYNC_DISABLE_PREPARE again. If a protected VM has already been prepared and its cleanup has not started, it will not be possible to prepare a new VM. In that case the classic synchronous teardown has to be performed. The synchronous teardown will now also clean up any prepared VMs whose asynchronous teardown has not been initiated yet. This considerably speeds up the reboot of a protected VM; for large VMs especially, it could take a long time to perform a reboot with the traditional synchronous teardown, while with this patch it is almost immediate. Signed-off-by: Claudio Imbrenda Reviewed-by: Thomas Huth Message-Id: <20230214163035.44104-3-imbrenda@linux.ibm.com> Signed-off-by: Thomas Huth --- include/hw/s390x/pv.h | 2 ++ hw/s390x/pv.c | 28 ++++++++++++++++++++++++++++ hw/s390x/s390-virtio-ccw.c | 5 ++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/include/hw/s390x/pv.h b/include/hw/s390x/pv.h index 9360aa1091..966306a9db 100644 --- a/include/hw/s390x/pv.h +++ b/include/hw/s390x/pv.h @@ -41,6 +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); 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); @@ -60,6 +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 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 8a1c71436b..49ea38236c 100644 --- a/hw/s390x/pv.c +++ b/hw/s390x/pv.c @@ -16,6 +16,7 @@ #include "qapi/error.h" #include "qemu/error-report.h" #include "sysemu/kvm.h" +#include "sysemu/cpus.h" #include "qom/object_interfaces.h" #include "exec/confidential-guest-support.h" #include "hw/s390x/ipl.h" @@ -108,6 +109,33 @@ void s390_pv_vm_disable(void) s390_pv_cmd_exit(KVM_PV_DISABLE, NULL); } =20 +static void *s390_pv_do_unprot_async_fn(void *p) +{ + s390_pv_cmd_exit(KVM_PV_ASYNC_CLEANUP_PERFORM, NULL); + return NULL; +} + +bool s390_pv_vm_try_disable_async(void) +{ + /* + * t is only needed to create the thread; once qemu_thread_create + * returns, it can safely be discarded. + */ + QemuThread t; + + if (!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) { + return false; + } + + qemu_thread_create(&t, "async_cleanup", s390_pv_do_unprot_async_fn, NU= LL, + QEMU_THREAD_DETACHED); + + return true; +} + int s390_pv_set_sec_parms(uint64_t origin, uint64_t length) { struct kvm_s390_pv_sec_parm args =3D { diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index f22f61b8b6..503f212a31 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -41,6 +41,7 @@ #include "hw/qdev-properties.h" #include "hw/s390x/tod.h" #include "sysemu/sysemu.h" +#include "sysemu/cpus.h" #include "hw/s390x/pv.h" #include "migration/blocker.h" #include "qapi/visitor.h" @@ -329,7 +330,9 @@ static inline void s390_do_cpu_ipl(CPUState *cs, run_on= _cpu_data arg) =20 static void s390_machine_unprotect(S390CcwMachineState *ms) { - s390_pv_vm_disable(); + if (!s390_pv_vm_try_disable_async()) { + s390_pv_vm_disable(); + } ms->pv =3D false; migrate_del_blocker(pv_mig_blocker); error_free_or_abort(&pv_mig_blocker); --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498153; cv=none; d=zohomail.com; s=zohoarc; b=AHwFTuO2aEEAQGGuBlT88ccv814Ln57HXUHyuN324QXmmh9qCkIvYloOJb87glaJ1cHccb8IXtkVio7JVXVu3bCTXuiIYD0XSsoxnglJBrb35Vyul6/RCSBrieZnIigqonIyMU8jozwTG38nsCo+XgLSs/95hH24CGk5CtK+5Us= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498153; 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=/I/A5BS8jbFg2wZ33ocDqCT/1PwCuJaSuNQIIBFkozs=; b=ZA8O9spGVGFO1ARw/GTHJJ+OI6oALZXSsRtwEHECrgdFq26MDMKRI0nx0rTwxzcyD4oLOa9Q/4oIzj3teZtgNOuM3WabVfSJzXuwtyc/vCI8tgXSf1z2RGH759Nc7Jlcglh/9qx51YARG3Ik9GKp2qijum/CcHGCpHFj8gRrd8Y= 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 1677498153599860.5352182027184; Mon, 27 Feb 2023 03:42:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpN-000757-HB; Mon, 27 Feb 2023 06:37:57 -0500 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 1pWboP-0005oq-5b for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:02 -0500 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 1pWboK-0005hL-0P for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:56 -0500 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-495-Z7IXdCE6NVGALTun5vNxUQ-1; Mon, 27 Feb 2023 06:36:45 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 42EA3857A81; Mon, 27 Feb 2023 11:36:45 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10A901121314; Mon, 27 Feb 2023 11:36:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497809; 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=/I/A5BS8jbFg2wZ33ocDqCT/1PwCuJaSuNQIIBFkozs=; b=FSuhpA4+MXRHQg3PhpeOhsyVZ00OZBMuysPo+aTlhbkTo4jbCX0+o2CelCordx7RHYPLFV +LlDXTr5DRYDKo4hl33K9Wmm8UN0H27B1PdopZvtO8GetaiQSBSM07bCA3x4tCKNDU4xup j8AbRu5EaFkz/aHVlnU81LU98IWTmQ4= X-MC-Unique: Z7IXdCE6NVGALTun5vNxUQ-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Richard Henderson , Ilya Leoshkevich , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 18/33] target/s390x: Use tcg_constant_* in local contexts Date: Mon, 27 Feb 2023 12:36:06 +0100 Message-Id: <20230227113621.58468-19-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677498154518100006 From: Richard Henderson Replace tcg_const_* with tcg_constant_* in contexts where the free to remove is nearby. Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20230220184052.163465-2-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/translate.c | 410 +++++++++++++---------------------- 1 file changed, 147 insertions(+), 263 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index ac5bd98f04..35e844ef3c 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -171,8 +171,6 @@ static uint64_t inline_branch_miss[CC_OP_MAX]; =20 static void pc_to_link_info(TCGv_i64 out, DisasContext *s, uint64_t pc) { - TCGv_i64 tmp; - if (s->base.tb->flags & FLAG_MASK_32) { if (s->base.tb->flags & FLAG_MASK_64) { tcg_gen_movi_i64(out, pc); @@ -181,9 +179,7 @@ static void pc_to_link_info(TCGv_i64 out, DisasContext = *s, uint64_t pc) pc |=3D 0x80000000; } assert(!(s->base.tb->flags & FLAG_MASK_64)); - tmp =3D tcg_const_i64(pc); - tcg_gen_deposit_i64(out, out, tmp, 0, 32); - tcg_temp_free_i64(tmp); + tcg_gen_deposit_i64(out, out, tcg_constant_i64(pc), 0, 32); } =20 static TCGv_i64 psw_addr; @@ -360,11 +356,8 @@ static void per_branch(DisasContext *s, bool to_next) tcg_gen_movi_i64(gbea, s->base.pc_next); =20 if (s->base.tb->flags & FLAG_MASK_PER) { - TCGv_i64 next_pc =3D to_next ? tcg_const_i64(s->pc_tmp) : psw_addr; + TCGv_i64 next_pc =3D to_next ? tcg_constant_i64(s->pc_tmp) : psw_a= ddr; gen_helper_per_branch(cpu_env, gbea, next_pc); - if (to_next) { - tcg_temp_free_i64(next_pc); - } } #endif } @@ -382,9 +375,8 @@ static void per_branch_cond(DisasContext *s, TCGCond co= nd, =20 gen_set_label(lab); } else { - TCGv_i64 pc =3D tcg_const_i64(s->base.pc_next); + TCGv_i64 pc =3D tcg_constant_i64(s->base.pc_next); tcg_gen_movcond_i64(cond, gbea, arg1, arg2, gbea, pc); - tcg_temp_free_i64(pc); } #endif } @@ -438,23 +430,17 @@ static int get_mem_index(DisasContext *s) =20 static void gen_exception(int excp) { - TCGv_i32 tmp =3D tcg_const_i32(excp); - gen_helper_exception(cpu_env, tmp); - tcg_temp_free_i32(tmp); + gen_helper_exception(cpu_env, tcg_constant_i32(excp)); } =20 static void gen_program_exception(DisasContext *s, int code) { - TCGv_i32 tmp; - - /* Remember what pgm exception this was. */ - tmp =3D tcg_const_i32(code); - tcg_gen_st_i32(tmp, cpu_env, offsetof(CPUS390XState, int_pgm_code)); - tcg_temp_free_i32(tmp); + /* Remember what pgm exeption this was. */ + tcg_gen_st_i32(tcg_constant_i32(code), cpu_env, + offsetof(CPUS390XState, int_pgm_code)); =20 - tmp =3D tcg_const_i32(s->ilen); - tcg_gen_st_i32(tmp, cpu_env, offsetof(CPUS390XState, int_pgm_ilen)); - tcg_temp_free_i32(tmp); + tcg_gen_st_i32(tcg_constant_i32(s->ilen), cpu_env, + offsetof(CPUS390XState, int_pgm_ilen)); =20 /* update the psw */ update_psw_addr(s); @@ -473,9 +459,7 @@ static inline void gen_illegal_opcode(DisasContext *s) =20 static inline void gen_data_exception(uint8_t dxc) { - TCGv_i32 tmp =3D tcg_const_i32(dxc); - gen_helper_data_exception(cpu_env, tmp); - tcg_temp_free_i32(tmp); + gen_helper_data_exception(cpu_env, tcg_constant_i32(dxc)); } =20 static inline void gen_trap(DisasContext *s) @@ -596,13 +580,13 @@ static void gen_op_calc_cc(DisasContext *s) =20 switch (s->cc_op) { default: - dummy =3D tcg_const_i64(0); + dummy =3D tcg_constant_i64(0); /* FALLTHRU */ case CC_OP_ADD_64: case CC_OP_SUB_64: case CC_OP_ADD_32: case CC_OP_SUB_32: - local_cc_op =3D tcg_const_i32(s->cc_op); + local_cc_op =3D tcg_constant_i32(s->cc_op); break; case CC_OP_CONST0: case CC_OP_CONST1: @@ -675,13 +659,6 @@ static void gen_op_calc_cc(DisasContext *s) tcg_abort(); } =20 - if (local_cc_op) { - tcg_temp_free_i32(local_cc_op); - } - if (dummy) { - tcg_temp_free_i64(dummy); - } - /* We now have cc in cc_op as constant */ set_cc_static(s); } @@ -1300,9 +1277,9 @@ static DisasJumpType help_branch(DisasContext *s, Dis= asCompare *c, Most commonly we're single-stepping or some other condition that disables all use of goto_tb. Just update the PC and exit. */ =20 - TCGv_i64 next =3D tcg_const_i64(s->pc_tmp); + TCGv_i64 next =3D tcg_constant_i64(s->pc_tmp); if (is_imm) { - cdest =3D tcg_const_i64(dest); + cdest =3D tcg_constant_i64(dest); } =20 if (c->is_64) { @@ -1312,21 +1289,15 @@ static DisasJumpType help_branch(DisasContext *s, D= isasCompare *c, } else { TCGv_i32 t0 =3D tcg_temp_new_i32(); TCGv_i64 t1 =3D tcg_temp_new_i64(); - TCGv_i64 z =3D tcg_const_i64(0); + TCGv_i64 z =3D tcg_constant_i64(0); tcg_gen_setcond_i32(c->cond, t0, c->u.s32.a, c->u.s32.b); tcg_gen_extu_i32_i64(t1, t0); tcg_temp_free_i32(t0); tcg_gen_movcond_i64(TCG_COND_NE, psw_addr, t1, z, cdest, next); per_branch_cond(s, TCG_COND_NE, t1, z); tcg_temp_free_i64(t1); - tcg_temp_free_i64(z); } =20 - if (is_imm) { - tcg_temp_free_i64(cdest); - } - tcg_temp_free_i64(next); - ret =3D DISAS_PC_UPDATED; } =20 @@ -1410,10 +1381,9 @@ static DisasJumpType op_addc64(DisasContext *s, Disa= sOps *o) { compute_carry(s); =20 - TCGv_i64 zero =3D tcg_const_i64(0); + TCGv_i64 zero =3D tcg_constant_i64(0); tcg_gen_add2_i64(o->out, cc_src, o->in1, zero, cc_src, zero); tcg_gen_add2_i64(o->out, cc_src, o->out, cc_src, o->in2, zero); - tcg_temp_free_i64(zero); =20 return DISAS_NEXT; } @@ -2092,9 +2062,8 @@ static DisasJumpType op_clc(DisasContext *s, DisasOps= *o) tcg_gen_qemu_ld64(cc_dst, o->in2, get_mem_index(s)); break; default: - vl =3D tcg_const_i32(l); + vl =3D tcg_constant_i32(l); gen_helper_clc(cc_op, cpu_env, vl, o->addr1, o->in2); - tcg_temp_free_i32(vl); set_cc_static(s); return DISAS_NEXT; } @@ -2114,11 +2083,9 @@ static DisasJumpType op_clcl(DisasContext *s, DisasO= ps *o) return DISAS_NORETURN; } =20 - t1 =3D tcg_const_i32(r1); - t2 =3D tcg_const_i32(r2); + t1 =3D tcg_constant_i32(r1); + t2 =3D tcg_constant_i32(r2); gen_helper_clcl(cc_op, cpu_env, t1, t2); - tcg_temp_free_i32(t1); - tcg_temp_free_i32(t2); set_cc_static(s); return DISAS_NEXT; } @@ -2135,11 +2102,9 @@ static DisasJumpType op_clcle(DisasContext *s, Disas= Ops *o) return DISAS_NORETURN; } =20 - t1 =3D tcg_const_i32(r1); - t3 =3D tcg_const_i32(r3); + t1 =3D tcg_constant_i32(r1); + t3 =3D tcg_constant_i32(r3); gen_helper_clcle(cc_op, cpu_env, t1, o->in2, t3); - tcg_temp_free_i32(t1); - tcg_temp_free_i32(t3); set_cc_static(s); return DISAS_NEXT; } @@ -2156,24 +2121,22 @@ static DisasJumpType op_clclu(DisasContext *s, Disa= sOps *o) return DISAS_NORETURN; } =20 - t1 =3D tcg_const_i32(r1); - t3 =3D tcg_const_i32(r3); + t1 =3D tcg_constant_i32(r1); + t3 =3D tcg_constant_i32(r3); gen_helper_clclu(cc_op, cpu_env, t1, o->in2, t3); - tcg_temp_free_i32(t1); - tcg_temp_free_i32(t3); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_clm(DisasContext *s, DisasOps *o) { - TCGv_i32 m3 =3D tcg_const_i32(get_field(s, m3)); + TCGv_i32 m3 =3D tcg_constant_i32(get_field(s, m3)); TCGv_i32 t1 =3D tcg_temp_new_i32(); + tcg_gen_extrl_i64_i32(t1, o->in1); gen_helper_clm(cc_op, cpu_env, t1, m3, o->in2); set_cc_static(s); tcg_temp_free_i32(t1); - tcg_temp_free_i32(m3); return DISAS_NEXT; } =20 @@ -2251,14 +2214,13 @@ static DisasJumpType op_cdsg(DisasContext *s, Disas= Ops *o) static DisasJumpType op_csst(DisasContext *s, DisasOps *o) { int r3 =3D get_field(s, r3); - TCGv_i32 t_r3 =3D tcg_const_i32(r3); + TCGv_i32 t_r3 =3D tcg_constant_i32(r3); =20 if (tb_cflags(s->base.tb) & CF_PARALLEL) { gen_helper_csst_parallel(cc_op, cpu_env, t_r3, o->addr1, o->in2); } else { gen_helper_csst(cc_op, cpu_env, t_r3, o->addr1, o->in2); } - tcg_temp_free_i32(t_r3); =20 set_cc_static(s); return DISAS_NEXT; @@ -2356,9 +2318,9 @@ static DisasJumpType op_cuXX(DisasContext *s, DisasOp= s *o) m3 =3D 0; } =20 - tr1 =3D tcg_const_i32(r1); - tr2 =3D tcg_const_i32(r2); - chk =3D tcg_const_i32(m3); + tr1 =3D tcg_constant_i32(r1); + tr2 =3D tcg_constant_i32(r2); + chk =3D tcg_constant_i32(m3); =20 switch (s->insn->data) { case 12: @@ -2383,9 +2345,6 @@ static DisasJumpType op_cuXX(DisasContext *s, DisasOp= s *o) g_assert_not_reached(); } =20 - tcg_temp_free_i32(tr1); - tcg_temp_free_i32(tr2); - tcg_temp_free_i32(chk); set_cc_static(s); return DISAS_NEXT; } @@ -2393,15 +2352,11 @@ static DisasJumpType op_cuXX(DisasContext *s, Disas= Ops *o) #ifndef CONFIG_USER_ONLY static DisasJumpType op_diag(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r3 =3D tcg_const_i32(get_field(s, r3)); - TCGv_i32 func_code =3D tcg_const_i32(get_field(s, i2)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r3 =3D tcg_constant_i32(get_field(s, r3)); + TCGv_i32 func_code =3D tcg_constant_i32(get_field(s, i2)); =20 gen_helper_diag(cpu_env, r1, r3, func_code); - - tcg_temp_free_i32(func_code); - tcg_temp_free_i32(r3); - tcg_temp_free_i32(r1); return DISAS_NEXT; } #endif @@ -2512,18 +2467,13 @@ static DisasJumpType op_ex(DisasContext *s, DisasOp= s *o) update_cc_op(s); =20 if (r1 =3D=3D 0) { - v1 =3D tcg_const_i64(0); + v1 =3D tcg_constant_i64(0); } else { v1 =3D regs[r1]; } =20 - ilen =3D tcg_const_i32(s->ilen); + ilen =3D tcg_constant_i32(s->ilen); gen_helper_ex(cpu_env, ilen, v1, o->in2); - tcg_temp_free_i32(ilen); - - if (r1 =3D=3D 0) { - tcg_temp_free_i64(v1); - } =20 return DISAS_PC_CC_UPDATED; } @@ -2674,12 +2624,11 @@ static DisasJumpType op_idte(DisasContext *s, Disas= Ops *o) TCGv_i32 m4; =20 if (s390_has_feat(S390_FEAT_LOCAL_TLB_CLEARING)) { - m4 =3D tcg_const_i32(get_field(s, m4)); + m4 =3D tcg_constant_i32(get_field(s, m4)); } else { - m4 =3D tcg_const_i32(0); + m4 =3D tcg_constant_i32(0); } gen_helper_idte(cpu_env, o->in1, o->in2, m4); - tcg_temp_free_i32(m4); return DISAS_NEXT; } =20 @@ -2688,12 +2637,11 @@ static DisasJumpType op_ipte(DisasContext *s, Disas= Ops *o) TCGv_i32 m4; =20 if (s390_has_feat(S390_FEAT_LOCAL_TLB_CLEARING)) { - m4 =3D tcg_const_i32(get_field(s, m4)); + m4 =3D tcg_constant_i32(get_field(s, m4)); } else { - m4 =3D tcg_const_i32(0); + m4 =3D tcg_constant_i32(0); } gen_helper_ipte(cpu_env, o->in1, o->in2, m4); - tcg_temp_free_i32(m4); return DISAS_NEXT; } =20 @@ -2749,16 +2697,12 @@ static DisasJumpType op_msa(DisasContext *s, DisasO= ps *o) g_assert_not_reached(); }; =20 - t_r1 =3D tcg_const_i32(r1); - t_r2 =3D tcg_const_i32(r2); - t_r3 =3D tcg_const_i32(r3); - type =3D tcg_const_i32(s->insn->data); + t_r1 =3D tcg_constant_i32(r1); + t_r2 =3D tcg_constant_i32(r2); + t_r3 =3D tcg_constant_i32(r3); + type =3D tcg_constant_i32(s->insn->data); gen_helper_msa(cc_op, cpu_env, t_r1, t_r2, t_r3, type); set_cc_static(s); - tcg_temp_free_i32(t_r1); - tcg_temp_free_i32(t_r2); - tcg_temp_free_i32(t_r3); - tcg_temp_free_i32(type); return DISAS_NEXT; } =20 @@ -3017,10 +2961,9 @@ static DisasJumpType op_loc(DisasContext *s, DisasOp= s *o) tcg_gen_extu_i32_i64(t, t32); tcg_temp_free_i32(t32); =20 - z =3D tcg_const_i64(0); + z =3D tcg_constant_i64(0); tcg_gen_movcond_i64(TCG_COND_NE, o->out, t, z, o->in2, o->in1); tcg_temp_free_i64(t); - tcg_temp_free_i64(z); } =20 return DISAS_NEXT; @@ -3029,11 +2972,10 @@ static DisasJumpType op_loc(DisasContext *s, DisasO= ps *o) #ifndef CONFIG_USER_ONLY static DisasJumpType op_lctl(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r3 =3D tcg_const_i32(get_field(s, r3)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r3 =3D tcg_constant_i32(get_field(s, r3)); + gen_helper_lctl(cpu_env, r1, o->in2, r3); - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r3); /* Exit to main loop to reevaluate s390_cpu_exec_interrupt. */ s->exit_to_mainloop =3D true; return DISAS_TOO_MANY; @@ -3041,11 +2983,10 @@ static DisasJumpType op_lctl(DisasContext *s, Disas= Ops *o) =20 static DisasJumpType op_lctlg(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r3 =3D tcg_const_i32(get_field(s, r3)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r3 =3D tcg_constant_i32(get_field(s, r3)); + gen_helper_lctlg(cpu_env, r1, o->in2, r3); - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r3); /* Exit to main loop to reevaluate s390_cpu_exec_interrupt. */ s->exit_to_mainloop =3D true; return DISAS_TOO_MANY; @@ -3105,11 +3046,10 @@ static DisasJumpType op_lpswe(DisasContext *s, Disa= sOps *o) =20 static DisasJumpType op_lam(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r3 =3D tcg_const_i32(get_field(s, r3)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r3 =3D tcg_constant_i32(get_field(s, r3)); + gen_helper_lam(cpu_env, r1, o->in2, r3); - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r3); return DISAS_NEXT; } =20 @@ -3319,9 +3259,6 @@ static DisasJumpType op_lcbb(DisasContext *s, DisasOp= s *o) =20 static DisasJumpType op_mc(DisasContext *s, DisasOps *o) { -#if !defined(CONFIG_USER_ONLY) - TCGv_i32 i2; -#endif const uint16_t monitor_class =3D get_field(s, i2); =20 if (monitor_class & 0xff00) { @@ -3330,9 +3267,8 @@ static DisasJumpType op_mc(DisasContext *s, DisasOps = *o) } =20 #if !defined(CONFIG_USER_ONLY) - i2 =3D tcg_const_i32(monitor_class); - gen_helper_monitor_call(cpu_env, o->addr1, i2); - tcg_temp_free_i32(i2); + gen_helper_monitor_call(cpu_env, o->addr1, + tcg_constant_i32(monitor_class)); #endif /* Defaults to a NOP. */ return DISAS_NEXT; @@ -3396,9 +3332,9 @@ static DisasJumpType op_movx(DisasContext *s, DisasOp= s *o) =20 static DisasJumpType op_mvc(DisasContext *s, DisasOps *o) { - TCGv_i32 l =3D tcg_const_i32(get_field(s, l1)); + TCGv_i32 l =3D tcg_constant_i32(get_field(s, l1)); + gen_helper_mvc(cpu_env, l, o->addr1, o->in2); - tcg_temp_free_i32(l); return DISAS_NEXT; } =20 @@ -3410,9 +3346,9 @@ static DisasJumpType op_mvcrl(DisasContext *s, DisasO= ps *o) =20 static DisasJumpType op_mvcin(DisasContext *s, DisasOps *o) { - TCGv_i32 l =3D tcg_const_i32(get_field(s, l1)); + TCGv_i32 l =3D tcg_constant_i32(get_field(s, l1)); + gen_helper_mvcin(cpu_env, l, o->addr1, o->in2); - tcg_temp_free_i32(l); return DISAS_NEXT; } =20 @@ -3428,11 +3364,9 @@ static DisasJumpType op_mvcl(DisasContext *s, DisasO= ps *o) return DISAS_NORETURN; } =20 - t1 =3D tcg_const_i32(r1); - t2 =3D tcg_const_i32(r2); + t1 =3D tcg_constant_i32(r1); + t2 =3D tcg_constant_i32(r2); gen_helper_mvcl(cc_op, cpu_env, t1, t2); - tcg_temp_free_i32(t1); - tcg_temp_free_i32(t2); set_cc_static(s); return DISAS_NEXT; } @@ -3449,11 +3383,9 @@ static DisasJumpType op_mvcle(DisasContext *s, Disas= Ops *o) return DISAS_NORETURN; } =20 - t1 =3D tcg_const_i32(r1); - t3 =3D tcg_const_i32(r3); + t1 =3D tcg_constant_i32(r1); + t3 =3D tcg_constant_i32(r3); gen_helper_mvcle(cc_op, cpu_env, t1, o->in2, t3); - tcg_temp_free_i32(t1); - tcg_temp_free_i32(t3); set_cc_static(s); return DISAS_NEXT; } @@ -3470,11 +3402,9 @@ static DisasJumpType op_mvclu(DisasContext *s, Disas= Ops *o) return DISAS_NORETURN; } =20 - t1 =3D tcg_const_i32(r1); - t3 =3D tcg_const_i32(r3); + t1 =3D tcg_constant_i32(r1); + t3 =3D tcg_constant_i32(r3); gen_helper_mvclu(cc_op, cpu_env, t1, o->in2, t3); - tcg_temp_free_i32(t1); - tcg_temp_free_i32(t3); set_cc_static(s); return DISAS_NEXT; } @@ -3509,49 +3439,45 @@ static DisasJumpType op_mvcs(DisasContext *s, Disas= Ops *o) =20 static DisasJumpType op_mvn(DisasContext *s, DisasOps *o) { - TCGv_i32 l =3D tcg_const_i32(get_field(s, l1)); + TCGv_i32 l =3D tcg_constant_i32(get_field(s, l1)); + gen_helper_mvn(cpu_env, l, o->addr1, o->in2); - tcg_temp_free_i32(l); return DISAS_NEXT; } =20 static DisasJumpType op_mvo(DisasContext *s, DisasOps *o) { - TCGv_i32 l =3D tcg_const_i32(get_field(s, l1)); + TCGv_i32 l =3D tcg_constant_i32(get_field(s, l1)); + gen_helper_mvo(cpu_env, l, o->addr1, o->in2); - tcg_temp_free_i32(l); return DISAS_NEXT; } =20 static DisasJumpType op_mvpg(DisasContext *s, DisasOps *o) { - TCGv_i32 t1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 t2 =3D tcg_const_i32(get_field(s, r2)); + TCGv_i32 t1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 t2 =3D tcg_constant_i32(get_field(s, r2)); =20 gen_helper_mvpg(cc_op, cpu_env, regs[0], t1, t2); - tcg_temp_free_i32(t1); - tcg_temp_free_i32(t2); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_mvst(DisasContext *s, DisasOps *o) { - TCGv_i32 t1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 t2 =3D tcg_const_i32(get_field(s, r2)); + TCGv_i32 t1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 t2 =3D tcg_constant_i32(get_field(s, r2)); =20 gen_helper_mvst(cc_op, cpu_env, t1, t2); - tcg_temp_free_i32(t1); - tcg_temp_free_i32(t2); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_mvz(DisasContext *s, DisasOps *o) { - TCGv_i32 l =3D tcg_const_i32(get_field(s, l1)); + TCGv_i32 l =3D tcg_constant_i32(get_field(s, l1)); + gen_helper_mvz(cpu_env, l, o->addr1, o->in2); - tcg_temp_free_i32(l); return DISAS_NEXT; } =20 @@ -3637,13 +3563,12 @@ static DisasJumpType op_msdb(DisasContext *s, Disas= Ops *o) =20 static DisasJumpType op_nabs(DisasContext *s, DisasOps *o) { - TCGv_i64 z, n; - z =3D tcg_const_i64(0); - n =3D tcg_temp_new_i64(); + TCGv_i64 z =3D tcg_constant_i64(0); + TCGv_i64 n =3D tcg_temp_new_i64(); + tcg_gen_neg_i64(n, o->in2); tcg_gen_movcond_i64(TCG_COND_GE, o->out, o->in2, z, n, o->in2); tcg_temp_free_i64(n); - tcg_temp_free_i64(z); return DISAS_NEXT; } =20 @@ -3668,9 +3593,9 @@ static DisasJumpType op_nabsf128(DisasContext *s, Dis= asOps *o) =20 static DisasJumpType op_nc(DisasContext *s, DisasOps *o) { - TCGv_i32 l =3D tcg_const_i32(get_field(s, l1)); + TCGv_i32 l =3D tcg_constant_i32(get_field(s, l1)); + gen_helper_nc(cc_op, cpu_env, l, o->addr1, o->in2); - tcg_temp_free_i32(l); set_cc_static(s); return DISAS_NEXT; } @@ -3702,9 +3627,9 @@ static DisasJumpType op_negf128(DisasContext *s, Disa= sOps *o) =20 static DisasJumpType op_oc(DisasContext *s, DisasOps *o) { - TCGv_i32 l =3D tcg_const_i32(get_field(s, l1)); + TCGv_i32 l =3D tcg_constant_i32(get_field(s, l1)); + gen_helper_oc(cc_op, cpu_env, l, o->addr1, o->in2); - tcg_temp_free_i32(l); set_cc_static(s); return DISAS_NEXT; } @@ -3754,9 +3679,9 @@ static DisasJumpType op_oi(DisasContext *s, DisasOps = *o) =20 static DisasJumpType op_pack(DisasContext *s, DisasOps *o) { - TCGv_i32 l =3D tcg_const_i32(get_field(s, l1)); + TCGv_i32 l =3D tcg_constant_i32(get_field(s, l1)); + gen_helper_pack(cpu_env, l, o->addr1, o->in2); - tcg_temp_free_i32(l); return DISAS_NEXT; } =20 @@ -3770,9 +3695,8 @@ static DisasJumpType op_pka(DisasContext *s, DisasOps= *o) gen_program_exception(s, PGM_SPECIFICATION); return DISAS_NORETURN; } - l =3D tcg_const_i32(l2); + l =3D tcg_constant_i32(l2); gen_helper_pka(cpu_env, o->addr1, o->in2, l); - tcg_temp_free_i32(l); return DISAS_NEXT; } =20 @@ -3786,9 +3710,8 @@ static DisasJumpType op_pku(DisasContext *s, DisasOps= *o) gen_program_exception(s, PGM_SPECIFICATION); return DISAS_NORETURN; } - l =3D tcg_const_i32(l2); + l =3D tcg_constant_i32(l2); gen_helper_pku(cpu_env, o->addr1, o->in2, l); - tcg_temp_free_i32(l); return DISAS_NEXT; } =20 @@ -4035,9 +3958,8 @@ static DisasJumpType op_sam(DisasContext *s, DisasOps= *o) } s->pc_tmp &=3D mask; =20 - tsam =3D tcg_const_i64(sam); + tsam =3D tcg_constant_i64(sam); tcg_gen_deposit_i64(psw_mask, psw_mask, tsam, 31, 2); - tcg_temp_free_i64(tsam); =20 /* Always exit the TB, since we (may have) changed execution mode. */ return DISAS_TOO_MANY; @@ -4096,12 +4018,11 @@ static DisasJumpType op_servc(DisasContext *s, Disa= sOps *o) =20 static DisasJumpType op_sigp(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r3 =3D tcg_const_i32(get_field(s, r3)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r3 =3D tcg_constant_i32(get_field(s, r3)); + gen_helper_sigp(cc_op, cpu_env, o->in2, r1, r3); set_cc_static(s); - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r3); return DISAS_NEXT; } #endif @@ -4370,21 +4291,19 @@ static DisasJumpType op_stckc(DisasContext *s, Disa= sOps *o) =20 static DisasJumpType op_stctg(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r3 =3D tcg_const_i32(get_field(s, r3)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r3 =3D tcg_constant_i32(get_field(s, r3)); + gen_helper_stctg(cpu_env, r1, o->in2, r3); - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r3); return DISAS_NEXT; } =20 static DisasJumpType op_stctl(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r3 =3D tcg_const_i32(get_field(s, r3)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r3 =3D tcg_constant_i32(get_field(s, r3)); + gen_helper_stctl(cpu_env, r1, o->in2, r3); - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r3); return DISAS_NEXT; } =20 @@ -4611,11 +4530,10 @@ static DisasJumpType op_st64(DisasContext *s, Disas= Ops *o) =20 static DisasJumpType op_stam(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r3 =3D tcg_const_i32(get_field(s, r3)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r3 =3D tcg_constant_i32(get_field(s, r3)); + gen_helper_stam(cpu_env, r1, o->in2, r3); - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r3); return DISAS_NEXT; } =20 @@ -4673,7 +4591,7 @@ static DisasJumpType op_stm(DisasContext *s, DisasOps= *o) int r1 =3D get_field(s, r1); int r3 =3D get_field(s, r3); int size =3D s->insn->data; - TCGv_i64 tsize =3D tcg_const_i64(size); + TCGv_i64 tsize =3D tcg_constant_i64(size); =20 while (1) { if (size =3D=3D 8) { @@ -4688,7 +4606,6 @@ static DisasJumpType op_stm(DisasContext *s, DisasOps= *o) r1 =3D (r1 + 1) & 15; } =20 - tcg_temp_free_i64(tsize); return DISAS_NEXT; } =20 @@ -4697,8 +4614,8 @@ static DisasJumpType op_stmh(DisasContext *s, DisasOp= s *o) int r1 =3D get_field(s, r1); int r3 =3D get_field(s, r3); TCGv_i64 t =3D tcg_temp_new_i64(); - TCGv_i64 t4 =3D tcg_const_i64(4); - TCGv_i64 t32 =3D tcg_const_i64(32); + TCGv_i64 t4 =3D tcg_constant_i64(4); + TCGv_i64 t32 =3D tcg_constant_i64(32); =20 while (1) { tcg_gen_shl_i64(t, regs[r1], t32); @@ -4711,8 +4628,6 @@ static DisasJumpType op_stmh(DisasContext *s, DisasOp= s *o) } =20 tcg_temp_free_i64(t); - tcg_temp_free_i64(t4); - tcg_temp_free_i64(t32); return DISAS_NEXT; } =20 @@ -4731,26 +4646,20 @@ static DisasJumpType op_stpq(DisasContext *s, Disas= Ops *o) =20 static DisasJumpType op_srst(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r2 =3D tcg_const_i32(get_field(s, r2)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r2 =3D tcg_constant_i32(get_field(s, r2)); =20 gen_helper_srst(cpu_env, r1, r2); - - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r2); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_srstu(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r2 =3D tcg_const_i32(get_field(s, r2)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r2 =3D tcg_constant_i32(get_field(s, r2)); =20 gen_helper_srstu(cpu_env, r1, r2); - - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r2); set_cc_static(s); return DISAS_NEXT; } @@ -4808,10 +4717,9 @@ static DisasJumpType op_subb64(DisasContext *s, Disa= sOps *o) * Borrow is {0, -1}, so add to subtract; replicate the * borrow input to produce 128-bit -1 for the addition. */ - TCGv_i64 zero =3D tcg_const_i64(0); + TCGv_i64 zero =3D tcg_constant_i64(0); tcg_gen_add2_i64(o->out, cc_src, o->in1, zero, cc_src, cc_src); tcg_gen_sub2_i64(o->out, cc_src, o->out, cc_src, o->in2, zero); - tcg_temp_free_i64(zero); =20 return DISAS_NEXT; } @@ -4823,13 +4731,11 @@ static DisasJumpType op_svc(DisasContext *s, DisasO= ps *o) update_psw_addr(s); update_cc_op(s); =20 - t =3D tcg_const_i32(get_field(s, i1) & 0xff); + t =3D tcg_constant_i32(get_field(s, i1) & 0xff); tcg_gen_st_i32(t, cpu_env, offsetof(CPUS390XState, int_svc_code)); - tcg_temp_free_i32(t); =20 - t =3D tcg_const_i32(s->ilen); + t =3D tcg_constant_i32(s->ilen); tcg_gen_st_i32(t, cpu_env, offsetof(CPUS390XState, int_svc_ilen)); - tcg_temp_free_i32(t); =20 gen_exception(EXCP_SVC); return DISAS_NORETURN; @@ -4886,18 +4792,18 @@ static DisasJumpType op_tprot(DisasContext *s, Disa= sOps *o) =20 static DisasJumpType op_tp(DisasContext *s, DisasOps *o) { - TCGv_i32 l1 =3D tcg_const_i32(get_field(s, l1) + 1); + TCGv_i32 l1 =3D tcg_constant_i32(get_field(s, l1) + 1); + gen_helper_tp(cc_op, cpu_env, o->addr1, l1); - tcg_temp_free_i32(l1); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_tr(DisasContext *s, DisasOps *o) { - TCGv_i32 l =3D tcg_const_i32(get_field(s, l1)); + TCGv_i32 l =3D tcg_constant_i32(get_field(s, l1)); + gen_helper_tr(cpu_env, l, o->addr1, o->in2); - tcg_temp_free_i32(l); set_cc_static(s); return DISAS_NEXT; } @@ -4915,27 +4821,27 @@ static DisasJumpType op_tre(DisasContext *s, DisasO= ps *o) =20 static DisasJumpType op_trt(DisasContext *s, DisasOps *o) { - TCGv_i32 l =3D tcg_const_i32(get_field(s, l1)); + TCGv_i32 l =3D tcg_constant_i32(get_field(s, l1)); + gen_helper_trt(cc_op, cpu_env, l, o->addr1, o->in2); - tcg_temp_free_i32(l); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_trtr(DisasContext *s, DisasOps *o) { - TCGv_i32 l =3D tcg_const_i32(get_field(s, l1)); + TCGv_i32 l =3D tcg_constant_i32(get_field(s, l1)); + gen_helper_trtr(cc_op, cpu_env, l, o->addr1, o->in2); - tcg_temp_free_i32(l); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_trXX(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r2 =3D tcg_const_i32(get_field(s, r2)); - TCGv_i32 sizes =3D tcg_const_i32(s->insn->opc & 3); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r2 =3D tcg_constant_i32(get_field(s, r2)); + TCGv_i32 sizes =3D tcg_constant_i32(s->insn->opc & 3); TCGv_i32 tst =3D tcg_temp_new_i32(); int m3 =3D get_field(s, m3); =20 @@ -4954,9 +4860,6 @@ static DisasJumpType op_trXX(DisasContext *s, DisasOp= s *o) } gen_helper_trXX(cc_op, cpu_env, r1, r2, tst, sizes); =20 - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r2); - tcg_temp_free_i32(sizes); tcg_temp_free_i32(tst); set_cc_static(s); return DISAS_NEXT; @@ -4964,19 +4867,19 @@ static DisasJumpType op_trXX(DisasContext *s, Disas= Ops *o) =20 static DisasJumpType op_ts(DisasContext *s, DisasOps *o) { - TCGv_i32 t1 =3D tcg_const_i32(0xff); + TCGv_i32 t1 =3D tcg_constant_i32(0xff); + tcg_gen_atomic_xchg_i32(t1, o->in2, t1, get_mem_index(s), MO_UB); tcg_gen_extract_i32(cc_op, t1, 7, 1); - tcg_temp_free_i32(t1); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_unpk(DisasContext *s, DisasOps *o) { - TCGv_i32 l =3D tcg_const_i32(get_field(s, l1)); + TCGv_i32 l =3D tcg_constant_i32(get_field(s, l1)); + gen_helper_unpk(cpu_env, l, o->addr1, o->in2); - tcg_temp_free_i32(l); return DISAS_NEXT; } =20 @@ -4990,9 +4893,8 @@ static DisasJumpType op_unpka(DisasContext *s, DisasO= ps *o) gen_program_exception(s, PGM_SPECIFICATION); return DISAS_NORETURN; } - l =3D tcg_const_i32(l1); + l =3D tcg_constant_i32(l1); gen_helper_unpka(cc_op, cpu_env, o->addr1, l, o->in2); - tcg_temp_free_i32(l); set_cc_static(s); return DISAS_NEXT; } @@ -5007,9 +4909,8 @@ static DisasJumpType op_unpku(DisasContext *s, DisasO= ps *o) gen_program_exception(s, PGM_SPECIFICATION); return DISAS_NORETURN; } - l =3D tcg_const_i32(l1); + l =3D tcg_constant_i32(l1); gen_helper_unpku(cc_op, cpu_env, o->addr1, l, o->in2); - tcg_temp_free_i32(l); set_cc_static(s); return DISAS_NEXT; } @@ -5028,7 +4929,7 @@ static DisasJumpType op_xc(DisasContext *s, DisasOps = *o) =20 /* If the addresses are identical, this is a store/memset of zero. */ if (b1 =3D=3D b2 && d1 =3D=3D d2 && (l + 1) <=3D 32) { - o->in2 =3D tcg_const_i64(0); + o->in2 =3D tcg_constant_i64(0); =20 l++; while (l >=3D 8) { @@ -5061,9 +4962,8 @@ static DisasJumpType op_xc(DisasContext *s, DisasOps = *o) =20 /* But in general we'll defer to a helper. */ o->in2 =3D get_address(s, 0, b2, d2); - t32 =3D tcg_const_i32(l); + t32 =3D tcg_constant_i32(l); gen_helper_xc(cc_op, cpu_env, t32, o->addr1, o->in2); - tcg_temp_free_i32(t32); set_cc_static(s); return DISAS_NEXT; } @@ -5128,46 +5028,39 @@ static DisasJumpType op_zero2(DisasContext *s, Disa= sOps *o) #ifndef CONFIG_USER_ONLY static DisasJumpType op_clp(DisasContext *s, DisasOps *o) { - TCGv_i32 r2 =3D tcg_const_i32(get_field(s, r2)); + TCGv_i32 r2 =3D tcg_constant_i32(get_field(s, r2)); =20 gen_helper_clp(cpu_env, r2); - tcg_temp_free_i32(r2); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_pcilg(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r2 =3D tcg_const_i32(get_field(s, r2)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r2 =3D tcg_constant_i32(get_field(s, r2)); =20 gen_helper_pcilg(cpu_env, r1, r2); - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r2); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_pcistg(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r2 =3D tcg_const_i32(get_field(s, r2)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r2 =3D tcg_constant_i32(get_field(s, r2)); =20 gen_helper_pcistg(cpu_env, r1, r2); - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r2); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_stpcifc(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 ar =3D tcg_const_i32(get_field(s, b2)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 ar =3D tcg_constant_i32(get_field(s, b2)); =20 gen_helper_stpcifc(cpu_env, r1, o->addr1, ar); - tcg_temp_free_i32(ar); - tcg_temp_free_i32(r1); set_cc_static(s); return DISAS_NEXT; } @@ -5180,38 +5073,31 @@ static DisasJumpType op_sic(DisasContext *s, DisasO= ps *o) =20 static DisasJumpType op_rpcit(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r2 =3D tcg_const_i32(get_field(s, r2)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r2 =3D tcg_constant_i32(get_field(s, r2)); =20 gen_helper_rpcit(cpu_env, r1, r2); - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r2); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_pcistb(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 r3 =3D tcg_const_i32(get_field(s, r3)); - TCGv_i32 ar =3D tcg_const_i32(get_field(s, b2)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 r3 =3D tcg_constant_i32(get_field(s, r3)); + TCGv_i32 ar =3D tcg_constant_i32(get_field(s, b2)); =20 gen_helper_pcistb(cpu_env, r1, r3, o->addr1, ar); - tcg_temp_free_i32(ar); - tcg_temp_free_i32(r1); - tcg_temp_free_i32(r3); set_cc_static(s); return DISAS_NEXT; } =20 static DisasJumpType op_mpcifc(DisasContext *s, DisasOps *o) { - TCGv_i32 r1 =3D tcg_const_i32(get_field(s, r1)); - TCGv_i32 ar =3D tcg_const_i32(get_field(s, b2)); + TCGv_i32 r1 =3D tcg_constant_i32(get_field(s, r1)); + TCGv_i32 ar =3D tcg_constant_i32(get_field(s, b2)); =20 gen_helper_mpcifc(cpu_env, r1, o->addr1, ar); - tcg_temp_free_i32(ar); - tcg_temp_free_i32(r1); set_cc_static(s); return DISAS_NEXT; } @@ -6378,16 +6264,15 @@ static const DisasInsn *extract_insn(CPUS390XState = *env, DisasContext *s) =20 if (unlikely(s->ex_value)) { /* Drop the EX data now, so that it's clear on exception paths. */ - TCGv_i64 zero =3D tcg_const_i64(0); - int i; - tcg_gen_st_i64(zero, cpu_env, offsetof(CPUS390XState, ex_value)); - tcg_temp_free_i64(zero); + tcg_gen_st_i64(tcg_constant_i64(0), cpu_env, + offsetof(CPUS390XState, ex_value)); =20 /* Extract the values saved by EXECUTE. */ insn =3D s->ex_value & 0xffffffffffff0000ull; ilen =3D s->ex_value & 0xf; - /* register insn bytes with translator so plugins work */ - for (i =3D 0; i < ilen; i++) { + + /* Register insn bytes with translator so plugins work. */ + for (int i =3D 0; i < ilen; i++) { uint8_t byte =3D extract64(insn, 56 - (i * 8), 8); translator_fake_ldb(byte, pc + i); } @@ -6512,9 +6397,8 @@ static DisasJumpType translate_one(CPUS390XState *env= , DisasContext *s) =20 #ifndef CONFIG_USER_ONLY if (s->base.tb->flags & FLAG_MASK_PER) { - TCGv_i64 addr =3D tcg_const_i64(s->base.pc_next); + TCGv_i64 addr =3D tcg_constant_i64(s->base.pc_next); gen_helper_per_ifetch(cpu_env, addr); - tcg_temp_free_i64(addr); } #endif =20 --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497939; cv=none; d=zohomail.com; s=zohoarc; b=f97QOnF24eZeBFWQglvoBzakGIQIf7DvchiOt438zSc+jrLuy3xJyoqL31A82MaPoRH1PbK+IZpTj4WxUhAlydrDvp/5VqhgnmK4IVkbw01vup7kFVYX4M9tu+aaAbWjFLPU7bV43c0rpx01GJPdLpCGIIRScIAUnP//0MgdwZI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497939; 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=SQOCt1RfrkF8ZuQwBidv5O8bg+nY9l69L3zjdrRmg5Q=; b=CqGc7mg7GrWCH8W9UMVqC9Yak3+ech7SyxR8jMbqdI9n6U0pexfNIQfJlwm52uWxAerfJX7afsOFa67B8j3tlB9JZOsgB6q9DJQW+NtWLiY4TvJlv/2VnnHcBmrKpdL88sj2SZPmZ9BQNv+MgClGXzyaHm2XNLrLFlzf2NG9EvY= 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 1677497939440539.095349784329; Mon, 27 Feb 2023 03:38:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpK-0006aC-00; Mon, 27 Feb 2023 06:37:54 -0500 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 1pWboN-0005om-By for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:59 -0500 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 1pWboK-0005hP-1p for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:55 -0500 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-84-wKbpgTr7PNWouSFLnYZeyw-1; Mon, 27 Feb 2023 06:36:46 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 88FF485CBE0; Mon, 27 Feb 2023 11:36:46 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 852021121314; Mon, 27 Feb 2023 11:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497811; 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=SQOCt1RfrkF8ZuQwBidv5O8bg+nY9l69L3zjdrRmg5Q=; b=iw4c462J4Whf5UevtRx3rRaNAJnqIhhB49YrKWo1ijeoJZZpAsr0MzVSzDiBVrwYoyhraV LtUrDhcF7iWPFtQM/edmtMLtsFPRaVCpFN6lqaZUHiI4ic4SWLfbfpacRd7ySo9vT6SsT4 sdZwI4g179oh7O4W9oMwhk1DV38htqg= X-MC-Unique: wKbpgTr7PNWouSFLnYZeyw-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ilya Leoshkevich Subject: [PULL 19/33] target/s390x: Use tcg_constant_* for DisasCompare Date: Mon, 27 Feb 2023 12:36:07 +0100 Message-Id: <20230227113621.58468-20-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677497940818100003 From: Richard Henderson The a and b fields are not modified by the consumer, and while we need not free a constant, tcg will quietly ignore such frees, so free_compare need not be changed. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Ilya Leoshkevich Message-Id: <20230220184052.163465-3-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/translate.c | 44 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 35e844ef3c..a534419073 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -845,7 +845,7 @@ static void disas_jcc(DisasContext *s, DisasCompare *c,= uint32_t mask) c->is_64 =3D false; c->u.s32.a =3D tcg_temp_new_i32(); tcg_gen_extrl_i64_i32(c->u.s32.a, cc_dst); - c->u.s32.b =3D tcg_const_i32(0); + c->u.s32.b =3D tcg_constant_i32(0); break; case CC_OP_LTGT_32: case CC_OP_LTUGTU_32: @@ -860,7 +860,7 @@ static void disas_jcc(DisasContext *s, DisasCompare *c,= uint32_t mask) case CC_OP_NZ: case CC_OP_FLOGR: c->u.s64.a =3D cc_dst; - c->u.s64.b =3D tcg_const_i64(0); + c->u.s64.b =3D tcg_constant_i64(0); c->g1 =3D true; break; case CC_OP_LTGT_64: @@ -874,14 +874,14 @@ static void disas_jcc(DisasContext *s, DisasCompare *= c, uint32_t mask) case CC_OP_TM_64: case CC_OP_ICM: c->u.s64.a =3D tcg_temp_new_i64(); - c->u.s64.b =3D tcg_const_i64(0); + c->u.s64.b =3D tcg_constant_i64(0); tcg_gen_and_i64(c->u.s64.a, cc_src, cc_dst); break; =20 case CC_OP_ADDU: case CC_OP_SUBU: c->is_64 =3D true; - c->u.s64.b =3D tcg_const_i64(0); + c->u.s64.b =3D tcg_constant_i64(0); c->g1 =3D true; switch (mask) { case 8 | 2: @@ -904,65 +904,65 @@ static void disas_jcc(DisasContext *s, DisasCompare *= c, uint32_t mask) switch (mask) { case 0x8 | 0x4 | 0x2: /* cc !=3D 3 */ cond =3D TCG_COND_NE; - c->u.s32.b =3D tcg_const_i32(3); + c->u.s32.b =3D tcg_constant_i32(3); break; case 0x8 | 0x4 | 0x1: /* cc !=3D 2 */ cond =3D TCG_COND_NE; - c->u.s32.b =3D tcg_const_i32(2); + c->u.s32.b =3D tcg_constant_i32(2); break; case 0x8 | 0x2 | 0x1: /* cc !=3D 1 */ cond =3D TCG_COND_NE; - c->u.s32.b =3D tcg_const_i32(1); + c->u.s32.b =3D tcg_constant_i32(1); break; case 0x8 | 0x2: /* cc =3D=3D 0 || cc =3D=3D 2 =3D> (cc & 1) =3D=3D= 0 */ cond =3D TCG_COND_EQ; c->g1 =3D false; c->u.s32.a =3D tcg_temp_new_i32(); - c->u.s32.b =3D tcg_const_i32(0); + c->u.s32.b =3D tcg_constant_i32(0); tcg_gen_andi_i32(c->u.s32.a, cc_op, 1); break; case 0x8 | 0x4: /* cc < 2 */ cond =3D TCG_COND_LTU; - c->u.s32.b =3D tcg_const_i32(2); + c->u.s32.b =3D tcg_constant_i32(2); break; case 0x8: /* cc =3D=3D 0 */ cond =3D TCG_COND_EQ; - c->u.s32.b =3D tcg_const_i32(0); + c->u.s32.b =3D tcg_constant_i32(0); break; case 0x4 | 0x2 | 0x1: /* cc !=3D 0 */ cond =3D TCG_COND_NE; - c->u.s32.b =3D tcg_const_i32(0); + c->u.s32.b =3D tcg_constant_i32(0); break; case 0x4 | 0x1: /* cc =3D=3D 1 || cc =3D=3D 3 =3D> (cc & 1) !=3D 0= */ cond =3D TCG_COND_NE; c->g1 =3D false; c->u.s32.a =3D tcg_temp_new_i32(); - c->u.s32.b =3D tcg_const_i32(0); + c->u.s32.b =3D tcg_constant_i32(0); tcg_gen_andi_i32(c->u.s32.a, cc_op, 1); break; case 0x4: /* cc =3D=3D 1 */ cond =3D TCG_COND_EQ; - c->u.s32.b =3D tcg_const_i32(1); + c->u.s32.b =3D tcg_constant_i32(1); break; case 0x2 | 0x1: /* cc > 1 */ cond =3D TCG_COND_GTU; - c->u.s32.b =3D tcg_const_i32(1); + c->u.s32.b =3D tcg_constant_i32(1); break; case 0x2: /* cc =3D=3D 2 */ cond =3D TCG_COND_EQ; - c->u.s32.b =3D tcg_const_i32(2); + c->u.s32.b =3D tcg_constant_i32(2); break; case 0x1: /* cc =3D=3D 3 */ cond =3D TCG_COND_EQ; - c->u.s32.b =3D tcg_const_i32(3); + c->u.s32.b =3D tcg_constant_i32(3); break; default: /* CC is masked by something else: (8 >> cc) & mask. */ cond =3D TCG_COND_NE; c->g1 =3D false; - c->u.s32.a =3D tcg_const_i32(8); - c->u.s32.b =3D tcg_const_i32(0); - tcg_gen_shr_i32(c->u.s32.a, c->u.s32.a, cc_op); + c->u.s32.a =3D tcg_temp_new_i32(); + c->u.s32.b =3D tcg_constant_i32(0); + tcg_gen_shr_i32(c->u.s32.a, tcg_constant_i32(8), cc_op); tcg_gen_andi_i32(c->u.s32.a, c->u.s32.a, mask); break; } @@ -1619,7 +1619,7 @@ static DisasJumpType op_bct32(DisasContext *s, DisasO= ps *o) tcg_gen_subi_i64(t, regs[r1], 1); store_reg32_i64(r1, t); c.u.s32.a =3D tcg_temp_new_i32(); - c.u.s32.b =3D tcg_const_i32(0); + c.u.s32.b =3D tcg_constant_i32(0); tcg_gen_extrl_i64_i32(c.u.s32.a, t); tcg_temp_free_i64(t); =20 @@ -1643,7 +1643,7 @@ static DisasJumpType op_bcth(DisasContext *s, DisasOp= s *o) tcg_gen_subi_i64(t, t, 1); store_reg32h_i64(r1, t); c.u.s32.a =3D tcg_temp_new_i32(); - c.u.s32.b =3D tcg_const_i32(0); + c.u.s32.b =3D tcg_constant_i32(0); tcg_gen_extrl_i64_i32(c.u.s32.a, t); tcg_temp_free_i64(t); =20 @@ -1664,7 +1664,7 @@ static DisasJumpType op_bct64(DisasContext *s, DisasO= ps *o) =20 tcg_gen_subi_i64(regs[r1], regs[r1], 1); c.u.s64.a =3D regs[r1]; - c.u.s64.b =3D tcg_const_i64(0); + c.u.s64.b =3D tcg_constant_i64(0); =20 return help_branch(s, &c, is_imm, imm, o->in2); } --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497971; cv=none; d=zohomail.com; s=zohoarc; b=UnrccuS+F5hfpmVcha9HgOeK5OxGDmsg3oAWqHuOntpAaTivzx0iCviRCbDZQ8cYqFKaCSrRpGYRM9eWE3C6ZLg4ikpfJMVAFIR+0NgdMokKZZIHepm+87oJbJnMIbbLrbYkIormv54marb+h0Fw6QUouAHw3pVypP7ltlJyuUc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497971; 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=XEk2CWW1aoybiSMZHxuZ/HD9xBix4Lqzx98ZNYH3Wa8=; b=V6dTRQP7WdWg2vLGgdcjWImZI0TfYUkD1g+h4RyQdKo4qfcr29JOE/xdeAWNGOQMDFGxfpHBCpPe4EaotGotLavqCuxrfjtYHZW8mtY81T/yhWdpaW5nfC+vFOrbWucFGGqWNJSEBqT/g1YgWcwWNgrBSF4RKJd4+432sXy4Auc= 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 1677497971847784.1014667317426; Mon, 27 Feb 2023 03:39:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpM-0006x2-7T; Mon, 27 Feb 2023 06:37:56 -0500 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 1pWboL-0005oc-U8 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:59 -0500 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 1pWboK-0005hS-0I for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:53 -0500 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-224-VvfyNiz2ODGlfmalkx-y0Q-1; Mon, 27 Feb 2023 06:36:48 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CFE6A2A5955A; Mon, 27 Feb 2023 11:36:47 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC9D61121314; Mon, 27 Feb 2023 11:36:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497811; 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=XEk2CWW1aoybiSMZHxuZ/HD9xBix4Lqzx98ZNYH3Wa8=; b=UEjtMV6WxH7tMGUkFeZ60XopmBhaePlH7H/BMYApaHXxhBEwdX+o/UpeuDP++rGW3MnjYV F6/SZAqiJ/eJcZdYLLv4swEYitsPQw0qjFh6ko5Iqm/yPivr/ekBq+spyaptrrbloLd9cd AuIKd/4COxeX9J+dRDeokMxO9JjsDws= X-MC-Unique: VvfyNiz2ODGlfmalkx-y0Q-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ilya Leoshkevich Subject: [PULL 20/33] target/s390x: Use tcg_constant_i32 for fpinst_extract_m34 Date: Mon, 27 Feb 2023 12:36:08 +0100 Message-Id: <20230227113621.58468-21-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677497973192100003 From: Richard Henderson Return a constant or NULL, which means the free may be removed from all callers of fpinst_extract_m34. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Ilya Leoshkevich Message-Id: <20230220184052.163465-4-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/translate.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index a534419073..faa6f737ba 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -1790,7 +1790,7 @@ static TCGv_i32 fpinst_extract_m34(DisasContext *s, b= ool m3_with_fpe, return NULL; } =20 - return tcg_const_i32(deposit32(m3, 4, 4, m4)); + return tcg_constant_i32(deposit32(m3, 4, 4, m4)); } =20 static DisasJumpType op_cfeb(DisasContext *s, DisasOps *o) @@ -1801,7 +1801,6 @@ static DisasJumpType op_cfeb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_cfeb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); set_cc_static(s); return DISAS_NEXT; } @@ -1814,7 +1813,6 @@ static DisasJumpType op_cfdb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_cfdb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); set_cc_static(s); return DISAS_NEXT; } @@ -1827,7 +1825,6 @@ static DisasJumpType op_cfxb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_cfxb(o->out, cpu_env, o->in2_128, m34); - tcg_temp_free_i32(m34); set_cc_static(s); return DISAS_NEXT; } @@ -1840,7 +1837,6 @@ static DisasJumpType op_cgeb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_cgeb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); set_cc_static(s); return DISAS_NEXT; } @@ -1853,7 +1849,6 @@ static DisasJumpType op_cgdb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_cgdb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); set_cc_static(s); return DISAS_NEXT; } @@ -1866,7 +1861,6 @@ static DisasJumpType op_cgxb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_cgxb(o->out, cpu_env, o->in2_128, m34); - tcg_temp_free_i32(m34); set_cc_static(s); return DISAS_NEXT; } @@ -1879,7 +1873,6 @@ static DisasJumpType op_clfeb(DisasContext *s, DisasO= ps *o) return DISAS_NORETURN; } gen_helper_clfeb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); set_cc_static(s); return DISAS_NEXT; } @@ -1892,7 +1885,6 @@ static DisasJumpType op_clfdb(DisasContext *s, DisasO= ps *o) return DISAS_NORETURN; } gen_helper_clfdb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); set_cc_static(s); return DISAS_NEXT; } @@ -1905,7 +1897,6 @@ static DisasJumpType op_clfxb(DisasContext *s, DisasO= ps *o) return DISAS_NORETURN; } gen_helper_clfxb(o->out, cpu_env, o->in2_128, m34); - tcg_temp_free_i32(m34); set_cc_static(s); return DISAS_NEXT; } @@ -1918,7 +1909,6 @@ static DisasJumpType op_clgeb(DisasContext *s, DisasO= ps *o) return DISAS_NORETURN; } gen_helper_clgeb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); set_cc_static(s); return DISAS_NEXT; } @@ -1931,7 +1921,6 @@ static DisasJumpType op_clgdb(DisasContext *s, DisasO= ps *o) return DISAS_NORETURN; } gen_helper_clgdb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); set_cc_static(s); return DISAS_NEXT; } @@ -1944,7 +1933,6 @@ static DisasJumpType op_clgxb(DisasContext *s, DisasO= ps *o) return DISAS_NORETURN; } gen_helper_clgxb(o->out, cpu_env, o->in2_128, m34); - tcg_temp_free_i32(m34); set_cc_static(s); return DISAS_NEXT; } @@ -1957,7 +1945,6 @@ static DisasJumpType op_cegb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_cegb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); return DISAS_NEXT; } =20 @@ -1969,7 +1956,6 @@ static DisasJumpType op_cdgb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_cdgb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); return DISAS_NEXT; } =20 @@ -1981,7 +1967,6 @@ static DisasJumpType op_cxgb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_cxgb(o->out_128, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); return DISAS_NEXT; } =20 @@ -1993,7 +1978,6 @@ static DisasJumpType op_celgb(DisasContext *s, DisasO= ps *o) return DISAS_NORETURN; } gen_helper_celgb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); return DISAS_NEXT; } =20 @@ -2005,7 +1989,6 @@ static DisasJumpType op_cdlgb(DisasContext *s, DisasO= ps *o) return DISAS_NORETURN; } gen_helper_cdlgb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); return DISAS_NEXT; } =20 @@ -2017,7 +2000,6 @@ static DisasJumpType op_cxlgb(DisasContext *s, DisasO= ps *o) return DISAS_NORETURN; } gen_helper_cxlgb(o->out_128, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); return DISAS_NEXT; } =20 @@ -2486,7 +2468,6 @@ static DisasJumpType op_fieb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_fieb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); return DISAS_NEXT; } =20 @@ -2498,7 +2479,6 @@ static DisasJumpType op_fidb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_fidb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); return DISAS_NEXT; } =20 @@ -2510,7 +2490,6 @@ static DisasJumpType op_fixb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_fixb(o->out_128, cpu_env, o->in2_128, m34); - tcg_temp_free_i32(m34); return DISAS_NEXT; } =20 @@ -2785,7 +2764,6 @@ static DisasJumpType op_ledb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_ledb(o->out, cpu_env, o->in2, m34); - tcg_temp_free_i32(m34); return DISAS_NEXT; } =20 @@ -2797,7 +2775,6 @@ static DisasJumpType op_ldxb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_ldxb(o->out, cpu_env, o->in2_128, m34); - tcg_temp_free_i32(m34); return DISAS_NEXT; } =20 @@ -2809,7 +2786,6 @@ static DisasJumpType op_lexb(DisasContext *s, DisasOp= s *o) return DISAS_NORETURN; } gen_helper_lexb(o->out, cpu_env, o->in2_128, m34); - tcg_temp_free_i32(m34); return DISAS_NEXT; } =20 --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498082; cv=none; d=zohomail.com; s=zohoarc; b=BHIa/+trWPlnwjjA2/b3iFjIHfz5yOX4MC4bf91GigjbWT6cSl7u4GjeV0fKzSCpraCLNyHJou4svaOMjtlrvsN25Ty1OPpVJCMJClbf0Sw9Bs2ZMnenC09A9zNz2jEwH6HPafw/Yex57W26F03PwNGb/PmOyK5Sr6gadqgCnnA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498082; 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=ppDh5MQfY1H9d/ey0ZSfwEgzwSaSdklZrk/hlQ/jJuc=; b=lBVH2ghniJWklPtlKNkG7aw16A9DsCLSH2zDrVyAKZrHqLYGTOsTsm4GiOqPUvqS1Q4nRmdsc6pCsD8j6e6O7QkM3YVkWTEkmFg07NJB601aTkHZ95NkJ3RtA/m9Du1mSrlH3Ra8giEfi/wbH30yFoGJhSGiOARYhOjv/WWcgkk= 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 1677498082971727.8507146697921; Mon, 27 Feb 2023 03:41:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpL-0006uf-So; Mon, 27 Feb 2023 06:37:55 -0500 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 1pWboO-0005on-3B for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:59 -0500 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 1pWboL-0005hm-WA for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:55 -0500 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-17-l7LZZCBpN6qRsjjf6CAE4g-1; Mon, 27 Feb 2023 06:36:49 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 28343183B3C1; Mon, 27 Feb 2023 11:36:49 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F41F1121314; Mon, 27 Feb 2023 11:36:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497813; 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=ppDh5MQfY1H9d/ey0ZSfwEgzwSaSdklZrk/hlQ/jJuc=; b=MYj2Tqht56KZT6Su0CcP29xL0Q6yuR+HcIDg9IGBXv0lORcMiK8U6wQry7I5DFrViKdO01 /hKUbPpqy2AQf2by5GGcnb7rQIfxbfs2aViEG10N+y/EOkpplvFHPPrk0RmDlOhQvBe11h IXmuxeP2z02tVJRYeaydbjGjfVVAypo= X-MC-Unique: l7LZZCBpN6qRsjjf6CAE4g-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ilya Leoshkevich Subject: [PULL 21/33] target/s390x: Use tcg_constant_* in translate_vx.c.inc Date: Mon, 27 Feb 2023 12:36:09 +0100 Message-Id: <20230227113621.58468-22-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677498083980100002 From: Richard Henderson In most cases, this is a simple local allocate and free replaced by tcg_constant_*. In three cases, a variable temp was initialized with a constant value -- reorg to localize the constant. In gen_acc, this fixes a leak. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Ilya Leoshkevich Message-Id: <20230220184052.163465-5-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/tcg/translate_vx.c.inc | 45 +++++++++++++---------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/target/s390x/tcg/translate_vx.c.inc b/target/s390x/tcg/transla= te_vx.c.inc index d39ee81cd6..3fadc82e5c 100644 --- a/target/s390x/tcg/translate_vx.c.inc +++ b/target/s390x/tcg/translate_vx.c.inc @@ -319,12 +319,10 @@ static void gen_gvec128_4_i64(gen_gvec128_4_i64_fn fn= , uint8_t d, uint8_t a, static void gen_addi2_i64(TCGv_i64 dl, TCGv_i64 dh, TCGv_i64 al, TCGv_i64 = ah, uint64_t b) { - TCGv_i64 bl =3D tcg_const_i64(b); - TCGv_i64 bh =3D tcg_const_i64(0); + TCGv_i64 bl =3D tcg_constant_i64(b); + TCGv_i64 bh =3D tcg_constant_i64(0); =20 tcg_gen_add2_i64(dl, dh, al, ah, bl, bh); - tcg_temp_free_i64(bl); - tcg_temp_free_i64(bh); } =20 static DisasJumpType op_vbperm(DisasContext *s, DisasOps *o) @@ -609,9 +607,8 @@ static DisasJumpType op_vlei(DisasContext *s, DisasOps = *o) return DISAS_NORETURN; } =20 - tmp =3D tcg_const_i64((int16_t)get_field(s, i2)); + tmp =3D tcg_constant_i64((int16_t)get_field(s, i2)); write_vec_element_i64(tmp, get_field(s, v1), enr, es); - tcg_temp_free_i64(tmp); return DISAS_NEXT; } =20 @@ -1107,11 +1104,13 @@ static DisasJumpType op_vseg(DisasContext *s, Disas= Ops *o) =20 static DisasJumpType op_vst(DisasContext *s, DisasOps *o) { - TCGv_i64 tmp =3D tcg_const_i64(16); + TCGv_i64 tmp; =20 /* Probe write access before actually modifying memory */ - gen_helper_probe_write_access(cpu_env, o->addr1, tmp); + gen_helper_probe_write_access(cpu_env, o->addr1, + tcg_constant_i64(16)); =20 + tmp =3D tcg_temp_new_i64(); read_vec_element_i64(tmp, get_field(s, v1), 0, ES_64); tcg_gen_qemu_st_i64(tmp, o->addr1, get_mem_index(s), MO_TEUQ); gen_addi_and_wrap_i64(s, o->addr1, o->addr1, 8); @@ -1270,9 +1269,10 @@ static DisasJumpType op_vstm(DisasContext *s, DisasO= ps *o) } =20 /* Probe write access before actually modifying memory */ - tmp =3D tcg_const_i64((v3 - v1 + 1) * 16); - gen_helper_probe_write_access(cpu_env, o->addr1, tmp); + gen_helper_probe_write_access(cpu_env, o->addr1, + tcg_constant_i64((v3 - v1 + 1) * 16)); =20 + tmp =3D tcg_temp_new_i64(); for (;; v1++) { read_vec_element_i64(tmp, v1, 0, ES_64); tcg_gen_qemu_st_i64(tmp, o->addr1, get_mem_index(s), MO_TEUQ); @@ -1359,7 +1359,7 @@ static DisasJumpType op_va(DisasContext *s, DisasOps = *o) static void gen_acc(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b, uint8_t es) { const uint8_t msb_bit_nr =3D NUM_VEC_ELEMENT_BITS(es) - 1; - TCGv_i64 msb_mask =3D tcg_const_i64(dup_const(es, 1ull << msb_bit_nr)); + TCGv_i64 msb_mask =3D tcg_constant_i64(dup_const(es, 1ull << msb_bit_n= r)); TCGv_i64 t1 =3D tcg_temp_new_i64(); TCGv_i64 t2 =3D tcg_temp_new_i64(); TCGv_i64 t3 =3D tcg_temp_new_i64(); @@ -1416,7 +1416,7 @@ static void gen_acc2_i64(TCGv_i64 dl, TCGv_i64 dh, TC= Gv_i64 al, { TCGv_i64 th =3D tcg_temp_new_i64(); TCGv_i64 tl =3D tcg_temp_new_i64(); - TCGv_i64 zero =3D tcg_const_i64(0); + TCGv_i64 zero =3D tcg_constant_i64(0); =20 tcg_gen_add2_i64(tl, th, al, zero, bl, zero); tcg_gen_add2_i64(tl, th, th, zero, ah, zero); @@ -1425,7 +1425,6 @@ static void gen_acc2_i64(TCGv_i64 dl, TCGv_i64 dh, TC= Gv_i64 al, =20 tcg_temp_free_i64(th); tcg_temp_free_i64(tl); - tcg_temp_free_i64(zero); } =20 static DisasJumpType op_vacc(DisasContext *s, DisasOps *o) @@ -1455,15 +1454,14 @@ static void gen_ac2_i64(TCGv_i64 dl, TCGv_i64 dh, T= CGv_i64 al, TCGv_i64 ah, TCGv_i64 bl, TCGv_i64 bh, TCGv_i64 cl, TCGv_i64 ch) { TCGv_i64 tl =3D tcg_temp_new_i64(); - TCGv_i64 th =3D tcg_const_i64(0); + TCGv_i64 zero =3D tcg_constant_i64(0); =20 /* extract the carry only */ tcg_gen_extract_i64(tl, cl, 0, 1); tcg_gen_add2_i64(dl, dh, al, ah, bl, bh); - tcg_gen_add2_i64(dl, dh, dl, dh, tl, th); + tcg_gen_add2_i64(dl, dh, dl, dh, tl, zero); =20 tcg_temp_free_i64(tl); - tcg_temp_free_i64(th); } =20 static DisasJumpType op_vac(DisasContext *s, DisasOps *o) @@ -1484,7 +1482,7 @@ static void gen_accc2_i64(TCGv_i64 dl, TCGv_i64 dh, T= CGv_i64 al, TCGv_i64 ah, { TCGv_i64 tl =3D tcg_temp_new_i64(); TCGv_i64 th =3D tcg_temp_new_i64(); - TCGv_i64 zero =3D tcg_const_i64(0); + TCGv_i64 zero =3D tcg_constant_i64(0); =20 tcg_gen_andi_i64(tl, cl, 1); tcg_gen_add2_i64(tl, th, tl, zero, al, zero); @@ -1495,7 +1493,6 @@ static void gen_accc2_i64(TCGv_i64 dl, TCGv_i64 dh, T= CGv_i64 al, TCGv_i64 ah, =20 tcg_temp_free_i64(tl); tcg_temp_free_i64(th); - tcg_temp_free_i64(zero); } =20 static DisasJumpType op_vaccc(DisasContext *s, DisasOps *o) @@ -1597,14 +1594,13 @@ static void gen_avgl_i32(TCGv_i32 d, TCGv_i32 a, TC= Gv_i32 b) static void gen_avgl_i64(TCGv_i64 dl, TCGv_i64 al, TCGv_i64 bl) { TCGv_i64 dh =3D tcg_temp_new_i64(); - TCGv_i64 zero =3D tcg_const_i64(0); + TCGv_i64 zero =3D tcg_constant_i64(0); =20 tcg_gen_add2_i64(dl, dh, al, zero, bl, zero); gen_addi2_i64(dl, dh, dl, dh, 1); tcg_gen_extract2_i64(dl, dl, dh, 1); =20 tcg_temp_free_i64(dh); - tcg_temp_free_i64(zero); } =20 static DisasJumpType op_vavgl(DisasContext *s, DisasOps *o) @@ -2440,7 +2436,7 @@ static void gen_scbi2_i64(TCGv_i64 dl, TCGv_i64 dh, T= CGv_i64 al, { TCGv_i64 th =3D tcg_temp_new_i64(); TCGv_i64 tl =3D tcg_temp_new_i64(); - TCGv_i64 zero =3D tcg_const_i64(0); + TCGv_i64 zero =3D tcg_constant_i64(0); =20 tcg_gen_sub2_i64(tl, th, al, zero, bl, zero); tcg_gen_andi_i64(th, th, 1); @@ -2452,7 +2448,6 @@ static void gen_scbi2_i64(TCGv_i64 dl, TCGv_i64 dh, T= CGv_i64 al, =20 tcg_temp_free_i64(th); tcg_temp_free_i64(tl); - tcg_temp_free_i64(zero); } =20 static DisasJumpType op_vscbi(DisasContext *s, DisasOps *o) @@ -2572,11 +2567,12 @@ static DisasJumpType op_vsumq(DisasContext *s, Disa= sOps *o) return DISAS_NORETURN; } =20 - sumh =3D tcg_const_i64(0); + sumh =3D tcg_temp_new_i64(); suml =3D tcg_temp_new_i64(); - zero =3D tcg_const_i64(0); + zero =3D tcg_constant_i64(0); tmpl =3D tcg_temp_new_i64(); =20 + tcg_gen_mov_i64(sumh, zero); read_vec_element_i64(suml, get_field(s, v3), max_idx, es); for (idx =3D 0; idx <=3D max_idx; idx++) { read_vec_element_i64(tmpl, get_field(s, v2), idx, es); @@ -2587,7 +2583,6 @@ static DisasJumpType op_vsumq(DisasContext *s, DisasO= ps *o) =20 tcg_temp_free_i64(sumh); tcg_temp_free_i64(suml); - tcg_temp_free_i64(zero); tcg_temp_free_i64(tmpl); return DISAS_NEXT; } --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497878; cv=none; d=zohomail.com; s=zohoarc; b=Ct07htmRuMlS2Co653TQcElsOdAqILn+Iyhuca5c59b3lPm9eCupRIG6gzecARO5X2uaj6RU6Lb8NE6ZcrJffi7KB0ebxskZLKrTL64wekm+P81gqqGH5OCh7t9Abds7m3P0K58E7Sxybd3LT8iGzCQF4DTyKwuT3LhEvTh1b3Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497878; 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=Lvc+5SwC+ViF8FGhE8in1TJao5DLcHjbLQ0Q+E/k+dk=; b=Y0viok2ZVawEdvG4i5kz1NC8pV1ZlYbARRhhn0eB1m3j0I9nSWHDqytypDLndszoJHgRd97N0n36wsfC3H9FxKcawxcdcviP5OayBc3YY/W9kQ4Ax4uTf0XYRGiQzvLBedKcqWmNbLAYt/HZOy3O42L44IJeORSDcjgT3u64r3c= 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 1677497878657436.0792306618314; Mon, 27 Feb 2023 03:37:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbon-0005yp-Pf; Mon, 27 Feb 2023 06:37:22 -0500 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 1pWboP-0005op-5K for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:59 -0500 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 1pWboM-0005i2-LI for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:56 -0500 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-74-wQWV-yQdO3Og73ZYSUYWAw-1; Mon, 27 Feb 2023 06:36:50 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4EB1E830F82; Mon, 27 Feb 2023 11:36:50 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6AF391121315; Mon, 27 Feb 2023 11:36:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497813; 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=Lvc+5SwC+ViF8FGhE8in1TJao5DLcHjbLQ0Q+E/k+dk=; b=JumuTPvcPyBUJIO4SPMW3x2pmMZlnPbjpRbXOA48l2xdZBKM6/EekWX721f0//7smA0in/ DPHgX015vYNSqAwymfYIR9qHzvLkFO7vRDQ3rrCeJmbSlMYfQMgz+ANfZuP1aNYmnLGk6o NryA6GLdxHWo6FERysDmCns7nZzXLC4= X-MC-Unique: wQWV-yQdO3Og73ZYSUYWAw-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Ilya Leoshkevich , Richard Henderson Subject: [PULL 22/33] tests/tcg/s390x: Add bal.S Date: Mon, 27 Feb 2023 12:36:10 +0100 Message-Id: <20230227113621.58468-23-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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 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: 1677497880393100010 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich Signed-off-by: Richard Henderson Message-Id: <20221103130011.2670186-1-iii@linux.ibm.com> Message-Id: <20230220184052.163465-6-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/bal.S | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/tcg/s390x/bal.S diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Make= file.softmmu-target index 50c1b88065..bcbe9367ef 100644 --- a/tests/tcg/s390x/Makefile.softmmu-target +++ b/tests/tcg/s390x/Makefile.softmmu-target @@ -7,3 +7,4 @@ QEMU_OPTS=3D-action panic=3Dexit-failure -kernel -Wl,--build-id=3Dnone $< -o $@ =20 TESTS +=3D unaligned-lowcore +TESTS +=3D bal diff --git a/tests/tcg/s390x/bal.S b/tests/tcg/s390x/bal.S new file mode 100644 index 0000000000..e54d8874ff --- /dev/null +++ b/tests/tcg/s390x/bal.S @@ -0,0 +1,24 @@ + .org 0x200 /* lowcore padding */ + .globl _start +_start: + lpswe start24_psw +_start24: + lgrl %r0,initial_r0 + lgrl %r1,expected_r0 + bal %r0,0f +0: + cgrjne %r0,%r1,1f + lpswe success_psw +1: + lpswe failure_psw + .align 8 +start24_psw: + .quad 0x160000000000,_start24 /* 24-bit mode, cc =3D 1, pm =3D 6 = */ +initial_r0: + .quad 0x1234567887654321 +expected_r0: + .quad 0x1234567896000000 + 0b /* ilc =3D 2, cc =3D 1, pm =3D 6 */ +success_psw: + .quad 0x2000000000000,0xfff /* see is_special_wait_psw() */ +failure_psw: + .quad 0x2000000000000,0 /* disabled wait */ --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498090; cv=none; d=zohomail.com; s=zohoarc; b=a+qASolXTQ3oShDcjo5+A4fzIb5dgg0pFndSwXchz1yNifKXlTqVqptgpTMvNdPVRKR0uGiCAgTCMCgVIHIjicSW+dL5ZMP5k97NpCI8ALhN+nHKxFxOTqU2M3iBfRxoJQSxtizdV2nAl5Bvml3tfGpbcXI8A+jK7tcC4igmuVM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498090; 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=h9POaeahV7n6T9mhqPGZAa1rJHCMVIadxMowq0KgzEU=; b=gOC72DskWDjYtwwgJEGOijF6X1YwRee8S3bNhSrLOLgIkXw7lI+JtIcPPZttfyXdw+nLoKSLDAA00ZsNBKQP6mMFfRxrrVZPobRcqfTkPowqJO5DP9C2Xt1diThXJs/vAFSGsDS1+sh85OpqSqf+x8RhmiPOXoheZm3rocL/vkc= 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 1677498090977377.2491511793055; Mon, 27 Feb 2023 03:41:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpN-00075U-IV; Mon, 27 Feb 2023 06:37:57 -0500 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 1pWboP-0005or-Ju for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:02 -0500 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 1pWboN-0005iE-VS for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:57 -0500 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-bjt5ZPGiNdSRJZFhtirU1A-1; Mon, 27 Feb 2023 06:36:52 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7663E85A5A3; Mon, 27 Feb 2023 11:36:51 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 940D81121314; Mon, 27 Feb 2023 11:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497815; 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=h9POaeahV7n6T9mhqPGZAa1rJHCMVIadxMowq0KgzEU=; b=Bpc7/2Tl548Ry82DkY96kI7tvbcFHf17KyZx0xBQsJIhyLNBf/2p7OEpBiDo+RItjoMJxu F73NpClTwqkPBB72Gl11PYkSiPdCDOeJ4dInq8gdnmExVc8s7r40FD7ym2+OemWvN3zbOH rTKz0YlMWylx9ATwBhil5TnygRdshqQ= X-MC-Unique: bjt5ZPGiNdSRJZFhtirU1A-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Ilya Leoshkevich , Richard Henderson Subject: [PULL 23/33] tests/tcg/s390x: Add sam.S Date: Mon, 27 Feb 2023 12:36:11 +0100 Message-Id: <20230227113621.58468-24-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677498091793100003 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich Signed-off-by: Richard Henderson Message-Id: <20221129015328.55439-1-iii@linux.ibm.com> Message-Id: <20230220184052.163465-7-richard.henderson@linaro.org> Signed-off-by: Thomas Huth --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/sam.S | 67 +++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 tests/tcg/s390x/sam.S diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Make= file.softmmu-target index bcbe9367ef..725b6c598d 100644 --- a/tests/tcg/s390x/Makefile.softmmu-target +++ b/tests/tcg/s390x/Makefile.softmmu-target @@ -8,3 +8,4 @@ QEMU_OPTS=3D-action panic=3Dexit-failure -kernel =20 TESTS +=3D unaligned-lowcore TESTS +=3D bal +TESTS +=3D sam diff --git a/tests/tcg/s390x/sam.S b/tests/tcg/s390x/sam.S new file mode 100644 index 0000000000..4cab2dd200 --- /dev/null +++ b/tests/tcg/s390x/sam.S @@ -0,0 +1,67 @@ +/* DAT on, home-space mode, 64-bit mode */ +#define DAT_PSWM 0x400c00180000000 +#define VIRTUAL_BASE 0x123456789abcd000 + + .org 0x8e +program_interruption_code: + .org 0x150 +program_old_psw: + .org 0x1d0 /* program new PSW */ + .quad 0,pgm_handler + .org 0x200 /* lowcore padding */ + + .globl _start +_start: + lctlg %c13,%c13,hasce + lpswe dat_psw +start_dat: + sam24 +sam24_suppressed: + /* sam24 should fail */ +fail: + basr %r12,%r0 + lpswe failure_psw-.(%r12) +pgm_handler: + chhsi program_interruption_code,6 /* specification exception? */ + jne fail + clc suppressed_psw(16),program_old_psw /* correct location? */ + jne fail + lpswe success_psw + + .align 8 +dat_psw: + .quad DAT_PSWM,VIRTUAL_BASE+start_dat +suppressed_psw: + .quad DAT_PSWM,VIRTUAL_BASE+sam24_suppressed +success_psw: + .quad 0x2000000000000,0xfff /* see is_special_wait_psw() */ +failure_psw: + .quad 0x2000000000000,0 /* disabled wait */ +hasce: + /* DT =3D 0b11 (region-first-table), TL =3D 3 (2k entries) */ + .quad region_first_table + (3 << 2) + 3 + .align 0x1000 +region_first_table: + .org region_first_table + ((VIRTUAL_BASE >> 53) & 0x7ff) * 8 + /* TT =3D 0b11 (region-first-table), TL =3D 3 (2k entries) */ + .quad region_second_table + (3 << 2) + 3 + .org region_first_table + 0x800 * 8 +region_second_table: + .org region_second_table + ((VIRTUAL_BASE >> 42) & 0x7ff) * 8 + /* TT =3D 0b10 (region-second-table), TL =3D 3 (2k entries) */ + .quad region_third_table + (2 << 2) + 3 + .org region_second_table + 0x800 * 8 +region_third_table: + .org region_third_table + ((VIRTUAL_BASE >> 31) & 0x7ff) * 8 + /* TT =3D 0b01 (region-third-table), TL =3D 3 (2k entries) */ + .quad segment_table + (1 << 2) + 3 + .org region_third_table + 0x800 * 8 +segment_table: + .org segment_table + ((VIRTUAL_BASE >> 20) & 0x7ff) * 8 + /* TT =3D 0b00 (segment-table) */ + .quad page_table + .org segment_table + 0x800 * 8 +page_table: + .org page_table + ((VIRTUAL_BASE >> 12) & 0xff) * 8 + .quad 0 + .org page_table + 0x100 * 8 --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498061; cv=none; d=zohomail.com; s=zohoarc; b=BFp6VWViCaessElIZjPgsyMnZ7b7g/ki1OeC0etBa2aln16LGySmV8R96dm0gNnf7TOiOtwl31NkyOUfYsUQihMyzcxID4ixipyL9SoKYEXaFHe94uzSEQdEKbG/C7zH0nSYb6OELw8sN6cp12EOAaGybaRjqhhLL3/ezl6LnbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498061; 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=XxaFHRXWv/AgYuXGgqEIfr86HgQSO7TP/vFbYTzZrxk=; b=Geze2nRX8VxuiriDH9UrgDHk/4PmGiTP4g0eBZKUCMfNesy+D6uzQKmr7s+DqvS/6wl9UHIqGs0T1cZSP+2Z2Mt/5p6jmYp7jd6YwAzI54d2R6miCsshql9gfT67iJQ6+ykfQCUHiXuiwKYjBjg6Fubuajd5xiteHfksqSyqyzM= 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 1677498061178267.34093860999883; Mon, 27 Feb 2023 03:41:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpM-0006zk-Fx; Mon, 27 Feb 2023 06:37:56 -0500 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 1pWboV-0005sL-Mt for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:07 -0500 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 1pWboO-0005iO-Tj for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:59 -0500 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-218-2crM0QX4PRW102txMW0IJA-1; Mon, 27 Feb 2023 06:36:53 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9BB0F85CBE2; Mon, 27 Feb 2023 11:36:52 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB9681121314; Mon, 27 Feb 2023 11:36:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497816; 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=XxaFHRXWv/AgYuXGgqEIfr86HgQSO7TP/vFbYTzZrxk=; b=GzLHEvkeDRCc77KoQZtixVHl5shfJqDAZ6CqT8n2CUC0wPXfPmOXBA8Gnx5HbOEIdYIPOD POve7ScfG2c4Zq43jpGZf4Fd/mfXbbI7EjqJywe5aPQubo9WhafygARohP+vBqncvmwtle ex0sg7dkLXMcrxMy7H3y5SV++0Dobjo= X-MC-Unique: 2crM0QX4PRW102txMW0IJA-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Dinah Baum , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 24/33] configure: Add 'mkdir build' check Date: Mon, 27 Feb 2023 12:36:12 +0100 Message-Id: <20230227113621.58468-25-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677498061722100007 From: Dinah Baum QEMU configure script goes into an infinite error printing loop when in read only directory due to 'build' dir never being created. Checking if 'mkdir dir' succeeds prevents this error. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/321 Reviewed-by: Peter Maydell Signed-off-by: Dinah Baum Message-Id: <20230221110631.4142-1-dinahbaum123@gmail.com> Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 [thuth: Remove second "touch $MARKER"] Signed-off-by: Thomas Huth --- configure | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index cf6db3d551..dccb5d4f96 100755 --- a/configure +++ b/configure @@ -31,8 +31,12 @@ then fi fi =20 - mkdir build - touch $MARKER + if ! mkdir build || ! touch $MARKER + then + echo "ERROR: Could not create ./build directory. Check the permiss= ions on" + echo "your source directory, or try doing an out-of-tree build." + exit 1 + fi =20 cat > GNUmakefile <<'EOF' # This file is auto-generated by configure to support in-source tree --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497927; cv=none; d=zohomail.com; s=zohoarc; b=ChFD86z+rd7RsJnnMU8m97TCbqH6ZvQ6soS3GlXUS8oU+K3i4Lrk4G1ykAMakprklmppd4Hj487E3ujwB0jiMFzB1PfloASf1ZXZbBoFm1Ok9FgixY7Q9Bpea3K22Wk4icbYXs+IjYMZABjwZbx18663Vu5tgzqXEGFsVIG7d14= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497927; 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=qGtxdCK9woe6+Rs1kSjCIb73FWpxI3wGanttbVAMtls=; b=Wdg9DWFk8qUjyrC3UASPcBe4MG5RYjSOt6wgtR9V9LvWv+iLgNFs4IxpPgSgeY/VF6Fvq7tJBpbzaeWemDx4u7nFPpkxLJtvVAe7PW0k518Z6fAhQVZsdyDGhY4lx/fZ2FQLWHkcrjOKA52DCOaWOvnqU4ZH4tosxPsn2gpinZ8= 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 167749792744229.79947759972538; Mon, 27 Feb 2023 03:38:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpS-0007hB-HD; Mon, 27 Feb 2023 06:38:02 -0500 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 1pWboV-0005sK-Mh for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:05 -0500 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 1pWboP-0005ib-HG for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:36:58 -0500 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-139-O-YG3UpkOVS1NOtQlggDnQ-1; Mon, 27 Feb 2023 06:36:53 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 73CF5100F909; Mon, 27 Feb 2023 11:36:53 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB48F1121314; Mon, 27 Feb 2023 11:36:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497816; 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=qGtxdCK9woe6+Rs1kSjCIb73FWpxI3wGanttbVAMtls=; b=Ab85A8IzN8U1JoiMv/PAc3q/tFYq4ZWJiSX5+p8jYeNPLSrXSeGtUD6WIyjADmLW9FMO+k LaTPzPXaRSMACQDY2lsYOla0/zRY2lO39PzvvFX4VqnrdfctfaeIWZCosAymtxIgZeRADc a8Rh3exuP6lfgklNligPLIeGooNOgmM= X-MC-Unique: O-YG3UpkOVS1NOtQlggDnQ-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 25/33] qemu-keymap: Silence memory leak warning from Clang's sanitizer Date: Mon, 27 Feb 2023 12:36:13 +0100 Message-Id: <20230227113621.58468-26-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677497928729100003 Content-Type: text/plain; charset="utf-8" When compiling QEMU with "--enable-sanitizers --enable-xkbcommon --cc=3Dcla= ng" there is a memory leak warning when running qemu-keymap: $ ./qemu-keymap -f pc-bios/keymaps/de -l de =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D610321=3D=3DERROR: LeakSanitizer: detected memory leaks Direct leak of 136 byte(s) in 1 object(s) allocated from: #0 0x5642830d0820 in __interceptor_calloc.part.11 asan_malloc_linux.cp= p.o #1 0x7f31873b8d2b in xkb_state_new (/lib64/libxkbcommon.so.0+0x1dd2b) = (BuildId: dd32581e2248833243f3f646324ae9b98469f025) SUMMARY: AddressSanitizer: 136 byte(s) leaked in 1 allocation(s). It can be silenced by properly releasing the "state" again after it has been used. Message-Id: <20230221122440.612281-1-thuth@redhat.com> Reviewed-by: Peter Maydell Signed-off-by: Thomas Huth --- qemu-keymap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qemu-keymap.c b/qemu-keymap.c index 4095b654a6..229866e004 100644 --- a/qemu-keymap.c +++ b/qemu-keymap.c @@ -226,6 +226,8 @@ int main(int argc, char *argv[]) =20 state =3D xkb_state_new(map); xkb_keymap_key_for_each(map, walk_map, state); + xkb_state_unref(state); + state =3D NULL; =20 /* add quirks */ fprintf(outfile, --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498127; cv=none; d=zohomail.com; s=zohoarc; b=DPPYFrBWB2d+Le5nWgrOn2V2rPYJWcnQFDQXt4s1qt9m2pd9VnP49F3k5b5OvBJfgsulfSag1D4g7pA1r30MXmPTJtcW8jLMABuCWAxmsHiDz1s/TKD7NPkhufqJdsJ+5kPQcBZi2LN9E72RF4kx46To/KWiQaYlQyDuW/PIaEk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498127; 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=EFyqSE77x/lb5S+4fZTLjLQ+XpLZl2e0Anp7H7hasUk=; b=NO1pqQVtq+5OP5C19+DATHtBG98jSwNKUeDkghIvCVPnW/JsZe3Jqod3zFzZQuQ7qaAQpiY+bUMfIEa6Wa2MsALeiRzDMdRGxr6blMNLmPVKdg6CeyFThHD95uvgTYKcNiJexFnJnyZ9XLVT5T+CXw7CQjna2pYLmtJoVUz09vg= 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 1677498127022561.8097656621062; Mon, 27 Feb 2023 03:42:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpQ-0007RF-CZ; Mon, 27 Feb 2023 06:38:00 -0500 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 1pWboY-0005uL-9F for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:08 -0500 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 1pWboV-0005in-En for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:04 -0500 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-277-cHSGs_TAM1Ov9BtxhFhaOQ-1; Mon, 27 Feb 2023 06:36:55 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A20E829AA3BB; Mon, 27 Feb 2023 11:36:54 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id B57C21121314; Mon, 27 Feb 2023 11:36:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497818; 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=EFyqSE77x/lb5S+4fZTLjLQ+XpLZl2e0Anp7H7hasUk=; b=R+oHg1wa+O09qYNUd7y+xXK1eimzTTWB3NzPa9gkfN8LFsE9RLKCQnwurcidHeyj2Jiy5G CBGscG+Qwau9Tmf6bwNg71KsJujk6Qj2k4l9KLvK9HjlsdMZIT3FfOapyn8jytDWJlDwjl iJzdklVpxAJHGyemdvPYYvWKspfXNL0= X-MC-Unique: cHSGs_TAM1Ov9BtxhFhaOQ-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Steve Sistare , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PULL 26/33] meson: fix dependency on qemu-keymap Date: Mon, 27 Feb 2023 12:36:14 +0100 Message-Id: <20230227113621.58468-27-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677498128055100001 From: Steve Sistare When qemu-keymap is not available on the host, and enable-xkbcommon is specified, parallel make fails with: % make clean ... % make -j 32 ... FAILED: pc-bios/keymaps/is ./qemu-keymap -f pc-bios/keymaps/is -l is /bin/sh: ./qemu-keymap: No such file or directory ... many similar messages ... The code always runs find_program, rather than waiting to build qemu-keymap, because it looks for CONFIG_XKBCOMMON in config_host rather than config_host_data. Making serially succeeds, by soft linking files from pc-bios/keymaps, but that is not the desired result for enable-xkbcommon. Examining all occurrences of 'in config_host' for similar bugs shows one instance in the docs, which is also fixed here. Fixes: 4113f4cfee ("meson: move xkbcommon to meson") Signed-off-by: Steve Sistare Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <1675708442-74966-1-git-send-email-steven.sistare@oracle.com> Signed-off-by: Thomas Huth --- docs/devel/kconfig.rst | 2 +- pc-bios/keymaps/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/devel/kconfig.rst b/docs/devel/kconfig.rst index 69674d008a..cc1a456edf 100644 --- a/docs/devel/kconfig.rst +++ b/docs/devel/kconfig.rst @@ -306,6 +306,6 @@ variable:: =20 host_kconfig =3D \ (have_tpm ? ['CONFIG_TPM=3Dy'] : []) + \ - ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=3Dy'] : []) + \ + ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=3Dy'] : []) + \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ ... diff --git a/pc-bios/keymaps/meson.build b/pc-bios/keymaps/meson.build index 06c75e646b..158a3b410c 100644 --- a/pc-bios/keymaps/meson.build +++ b/pc-bios/keymaps/meson.build @@ -33,7 +33,7 @@ keymaps =3D { 'tr': '-l tr', } =20 -if meson.is_cross_build() or 'CONFIG_XKBCOMMON' not in config_host +if meson.is_cross_build() or not xkbcommon.found() native_qemu_keymap =3D find_program('qemu-keymap', required: false, disa= bler: true) else native_qemu_keymap =3D qemu_keymap --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498061; cv=none; d=zohomail.com; s=zohoarc; b=j3FYaukUKkJUuA2gc080pV21ZfMFtL/wugwhovAoJ3+PlpSGzhjQEndbHSE+eW0IWwKzg3yRcE1lng5KotJmuTIx6Nnfb9ybl2RDz9VHywM78cbPzQc4jmlO0WDWkmmHUd6j62T7CJYTzKvR4M1tb0blSC/hJSQqCmIj0WkClDY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498061; 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=0Ji+x3y23XY9GVQQduchoQVQW517GHQaaoai3iTDDbo=; b=BnOVEUlCigN7uHTf/txz7pQoSp2hX7h3R0QI9V17XWxz7LJkhcz7eO+oicHT2TGGET0mAPHkjd20+BhKTrLMIpQ4t1anKVNw+hXOB7D1hrLRkphsctv8mEd9C2nNPfp+8O8DtWgUHp1zyIQ/4r0iPJCSYDoMkbq6Xf+oZBgjX8A= 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 16774980611741000.8646852567538; Mon, 27 Feb 2023 03:41:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpL-0006nP-AE; Mon, 27 Feb 2023 06:37:55 -0500 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 1pWboY-0005uP-Un for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:08 -0500 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 1pWboV-0005j7-Jk for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:06 -0500 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-568-m41dpo0vMOex2_4eAdYpVg-1; Mon, 27 Feb 2023 06:36:56 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 35E1285CBE2; Mon, 27 Feb 2023 11:36:56 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id E53311121314; Mon, 27 Feb 2023 11:36:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497821; 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=0Ji+x3y23XY9GVQQduchoQVQW517GHQaaoai3iTDDbo=; b=Mzek+O3/3c6cl014JqPYNVTZY9yBcHwZIDFgWuswm1btzpWa7m0PYEm5BvjPc4hi2khxZv vGUMnTwaCF03Hd1D5xO1lK148MkKoCWpVMpTtwYv6AUrpZwP19oCBzmGfS70PFtN6tM1hT g7YCF46K/vYRGjw5yGNk9vidziFyEyI= X-MC-Unique: m41dpo0vMOex2_4eAdYpVg-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: Khadija Kamran , Stefan Weil Subject: [PULL 27/33] Updated the FSF address to Date: Mon, 27 Feb 2023 12:36:15 +0100 Message-Id: <20230227113621.58468-28-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677498062097100013 From: Khadija Kamran The Free Software Foundation moved to a new address and some sources in QEMU referred to their old location. The address should be updated and replaced by a pointer to Resolves: https://gitlab.com/qemu-project/qemu/-/issues/379 Signed-off-by: Khadija Kamran Message-Id: <576ee9203fdac99d7251a98faa66b9ce1e7febc5.1675941486.git.kkamra= n.bese16seecs@seecs.edu.pk> Reviewed-by: Stefan Weil Signed-off-by: Thomas Huth --- hw/scsi/viosrp.h | 3 +-- hw/sh4/sh7750_regs.h | 3 +-- include/hw/arm/raspi_platform.h | 3 +-- include/qemu/uri.h | 3 +-- tests/unit/rcutorture.c | 3 +-- tests/unit/test-rcu-list.c | 3 +-- util/uri.c | 3 +-- contrib/gitdm/filetypes.txt | 3 +-- tests/qemu-iotests/022 | 4 +--- 9 files changed, 9 insertions(+), 19 deletions(-) diff --git a/hw/scsi/viosrp.h b/hw/scsi/viosrp.h index e5f9768e8f..58c29aa925 100644 --- a/hw/scsi/viosrp.h +++ b/hw/scsi/viosrp.h @@ -16,8 +16,7 @@ /* GNU General Public License for more details. = */ /* = */ /* You should have received a copy of the GNU General Public License = */ -/* along with this program; if not, write to the Free Software = */ -/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 U= SA */ +/* along with this program. If not, see . = */ /* = */ /* = */ /* This file contains structures and definitions for IBM RPA (RS/6000 = */ diff --git a/hw/sh4/sh7750_regs.h b/hw/sh4/sh7750_regs.h index beb571d5e9..94043431e6 100644 --- a/hw/sh4/sh7750_regs.h +++ b/hw/sh4/sh7750_regs.h @@ -22,8 +22,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. You should have received * a copy of the GNU General Public License along with RTEMS; see - * file COPYING. If not, write to the Free Software Foundation, 675 - * Mass Ave, Cambridge, MA 02139, USA. + * file COPYING. If not, see . * * As a special exception, including RTEMS header files in a file, * instantiating RTEMS generics or templates, or linking other files diff --git a/include/hw/arm/raspi_platform.h b/include/hw/arm/raspi_platfor= m.h index e0e6c8ce94..4a56dd4b89 100644 --- a/include/hw/arm/raspi_platform.h +++ b/include/hw/arm/raspi_platform.h @@ -18,8 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 U= SA + * along with this program. If not, see . * * Various undocumented addresses and names come from Herman Hermitage's V= C4 * documentation: diff --git a/include/qemu/uri.h b/include/qemu/uri.h index db5218c39e..3ad211d676 100644 --- a/include/qemu/uri.h +++ b/include/qemu/uri.h @@ -41,8 +41,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * License along with this library. If not, see . * * Authors: * Richard W.M. Jones diff --git a/tests/unit/rcutorture.c b/tests/unit/rcutorture.c index 495a4e6f42..7662081683 100644 --- a/tests/unit/rcutorture.c +++ b/tests/unit/rcutorture.c @@ -50,8 +50,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U= SA. + * along with this program. If not, see . * * Copyright (c) 2008 Paul E. McKenney, IBM Corporation. */ diff --git a/tests/unit/test-rcu-list.c b/tests/unit/test-rcu-list.c index 64b81ae058..9964171da4 100644 --- a/tests/unit/test-rcu-list.c +++ b/tests/unit/test-rcu-list.c @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U= SA. + * along with this program. If not, see . * * Copyright (c) 2013 Mike D. Day, IBM Corporation. */ diff --git a/util/uri.c b/util/uri.c index ff72c6005f..dcb3305236 100644 --- a/util/uri.c +++ b/util/uri.c @@ -43,8 +43,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * License along with this library. If not, see . * * Authors: * Richard W.M. Jones diff --git a/contrib/gitdm/filetypes.txt b/contrib/gitdm/filetypes.txt index d2d6f6db8d..b1d01c0992 100644 --- a/contrib/gitdm/filetypes.txt +++ b/contrib/gitdm/filetypes.txt @@ -12,8 +12,7 @@ # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US= A. +# along with this program. If not, see . # # Authors : Gregorio Robles # Authors : Germ=C3=A1n P=C3=B3o-Caama=C3=B1o diff --git a/tests/qemu-iotests/022 b/tests/qemu-iotests/022 index a116cfe255..d98d1ea90f 100755 --- a/tests/qemu-iotests/022 +++ b/tests/qemu-iotests/022 @@ -16,9 +16,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA +# along with this program. If not, see . # =20 # creator --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497923; cv=none; d=zohomail.com; s=zohoarc; b=TdP+0f9/dLs7hWMeI3d0qDwVOph3WLusADdkPE1ct4CkljneTaEWsBm/xulpaVERCY9bzPwkbc5xJscfr6o2M6M2g//n+Ut2599m9hnztDJGik/ui7EooDpLQ+81+UctpGFpwdWYERFXZCV0YZ6ioV+ybAq9XJnplz67G++cits= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497923; 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=nLq/kYykA34+nOF8ipMSvtQkMGGeXkVDEET63f/ajjU=; b=jVFZ5nUlcatfu4Exp58jp+AEsXi9UXaA38kLCzgcs9jxpllnBzt6YiZ1ws2qutmTHOcQ3023xiC1yjjlkK/a1q4e9cMfKR1c2k4LyLORqtJpQvxgetL4Ll2RQC15wFmxySErLDbDKRKW65lwKeJVfrkQAbzUQb8Abdy672XbAbI= 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 1677497923002542.1038068326359; Mon, 27 Feb 2023 03:38:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpQ-0007SM-He; Mon, 27 Feb 2023 06:38:00 -0500 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 1pWboY-0005uM-CT for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:08 -0500 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 1pWboV-0005iy-H1 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:06 -0500 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-330-78VEU3RHPyuoHQqy23CWJA-1; Mon, 27 Feb 2023 06:36:57 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5C360100F908; Mon, 27 Feb 2023 11:36:57 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 789F51121314; Mon, 27 Feb 2023 11:36:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497820; 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=nLq/kYykA34+nOF8ipMSvtQkMGGeXkVDEET63f/ajjU=; b=KxFOW1eZDxX7evVNFwvU1efWBPax+2qk1R4xBHZShFG0MSd2ezo2VRtTJIwyPdwsG0reHZ VzIpDNn6YfMsitnHSzMFFeqZaMEkSY/NqIl6Bs4N/JCz4VFh+NGRecHPOwIZRfykiFlwEI 48yWAY0J4mLMFstTXiWqi8nk5LLpEhE= X-MC-Unique: 78VEU3RHPyuoHQqy23CWJA-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: David Woodhouse , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PULL 28/33] gitlab-ci.d/buildtest: Remove aarch64-softmmu from the build-system-ubuntu job Date: Mon, 27 Feb 2023 12:36:16 +0100 Message-Id: <20230227113621.58468-29-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677497924722100003 aarch64-softmmu is also checked on the same version of Ubuntu in the gcov job, so it is redundant to check again in the normal ubuntu job. Message-Id: <20230207201447.566661-3-thuth@redhat.com> Reviewed-by: David Woodhouse Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 8f332fc36f..8fff961b44 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -42,7 +42,7 @@ build-system-ubuntu: variables: IMAGE: ubuntu2004 CONFIGURE_ARGS: --enable-docs --enable-fdt=3Dsystem --enable-capstone - TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu + TARGETS: alpha-softmmu cris-softmmu hppa-softmmu microblazeel-softmmu mips64el-softmmu MAKE_CHECK_ARGS: check-build artifacts: --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498055; cv=none; d=zohomail.com; s=zohoarc; b=hBPvn55ISS0MLOL8YWeQIT6N/bJqSxi+aq84EL0BhG9NNsOjfttMQVCyZgUm1JKtShXQe/OG+9Zhmk45C0at2DBvYtYoBfZCE7vir4SLvSp37LrOrPYSVHsom0PFBJXHrMFHrjhl7ZxLtBuvQFfbES61fjBRMEdfjOLlldC5/So= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498055; 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=arW0hY1LL6oKkWiC/9RM1D7StYJcKXH1aSx2ErCIJPQ=; b=gFhtPik38YyC0gsh1LPxUo2Q3Fegvkki1Kl2k9ZuBwqSfUaM2TTHuv/0d/dARnzhiOpVcTL6R11w1vx+I4MBYXm5kfKbltHGyXDiYkaRF6ffn+JSWDv7AHsS8+DEWjPaKv/whgY+rGuZ5xsNaGnIvZvM0E9yd0p4FV5hsiRMRSM= 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 1677498055194272.54710023609573; Mon, 27 Feb 2023 03:40:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpL-0006mb-6K; Mon, 27 Feb 2023 06:37:55 -0500 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 1pWboY-0005uN-CJ for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:08 -0500 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 1pWboV-0005iu-Fb for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:06 -0500 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-147-37_HhdLvOXKNDcRxUXikdQ-1; Mon, 27 Feb 2023 06:36:58 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 846A32A59558; Mon, 27 Feb 2023 11:36:58 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id A1ED51121314; Mon, 27 Feb 2023 11:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497820; 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=arW0hY1LL6oKkWiC/9RM1D7StYJcKXH1aSx2ErCIJPQ=; b=JlZueMnrpCWIp7rlDd5nr6NaIAkbPqu55aHV/6ZggojzIrlih3pDl3B+8v5saH2F4GIFCl qi9KHVYM9hlxO4w+yP1+HhHPQ/WaR7DaHDzraXCQ0UxZUk85dlJjpoOsl0ZD7U2pOwkXBW wo+QWMYmi+/ceT6+sJ9d8Pz0FCm82Fs= X-MC-Unique: 37_HhdLvOXKNDcRxUXikdQ-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: David Woodhouse , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PULL 29/33] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job Date: Mon, 27 Feb 2023 12:36:17 +0100 Message-Id: <20230227113621.58468-30-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677498055681100003 We can get rid of the build-coroutine-sigaltstack job by moving the configure flags that should be tested here to other jobs: Move --with-coroutine=3Dsigaltstack to the build-system-debian job (where the coroutines should get some more test coverage with "make check-block", too) and --enable-trace-backends=3Dftrace to the cross-s390x-kvm-only job. Message-Id: <20230207201447.566661-4-thuth@redhat.com> Reviewed-by: David Woodhouse Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest.yml | 13 +------------ .gitlab-ci.d/crossbuilds.yml | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 8fff961b44..8697c61072 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -74,6 +74,7 @@ build-system-debian: job: amd64-debian-container variables: IMAGE: debian-amd64 + CONFIGURE_ARGS: --with-coroutine=3Dsigaltstack TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu MAKE_CHECK_ARGS: check-build @@ -534,18 +535,6 @@ build-tci: - QTEST_QEMU_BINARY=3D"./qemu-system-s390x" ./tests/qtest/pxe-test -m = slow - make check-tcg =20 -# Alternate coroutines implementations are only really of interest to KVM = users -# However we can't test against KVM on Gitlab-CI so we can only run unit t= ests -build-coroutine-sigaltstack: - extends: .native_build_job_template - needs: - job: amd64-ubuntu2004-container - variables: - IMAGE: ubuntu2004 - CONFIGURE_ARGS: --with-coroutine=3Dsigaltstack --disable-tcg - --enable-trace-backends=3Dftrace - MAKE_CHECK_ARGS: check-unit - # Check our reduced build configurations build-without-defaults: extends: .native_build_job_template diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index 74d6259b90..57637c5127 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -159,7 +159,7 @@ cross-s390x-kvm-only: job: s390x-debian-cross-container variables: IMAGE: debian-s390x-cross - EXTRA_CONFIGURE_OPTS: --disable-tcg + EXTRA_CONFIGURE_OPTS: --disable-tcg --enable-trace-backends=3Dftrace =20 cross-mips64el-kvm-only: extends: .cross_accel_build_job --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498018; cv=none; d=zohomail.com; s=zohoarc; b=l6+k34g+pjVrWSYUC7PN363iZiMHbHxsR1H5GYqlM6xx45nE8iwdrNgXYwaBoeTOIYj9OoZ6VwJebfIkpGByXePp6+1NhaiocG2Ed7W/YgAOA/QRFN+NV39LNgJkZR1wiLw4cuge2tlaGFW1NvaWkJQUuNSN0y2PCmy7a68ItN4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498018; 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=GH/TiXzE15bAdeGOlrSnIksCXeY/s5lsyD4VhY7CYww=; b=QpYJCFOpdTi4Yn+wRSrEhf0SW0oospdlJW7sj56k+jErA3+5x/rPUc3XfGBZOaU/PslH3rocRZhzK8MW7nNfuOmL+1AJ7SZW+hcRvsOF9mmEOOUED/m7lQPvrTBznehHeKnbcoUBkw8RdIx76RSG81YvLOcUFQaBI6yBis9iKvY= 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 1677498018684238.0271547233409; Mon, 27 Feb 2023 03:40:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpP-0007JM-HH; Mon, 27 Feb 2023 06:37:59 -0500 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 1pWboY-0005uK-7q for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:08 -0500 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 1pWboV-0005j3-Fr for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:04 -0500 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-404--wMXivTOPZSR-PLcy996ow-1; Mon, 27 Feb 2023 06:36:59 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 86DE085A588; Mon, 27 Feb 2023 11:36:59 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id C678B1121314; Mon, 27 Feb 2023 11:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497821; 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=GH/TiXzE15bAdeGOlrSnIksCXeY/s5lsyD4VhY7CYww=; b=J+Li/9E25b3wr1atLpiPzaHs3htX2WtS3wcd0oHhj3o53rhmJYUsIWhXDxLTUYlCpj+sli aFaMwZ+msGK1YYDYAnv7pDqgRG7MhqSwHqHz/1ja0Hv+71/zLMIDHit39fMUMD5GCjIY9Q yTuqDE83W4GcBLvZWR5tp5himT9r6Ko= X-MC-Unique: -wMXivTOPZSR-PLcy996ow-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: David Woodhouse Subject: [PULL 30/33] gitlab-ci.d/buildtest-template: Simplify the configure step Date: Mon, 27 Feb 2023 12:36:18 +0100 Message-Id: <20230227113621.58468-31-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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 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: 1677498019494100002 Content-Type: text/plain; charset="utf-8" It's easier to use ${TARGETS:+--target-list=3D"$TARGETS"} to add a --target-list parameter depending on whether the TARGETS variable is set or not. Message-Id: <20230207201447.566661-5-thuth@redhat.com> Reviewed-by: David Woodhouse Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest-template.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-t= emplate.yml index 73ecfabb8d..4a922d9c33 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -11,12 +11,10 @@ fi - mkdir build - cd build - - if test -n "$TARGETS"; - then - ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=3Dg= it} $CONFIGURE_ARGS --target-list=3D"$TARGETS" ; - else - ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=3Dg= it} $CONFIGURE_ARGS ; - fi || { cat config.log meson-logs/meson-log.txt && exit 1; } + - ../configure --enable-werror --disable-docs + ${LD_JOBS:+--meson=3Dgit} ${TARGETS:+--target-list=3D"$TARGETS"} + $CONFIGURE_ARGS || + { cat config.log meson-logs/meson-log.txt && exit 1; } - if test -n "$LD_JOBS"; then ../meson/meson.py configure . -Dbackend_max_links=3D"$LD_JOBS" ; --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677497951; cv=none; d=zohomail.com; s=zohoarc; b=ObF5yA4YNOMB/5DfvQYW+5wwUTU+CKwJKQjleN4roQn3g0L9p3PmqOW872SlXM0yGfUU2qVEK3J9XRbNabZMFAiPKHhZMMhFgmBhX3yw/XiadRLYB1U+a1przyFqhI+mcqbXtFC+fIu1Abr8RfmhtaW3jAEeYrI4iXD2zrX1hEA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677497951; 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=wY+HDwN8bbEHeKW+vGRSD/QSrfsqyGRGORgCIreSnTg=; b=CXxyf+h4nHNL/r/DM4bv+qtTZ5ut1oaXVXxy4gA35R9yJXKutgTWkV03nitN0TLSwwnroQ2vXitYmrmXpU3mVNlKxArVkDzC/94sdAZmizKl2qnidrHqjo5Mt/fqzSVsdfEKhpzCiOND5AX1h+uo9sBJSpPFhwEK+NddtZ7QzKQ= 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 1677497951827195.72993264747333; Mon, 27 Feb 2023 03:39:11 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpP-0007JP-G6; Mon, 27 Feb 2023 06:37:59 -0500 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 1pWboY-0005uO-Qu for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:08 -0500 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 1pWboW-0005jM-K2 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:06 -0500 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-634-wg358C5GOPKqjJ55yfYhxA-1; Mon, 27 Feb 2023 06:37:00 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 88836811E6E; Mon, 27 Feb 2023 11:37:00 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id C8E2C1121314; Mon, 27 Feb 2023 11:36:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497824; 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=wY+HDwN8bbEHeKW+vGRSD/QSrfsqyGRGORgCIreSnTg=; b=fYWIM+3CN8r+QIHVyqJcQ2SpMyErPRP2dqVvl5k5K6eyirtVAZMQlEaB3A4Paev7GWwEE/ L7Fg9bGe8lUCV55oKzlXbxbtad6QGZJgixkR03iptVzWHm4d77GcTELTXOgoFwTm53E5vy devgvH/B/WjTBc3WyZxQwnMjGbnA1co= X-MC-Unique: wg358C5GOPKqjJ55yfYhxA-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PULL 31/33] gitlab-ci.d: Build with --enable-fdt=system by default Date: Mon, 27 Feb 2023 12:36:19 +0100 Message-Id: <20230227113621.58468-32-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677497953006100003 By using --enable-fdt=3Dsystem we can make sure that the configure script does not try to check out the "dtc" submodule. This should help to safe some precious CI minutes in the long run. While we're at it, also drop some now-redundant --enable-slirp and --enable-capstone statements. These used to have the "=3Dsystem" suffix in the past, too, which has been dropped when the their corresponding submodules had been removed. Since these features are auto-enabled anyway now (since the containers have the right libraries installed), we do not need the explicit --enable-... statements anymore. Message-Id: <20230207201447.566661-6-thuth@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest-template.yml | 2 +- .gitlab-ci.d/buildtest.yml | 9 +++------ .gitlab-ci.d/crossbuild-template.yml | 5 +++-- .gitlab-ci.d/crossbuilds.yml | 2 ++ .gitlab-ci.d/windows.yml | 7 +++++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-t= emplate.yml index 4a922d9c33..cb96b55c3f 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -11,7 +11,7 @@ fi - mkdir build - cd build - - ../configure --enable-werror --disable-docs + - ../configure --enable-werror --disable-docs --enable-fdt=3Dsystem ${LD_JOBS:+--meson=3Dgit} ${TARGETS:+--target-list=3D"$TARGETS"} $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt && exit 1; } diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 8697c61072..d903c42798 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -41,7 +41,7 @@ build-system-ubuntu: job: amd64-ubuntu2004-container variables: IMAGE: ubuntu2004 - CONFIGURE_ARGS: --enable-docs --enable-fdt=3Dsystem --enable-capstone + CONFIGURE_ARGS: --enable-docs TARGETS: alpha-softmmu cris-softmmu hppa-softmmu microblazeel-softmmu mips64el-softmmu MAKE_CHECK_ARGS: check-build @@ -120,7 +120,6 @@ build-system-fedora: variables: IMAGE: fedora CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs - --enable-fdt=3Dsystem --enable-slirp --enable-capstone TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-soft= mmu MAKE_CHECK_ARGS: check-build @@ -166,9 +165,8 @@ build-system-centos: job: amd64-centos8-container variables: IMAGE: centos8 - CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=3Dsystem + CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-vfio-user-se= rver --enable-modules --enable-trace-backends=3Ddtrace --enable-docs - --enable-vfio-user-server TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu MAKE_CHECK_ARGS: check-build @@ -201,7 +199,6 @@ build-system-opensuse: job: amd64-opensuse-leap-container variables: IMAGE: opensuse-leap - CONFIGURE_ARGS: --enable-fdt=3Dsystem TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu MAKE_CHECK_ARGS: check-build artifacts: @@ -464,7 +461,7 @@ tsan-build: variables: IMAGE: ubuntu2004 CONFIGURE_ARGS: --enable-tsan --cc=3Dclang-10 --cxx=3Dclang++-10 - --enable-trace-backends=3Dust --enable-fdt=3Dsystem --disable-sl= irp + --enable-trace-backends=3Dust --disable-slirp TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user MAKE_CHECK_ARGS: bench V=3D1 =20 diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild= -template.yml index 6d709628f1..d07989e3b0 100644 --- a/.gitlab-ci.d/crossbuild-template.yml +++ b/.gitlab-ci.d/crossbuild-template.yml @@ -6,8 +6,9 @@ script: - mkdir build - cd build - - ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS - --disable-user --target-list-exclude=3D"arm-softmmu cris-softmmu + - ../configure --enable-werror --disable-docs --enable-fdt=3Dsystem + --disable-user $QEMU_CONFIGURE_OPTS $EXTRA_CONFIGURE_OPTS + --target-list-exclude=3D"arm-softmmu cris-softmmu i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu mips64-softmmu ppc-softmmu riscv32-softmmu sh4-softmmu sparc-softmmu xtensa-softmmu $CROSS_SKIP_TARGETS" diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index 57637c5127..101416080c 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -175,6 +175,7 @@ cross-win32-system: job: win32-fedora-cross-container variables: IMAGE: fedora-win32-cross + EXTRA_CONFIGURE_OPTS: --enable-fdt=3Dinternal CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu m68k-softmmu microblazeel-softmmu mips64el-softmmu nios2-softmmu artifacts: @@ -187,6 +188,7 @@ cross-win64-system: job: win64-fedora-cross-container variables: IMAGE: fedora-win64-cross + EXTRA_CONFIGURE_OPTS: --enable-fdt=3Dinternal CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu m68k-softmmu microblazeel-softmmu nios2-softmmu or1k-softmmu rx-softmmu sh4eb-softmmu sparc64-soft= mmu diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml index cf445b77f6..87235e43b4 100644 --- a/.gitlab-ci.d/windows.yml +++ b/.gitlab-ci.d/windows.yml @@ -38,6 +38,7 @@ msys2-64bit: mingw-w64-x86_64-capstone mingw-w64-x86_64-curl mingw-w64-x86_64-cyrus-sasl + mingw-w64-x86_64-dtc mingw-w64-x86_64-gcc mingw-w64-x86_64-glib2 mingw-w64-x86_64-gnutls @@ -71,7 +72,7 @@ msys2-64bit: # for the msys2 64-bit job, due to the build could not complete within # the project timeout. - ..\msys64\usr\bin\bash -lc '../configure --target-list=3Dx86_64-softmmu - --without-default-devices' + --without-default-devices --enable-fdt=3Dsystem' - ..\msys64\usr\bin\bash -lc 'make' # qTests don't run successfully with "--without-default-devices", # so let's exclude the qtests from CI for now. @@ -86,6 +87,7 @@ msys2-32bit: mingw-w64-i686-capstone mingw-w64-i686-curl mingw-w64-i686-cyrus-sasl + mingw-w64-i686-dtc mingw-w64-i686-gcc mingw-w64-i686-glib2 mingw-w64-i686-gnutls @@ -113,7 +115,8 @@ msys2-32bit: - $env:MSYS =3D 'winsymlinks:native' # Enable native Windows symlink - mkdir output - cd output - - ..\msys64\usr\bin\bash -lc '../configure --target-list=3Dppc64-softmmu' + - ..\msys64\usr\bin\bash -lc '../configure --target-list=3Dppc64-softmmu + --enable-fdt=3Dsystem' - ..\msys64\usr\bin\bash -lc 'make' - ..\msys64\usr\bin\bash -lc 'make check MTESTARGS=3D\"--no-suite qtest\= " || { cat meson-logs/testlog.txt; exit 1; }' --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498093; cv=none; d=zohomail.com; s=zohoarc; b=OZA91nO70xKGQG1emxEvDEL15E6EcxgYO4ZEQZwWcZNhMdlJXYTl+lv9Uh6SEDSX8ARP0OLhdNONnRmSiVWaHj5y08tqHU+d1kGI1IzaGSJz/6GBDf4MLFvfToSjCHAlnuVgz7vJ4LEy1WX/afohACV5jqos7+JFOvQ17RZObDA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498093; 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=jw8hBhirtWepa/XGvDp97V9pOe9gNgISwSWI/zZGAE8=; b=Yeltws+PAV9T1gHOeA3UgLpDYzxhSm5DjR+VstGiBlR9sU5VSGuOPIYAxgMfKXNiiIfXNn5p1nOa2jl/ZhRi5mING681QhPAhbdiSfYcexmQKOP3JIDe4EvTwC4iP6SCfeDlKsjTIpmgLVl7E6VsoCrrxBkI1aifTaTJIzY76ck= 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 1677498093706122.46728620072508; Mon, 27 Feb 2023 03:41:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpN-00073x-7Q; Mon, 27 Feb 2023 06:37:57 -0500 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 1pWbot-0006A9-Rr for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:33 -0500 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 1pWboX-0005je-Vg for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:11 -0500 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-642-sAWbUqVmP82k-_HJBd7xMw-1; Mon, 27 Feb 2023 06:37:01 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 66C95100F913; Mon, 27 Feb 2023 11:37:01 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id C91D21121314; Mon, 27 Feb 2023 11:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497825; 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=jw8hBhirtWepa/XGvDp97V9pOe9gNgISwSWI/zZGAE8=; b=W7E3QIWxhEUXiYIkxEBSzbevxZtvfSUHynhqpkdg/RGPcYBSpBuOi4zXkiyWftaez7CfJF giBNQgGuTyctgZSNEA3kCRAdMdhu/D9O6daz1X02vvTQzowdsj3pUc/fCiYMGnYg5HGP8m PzoFWSlq3KVzoqEHAuO5xpSf6NQI3Ng= X-MC-Unique: sAWbUqVmP82k-_HJBd7xMw-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 32/33] gitlab-ci.d/base: Mark jobs as interruptible by default Date: Mon, 27 Feb 2023 12:36:20 +0100 Message-Id: <20230227113621.58468-33-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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 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: 1677498095842100003 Content-Type: text/plain; charset="utf-8" When handling pull requests in the staging branch, it often happens that one of the job fails due to a problem, so that the pull request can't be merged. Peter/Richard/Stefan then informs the sender of the pull request and continues by pushing the next pending pull request from another subsystem maintainer. Now the problem is that there might still be lots of other running jobs in the pipeline of the first pull request, eating up precious CI minutes though the pipeline is not needed anymore. We can avoid this by marking the jobs as "interruptible". With this setting, the jobs from previous pipelines are automatically terminated when pushing a new one. If someone does not like this auto- matic termination, it can still be disabled in the settings of the repository. See this URL for details: https://docs.gitlab.com/ee/ci/yaml/index.html#interruptible Message-Id: <20230223191343.1064274-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- .gitlab-ci.d/base.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.d/base.yml b/.gitlab-ci.d/base.yml index 50fb59e147..0274228de8 100644 --- a/.gitlab-ci.d/base.yml +++ b/.gitlab-ci.d/base.yml @@ -11,6 +11,8 @@ # and show the duration of each line. FF_SCRIPT_SECTIONS: 1 =20 + interruptible: true + rules: ############################################################# # Stage 1: exclude scenarios where we definitely don't --=20 2.31.1 From nobody Tue May 14 23:40:07 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=1677498158; cv=none; d=zohomail.com; s=zohoarc; b=RnkqJz/TnPeeDmoDcjFC4r7xoZcao479IuhRlZBTn6AJ7ndbdKjQfW+cwgDJAZnxCgpJd5gkg8T0n9e2J2gv+N1VridlVpa8x/xDqZcTSp+N/EQ/+e1UUkaPeNxCL9NFinK8Ez4278t4hBpzhvCxvQpl1mhPkRVOaSHn6o6JP88= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677498158; 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=5ljH6cBBcNiI8kZSssVwvGVOfnz6Q5CfPyreEdKkCAE=; b=QeVBhKQ1hEa2bwqxafYzLhP+MT1YatkfVzuWcEEsoa6AaQgbbrJe094e9CcXM5u5oDazqSvWtEbO2GEMYOXA5fP0g3vF5d4iFTD4CKC2xTNHTNMiV7IPjI9AFIDrwivOJWsfbnUicATCrsmbe22ePQgNWQMsuhYPJwbG0ZO6lJs= 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 1677498158379422.21966781735; Mon, 27 Feb 2023 03:42:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbpQ-0007Sn-Jr; Mon, 27 Feb 2023 06:38:00 -0500 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 1pWboZ-0005uh-M2 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:08 -0500 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 1pWboY-0005jV-2i for qemu-devel@nongnu.org; Mon, 27 Feb 2023 06:37:07 -0500 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-212-deU-0k0fM1icQjYyU32O_w-1; Mon, 27 Feb 2023 06:37:03 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CEDDB100F910; Mon, 27 Feb 2023 11:37:02 +0000 (UTC) Received: from thuth.com (unknown [10.45.227.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id A811C1121314; Mon, 27 Feb 2023 11:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677497824; 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=5ljH6cBBcNiI8kZSssVwvGVOfnz6Q5CfPyreEdKkCAE=; b=Py1RbxbZv+ASPrZExWxaW/0P56RfpjHS7eczrTBvmNELfS3BRH05RY9e6kzt0eWIRk1sYT LHxFzh64HJ73yqykHRE0pdSxN+S54QfVB6uhfwb9wMqKWyuEkicKXEzT/eulHT6SXqLgKI o0DHTZU69mpedHngZCBnVG9RUWd8gow= X-MC-Unique: deU-0k0fM1icQjYyU32O_w-1 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Krempa , Igor Mammedov , Sunil V L Subject: [PULL 33/33] Deprecate the "-no-acpi" command line switch Date: Mon, 27 Feb 2023 12:36:21 +0100 Message-Id: <20230227113621.58468-34-thuth@redhat.com> In-Reply-To: <20230227113621.58468-1-thuth@redhat.com> References: <20230227113621.58468-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.3 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 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: 1677498160416100003 Similar to "-no-hpet", the "-no-acpi" switch is a legacy command line option that should be replaced with the "acpi" machine parameter nowadays. Message-Id: <20230224090543.1129677-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Krempa Reviewed-by: Igor Mammedov Reviewed-by: Sunil V L Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 6 ++++++ softmmu/vl.c | 1 + 2 files changed, 7 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index ee95bcb1a6..15084f7bea 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -99,6 +99,12 @@ form is preferred. The HPET setting has been turned into a machine property. Use ``-machine hpet=3Doff`` instead. =20 +``-no-acpi`` (since 8.0) +'''''''''''''''''''''''' + +The ``-no-acpi`` setting has been turned into a machine property. +Use ``-machine acpi=3Doff`` instead. + ``-accel hax`` (since 8.0) '''''''''''''''''''''''''' =20 diff --git a/softmmu/vl.c b/softmmu/vl.c index 6e526d95bb..f29e4c4dc3 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -3264,6 +3264,7 @@ void qemu_init(int argc, char **argv) vnc_parse(optarg); break; case QEMU_OPTION_no_acpi: + warn_report("-no-acpi is deprecated, use '-machine acpi=3D= off' instead"); qdict_put_str(machine_opts_dict, "acpi", "off"); break; case QEMU_OPTION_no_hpet: --=20 2.31.1