From nobody Wed Nov 27 09:58:24 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=1699382029; cv=none; d=zohomail.com; s=zohoarc; b=KNXKtbO0Ia1v7I8rdjUj6QM8+mMlQBxp9/MxrhP+d6SU71aYyDvnJaTK/J4yOirT80DQdopygazj6cgyWqXoGhWBArCkC5iapFTcdvdnXLB/tNbDvwhUcZhngEzgnEijXPSKcwf3oZwD2JqdPZfQr456Hb7BbG0TgR6A0IKFNlw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699382029; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nXkuHA5Mav5h6/3r7Nvq2XRtj2+v9KiN45t7aXlOnM0=; b=EwjucONQEpiJ4ZK30uc+mHcse+6IwT/swG13lJ0vojS1Wv+1ddPU2YDBJzTPxxQJNLbmZRfhpYZonxENgFADpxB8OOysYzpQS2TLAdW+aXlkTURcaxXkgzagtcr5f6uPr4y7oFnkKDr2FWmR6faN/y/ZB2d2piQEqIYACzc/MPw= 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 16993820299461012.6703007221237; Tue, 7 Nov 2023 10:33:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0QsQ-0002k8-Av; Tue, 07 Nov 2023 13:32:38 -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 1r0QsP-0002jy-Ke for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:37 -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 1r0QsO-0007N3-9Z for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:37 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-466-WRaacSCXMA6d9D1-Bo5D4Q-1; Tue, 07 Nov 2023 13:32:32 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 58B0F299E74C; Tue, 7 Nov 2023 18:32:32 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 100FA2166B26; Tue, 7 Nov 2023 18:32:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699381955; 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=nXkuHA5Mav5h6/3r7Nvq2XRtj2+v9KiN45t7aXlOnM0=; b=DOEIiQqYL3MRm6JMNhD+/XPGfxKmEmRY/RqDIdRrT9PMVRiVJ16TZAl8ijwpVagM3tQAtW mS72C0PqEiFn1oVUd/w4N+PDZwHRnS2bX+zFt4EpWQfKatuHol4MVBAkf6hH1Zk/7ku9qV wz60LQrgfOXU30ZHSPHppDqd+qJ7z1Y= X-MC-Unique: WRaacSCXMA6d9D1-Bo5D4Q-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Manos Pitsidianakis Subject: [PULL 01/11] MAINTAINERS: Add the virtio-gpu documentation to the corresponding section Date: Tue, 7 Nov 2023 19:32:18 +0100 Message-ID: <20231107183228.276424-2-thuth@redhat.com> In-Reply-To: <20231107183228.276424-1-thuth@redhat.com> References: <20231107183228.276424-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1699382031729100005 Content-Type: text/plain; charset="utf-8" Add virtio-gpu.rst to the corresponding section in MAINTAINERS, so that the maintainers gets CC:-ed on corresponding patches. Message-ID: <20231027060808.242442-1-thuth@redhat.com> Reviewed-by: Manos Pitsidianakis Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 59b92ee640..2058296ede 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2483,6 +2483,7 @@ S: Odd Fixes F: hw/display/virtio-gpu* F: hw/display/virtio-vga.* F: include/hw/virtio/virtio-gpu.h +F: docs/system/devices/virtio-gpu.rst =20 vhost-user-blk M: Raphael Norwitz --=20 2.41.0 From nobody Wed Nov 27 09:58:24 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=1699381981; cv=none; d=zohomail.com; s=zohoarc; b=CcsgD9pvhQ7lQWsKzkpqCLwMTCBNTtGTIK9HqzI1htTSDJI4T49DOu80H/XyqOeXAglPAunZ444XE+uWYwBkkPA8Owb650tZI1y8jyRxnfjt3gTIvw0u5tDzVmvdbgY8Dovh0EWV6D2b9CPcaofVZlZAmaHxGkA1LRkUglqLmr4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699381981; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=y+jM7zJ+8g8Ub9wzb3tzByA3h4eeNp2HtZxRKgIbAGU=; b=fdmb7aPReD8mhyWY1oH07MXcp8VRCqQxK39B7ElFX+SN7UjzissvpIvoyU+TgKOly6P2wptshnM/XXc/BVNaQA4G9E+4dTeiEa3p7OGzB/96ZK1/MkP8T/xedDMxNk4heXIOe0nKMpBkQdIzM0dZzgLJbTPzAqCKJv8IRRUMlH8= 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 16993819811471020.2488637407847; Tue, 7 Nov 2023 10:33:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0QsT-0002kg-5C; Tue, 07 Nov 2023 13:32: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 1r0QsR-0002kP-B4 for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:39 -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 1r0QsQ-0007N9-0n for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:39 -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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-221--7TLu6CbMeCWcJzyFpZATQ-1; Tue, 07 Nov 2023 13:32:33 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9C6E08F15C6; Tue, 7 Nov 2023 18:32:33 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id B56AD2166B26; Tue, 7 Nov 2023 18:32:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699381957; 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=y+jM7zJ+8g8Ub9wzb3tzByA3h4eeNp2HtZxRKgIbAGU=; b=WJedkUT2V5PaCgKOHQw6q4n7NhS1AajrLFVhL45KE8YZ9hYnZffRhVUBefH1+mU4AHagJW LM1Y+Jl4cPyYf13WcQZufA5YW+AJu7lCVOAayqaUbV7arF/6FfX7WwIePc0QOGS1C0yprI 8rI3/18kGiPj+2AjY9ITDlW+MZvTokI= X-MC-Unique: -7TLu6CbMeCWcJzyFpZATQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Helge Deller Subject: [PULL 02/11] MAINTAINERS: Add artist.c to the hppa machine section Date: Tue, 7 Nov 2023 19:32:19 +0100 Message-ID: <20231107183228.276424-3-thuth@redhat.com> In-Reply-To: <20231107183228.276424-1-thuth@redhat.com> References: <20231107183228.276424-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1699381981523100001 Content-Type: text/plain; charset="utf-8" The artist graphics adapter is only used by the hppa machine, so let's add this file to the corresponding section. Message-ID: <20231107103044.15089-1-thuth@redhat.com> Acked-by: Helge Deller Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2058296ede..a74ad6545b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1192,6 +1192,7 @@ M: Richard Henderson R: Helge Deller S: Odd Fixes F: configs/devices/hppa-softmmu/default.mak +F: hw/display/artist.c F: hw/hppa/ F: hw/input/lasips2.c F: hw/net/*i82596* --=20 2.41.0 From nobody Wed Nov 27 09:58:24 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=1699382082; cv=none; d=zohomail.com; s=zohoarc; b=Hj3LKO9uZeZRUxI1lGaQkZP/4KG98S05Lpb75Ed7BXCpjnmr4swpBpbvbcX5yzt1aqrrT+5/1NSpihEvM6Au+a9gfiotdgeZEREMWd5RwfbZfzuxOIZCTWb+4pNe3lWRnBOTOyMxbDsa0ztRXdk0B73cnLCtN90qdvf6GGp930U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699382082; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lRKWf+bSHa5OE55zlM7uSc3kgZtggzSYT+UT2TKPw9s=; b=DEYzT/HaOypVKQ72ZBQ9s7g/TCAfFerABwI1rGhfsF2AqgtFD/yLthi8p7pS2MTALrt9JcPpXGaS/CSRh/DAJz/ZwgVNqUk4A1mb0U517k0M9qoEGQmEK8IPpGdqAbKpvB5q9+oZH4UnHn8OSBokr2cvBVaHTCqAjBFC/7qIwUg= 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 1699382082215734.0833962241715; Tue, 7 Nov 2023 10:34:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0QsZ-0002qC-1E; Tue, 07 Nov 2023 13:32: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 1r0QsW-0002nj-CB for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:44 -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 1r0QsR-0007NQ-NV for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32: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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-416-yomrT2ihPVmHyDmtxgD4Iw-1; Tue, 07 Nov 2023 13:32:36 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A9706811E8D; Tue, 7 Nov 2023 18:32:35 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 207CE2166B26; Tue, 7 Nov 2023 18:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699381959; 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=lRKWf+bSHa5OE55zlM7uSc3kgZtggzSYT+UT2TKPw9s=; b=HY0DV7OhfWeTRpg5qQiUL+An083tKQL1owTOoXorAaoUh6IV91EwYa2+MwrqeP4sCI3AdF 4VxpjJVuUMQOO8P7gL8jtFBigWP028npcTfnf6vh5Zv51kN6zvakp8XufQyzrVdZPQbXYG mBPiMym0Sm2uC2HpChA17rQfvC/R788= X-MC-Unique: yomrT2ihPVmHyDmtxgD4Iw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 03/11] tests/avocado: Allow newer versions of tesseract in the nextcube test Date: Tue, 7 Nov 2023 19:32:20 +0100 Message-ID: <20231107183228.276424-4-thuth@redhat.com> In-Reply-To: <20231107183228.276424-1-thuth@redhat.com> References: <20231107183228.276424-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1699382084212100001 From: Thomas Huth Current Linux distros ship version 5 of the tesseract OCR software, so the nextcube screen test is ignored there. Let's make the check more flexible to allow newer versions, too, and remove the old v3 test since most Linux distros don't ship this version anymore. Message-ID: <20231101204323.35533-1-huth@tuxfamily.org> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- tests/avocado/machine_m68k_nextcube.py | 15 +++------------ tests/avocado/tesseract_utils.py | 4 ++-- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/tests/avocado/machine_m68k_nextcube.py b/tests/avocado/machine= _m68k_nextcube.py index f1205d7fc0..1f3c883910 100644 --- a/tests/avocado/machine_m68k_nextcube.py +++ b/tests/avocado/machine_m68k_nextcube.py @@ -55,25 +55,16 @@ def test_bootrom_framebuffer_size(self): self.assertEqual(width, 1120) self.assertEqual(height, 832) =20 - @skipUnless(tesseract_available(3), 'tesseract v3 OCR tool not availab= le') - def test_bootrom_framebuffer_ocr_with_tesseract_v3(self): - screenshot_path =3D os.path.join(self.workdir, "dump.ppm") - self.check_bootrom_framebuffer(screenshot_path) - lines =3D tesseract_ocr(screenshot_path, tesseract_version=3D3) - text =3D '\n'.join(lines) - self.assertIn('Backplane', text) - self.assertIn('Ethernet address', text) - # Tesseract 4 adds a new OCR engine based on LSTM neural networks. The # new version is faster and more accurate than version 3. The drawback= is # that it is still alpha-level software. - @skipUnless(tesseract_available(4), 'tesseract v4 OCR tool not availab= le') - def test_bootrom_framebuffer_ocr_with_tesseract_v4(self): + @skipUnless(tesseract_available(4), 'tesseract OCR tool not available') + def test_bootrom_framebuffer_ocr_with_tesseract(self): screenshot_path =3D os.path.join(self.workdir, "dump.ppm") self.check_bootrom_framebuffer(screenshot_path) lines =3D tesseract_ocr(screenshot_path, tesseract_version=3D4) text =3D '\n'.join(lines) - self.assertIn('Testing the FPU, SCC', text) + self.assertIn('Testing the FPU', text) self.assertIn('System test failed. Error code', text) self.assertIn('Boot command', text) self.assertIn('Next>', text) diff --git a/tests/avocado/tesseract_utils.py b/tests/avocado/tesseract_uti= ls.py index 72cd9ab798..476f528147 100644 --- a/tests/avocado/tesseract_utils.py +++ b/tests/avocado/tesseract_utils.py @@ -21,13 +21,13 @@ def tesseract_available(expected_version): version =3D res.stdout_text.split()[1] except IndexError: version =3D res.stderr_text.split()[1] - return int(version.split('.')[0]) =3D=3D expected_version + return int(version.split('.')[0]) >=3D expected_version =20 match =3D re.match(r'tesseract\s(\d)', res) if match is None: return False # now this is guaranteed to be a digit - return int(match.groups()[0]) =3D=3D expected_version + return int(match.groups()[0]) >=3D expected_version =20 =20 def tesseract_ocr(image_path, tesseract_args=3D'', tesseract_version=3D3): --=20 2.41.0 From nobody Wed Nov 27 09:58:24 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=1699382039; cv=none; d=zohomail.com; s=zohoarc; b=i1LAl58psRrwrJhI+Sm15ncszRWouIDipWO4DgsUaaaB7P+qF8ZQrBO4bfP43O9TTFhr6Ez/hY+9nGzpshFHLnAPphYbqM7WeAJQbc7MJWQDw+zhwx4s4MVfhLzp3gc5UHbw46mIJiPSS8dpBUHpWV91TPIFFD2VDaGTb9TuXwY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699382039; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=P9N4XAMcG1M7aNdTvXweTcO2BcWqwho18VxNhTCwbE0=; b=itjv7U6i75R1yX0RZfnG/wo0Q4xXHgNHppMU8HbiJmUrk+h4U6SiehKCxCfODBUT/IZdGtAeg/9yLEyIGbP4wD4FfD3Rw3ahU5/QwYtQ0DfHgCkRjJ/7hD0fVwVgIKUhhz9z7Rr7yrvX7BS2M50LCsVBSg2Mb51hH8fIty+ZFac= 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 1699382039094932.6735980854744; Tue, 7 Nov 2023 10:33:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0QsX-0002p7-T0; Tue, 07 Nov 2023 13:32: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 1r0QsW-0002ni-Bd for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32: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 1r0QsU-0007Ng-9v for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32: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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-479-45hdTzT5MZKhq0n5-vCASg-1; Tue, 07 Nov 2023 13:32:38 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A7C8E85A58B; Tue, 7 Nov 2023 18:32:37 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2CAC12166B27; Tue, 7 Nov 2023 18:32:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699381961; 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=P9N4XAMcG1M7aNdTvXweTcO2BcWqwho18VxNhTCwbE0=; b=IYX+d6NcI3XfawAbOQHumjZ+KtZh+AaonJlAEeNFzu2+58MgihH7y6bdNmmOqXEPoH8S+N vq/V91ROlAcBpWSmtciZFG1xpJBbTz5KtUn9+BG4zBhwiQ40DptLB32dUOItiKOUC+MJMO ejXr8JfGwSdygkvHHqiLmOl1q0yB/u0= X-MC-Unique: 45hdTzT5MZKhq0n5-vCASg-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Heiko Carstens , Eric Farman , Halil Pasic Subject: [PULL 04/11] s390/sclp: fix SCLP facility map Date: Tue, 7 Nov 2023 19:32:21 +0100 Message-ID: <20231107183228.276424-5-thuth@redhat.com> In-Reply-To: <20231107183228.276424-1-thuth@redhat.com> References: <20231107183228.276424-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1699382039747100001 Content-Type: text/plain; charset="utf-8" From: Heiko Carstens Qemu's SCLP implementation incorrectly reports that it supports CPU reconfiguration. If a guest issues a CPU reconfiguration request it is rejected as invalid command. Fix the SCLP_HAS_CPU_INFO mask, and remove the unused SCLP_CMDW_CONFIGURE_CPU and SCLP_CMDW_DECONFIGURE_CPU defines. Reviewed-by: Eric Farman Reviewed-by: Halil Pasic Signed-off-by: Heiko Carstens Message-ID: <20231024100703.929679-1-hca@linux.ibm.com> Signed-off-by: Thomas Huth --- include/hw/s390x/sclp.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/hw/s390x/sclp.h b/include/hw/s390x/sclp.h index 9aef6d9370..b4ecd04e23 100644 --- a/include/hw/s390x/sclp.h +++ b/include/hw/s390x/sclp.h @@ -38,10 +38,8 @@ #define MAX_STORAGE_INCREMENTS 1020 =20 /* CPU hotplug SCLP codes */ -#define SCLP_HAS_CPU_INFO 0x0C00000000000000ULL +#define SCLP_HAS_CPU_INFO 0x0800000000000000ULL #define SCLP_CMDW_READ_CPU_INFO 0x00010001 -#define SCLP_CMDW_CONFIGURE_CPU 0x00110001 -#define SCLP_CMDW_DECONFIGURE_CPU 0x00100001 =20 /* SCLP PCI codes */ #define SCLP_HAS_IOA_RECONFIG 0x0000000040000000ULL --=20 2.41.0 From nobody Wed Nov 27 09:58:24 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=1699382067; cv=none; d=zohomail.com; s=zohoarc; b=msKzFYNEMmT5HJTxIKpFXBBqdEhffxT9K6SRzhPzU888o02qtLh0FoYCyR6sAV/c4CdXdbls31WebxoH6D6WVibLHSPIxhxyi8xJMEnantVJ3UMShh6nzR/3Y7ZmOjpq804l9XkKnG2DXKP3EZmujxPArvfAJNkTz8I9sJCxvSE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699382067; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=u1onQi2xTufgGPZ8q4VhVUJlLf1xLry+UE2J87Ps60o=; b=btl8NEPI0xLCzbu80UxTYu8oJby/rwMolrQ7tkEtFWAvfFYp9dL2WI9y2GUnsY0EPzjLCBR8TU+se5qRUq4g29lkiKskCUCMTZD+J0s0HYVHwiCFE7IO6dY8H3iVnBR3SDYtTEAn5Kk+mqWNKcUll4jlv2XKy+4MjEdBYmhRyJY= 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 1699382067614522.5986808197897; Tue, 7 Nov 2023 10:34:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0QsY-0002pT-Fp; Tue, 07 Nov 2023 13:32:46 -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 1r0QsW-0002o1-Qw for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32: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 1r0QsV-0007Nx-7D for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32: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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-213-bjqdv6pKO8Spo_Xs0nJf3Q-1; Tue, 07 Nov 2023 13:32:39 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DDEF7185A786; Tue, 7 Nov 2023 18:32:38 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDB572166B26; Tue, 7 Nov 2023 18:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699381962; 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=u1onQi2xTufgGPZ8q4VhVUJlLf1xLry+UE2J87Ps60o=; b=DJwtLyF3b4P0ivT96RrZlDvhy8c9KeDlyf5hfWhnPyag3IC6vS8lPyHlKvcQataZOcNizs 0Iyx2deF7HbodW7JEDrL0D5/HF3qij63Jr38DAGkikup2RypXrZO1xfWYE0e5UzcL9xTzV xGhplWro1iEA52t7SptuiWLUTAu+lLM= X-MC-Unique: bjqdv6pKO8Spo_Xs0nJf3Q-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Hildenbrand Subject: [PULL 05/11] target/s390x/cpu_models: Use 'first_cpu' in s390_get_feat_block() Date: Tue, 7 Nov 2023 19:32:22 +0100 Message-ID: <20231107183228.276424-6-thuth@redhat.com> In-Reply-To: <20231107183228.276424-1-thuth@redhat.com> References: <20231107183228.276424-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1699382069833100003 From: Philippe Mathieu-Daud=C3=A9 We already have a global 'first_cpu' variable storing a pointer to the first CPU, no need to use a static one. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20231030093150.65297-1-philmd@linaro.org> Reviewed-by: David Hildenbrand Signed-off-by: Thomas Huth --- target/s390x/cpu_models.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 4dead48650..540d445023 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -196,11 +196,7 @@ uint32_t s390_get_ibc_val(void) =20 void s390_get_feat_block(S390FeatType type, uint8_t *data) { - static S390CPU *cpu; - - if (!cpu) { - cpu =3D S390_CPU(qemu_get_cpu(0)); - } + S390CPU *cpu =3D S390_CPU(first_cpu); =20 if (!cpu || !cpu->model) { return; --=20 2.41.0 From nobody Wed Nov 27 09:58:24 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=1699382078; cv=none; d=zohomail.com; s=zohoarc; b=HZJQ1OJz5IGX/u3KwoYleBRt7aC1heNPnhOxtQGrxFQ55VcOqNgJm5Jl1PH4JTboXzkLm1RXU+ydp/L22hGqB8dPudu+/CfsFtuq3YqfY+YKlPbK2iqmMJ3cyt5uwcxdVmQsl0a2RzBmLpplwucpxONW0/t90tXaRvkcEstM/1E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699382078; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vNBzpnOU4HIy+lNr3aW7/kOfqbgMTDfyI5ts4rQJcf4=; b=BLLCCHZ1LmbcaGlDGLo7YqYwT00V0EfEr3nVFww5wFgQairKSui83KLEbNkg2te0pQkONzK74he3RNaomrubiH3rpKZgbtYXFIGPZBSW/3OTnsnRUvDQXsQIN5qOwcfSmTdP7cZQTeAnktBL7R4X2LWV/YzsQYoPiaOLzEXdV/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 1699382078454453.9271120835009; Tue, 7 Nov 2023 10:34:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0QsZ-0002qj-NP; Tue, 07 Nov 2023 13:32: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 1r0QsY-0002pH-3w for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:46 -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 1r0QsW-0007OI-FJ for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:45 -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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-574-sfwXw-EzNp2ic5fmsEgffQ-1; Tue, 07 Nov 2023 13:32:41 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3746B185A783; Tue, 7 Nov 2023 18:32:41 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 317272166B27; Tue, 7 Nov 2023 18:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699381964; 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=vNBzpnOU4HIy+lNr3aW7/kOfqbgMTDfyI5ts4rQJcf4=; b=YFFLsnzsxUXphoy50fgGqTrXE3hJYu9QSghew0ScvVQljwjp5R2Kd78XHA5NNT3YmiR918 CbE+gpLTk0Cy1TQJdMsddp2CaLlLURcsfOaqmt9+D5y71a8oJrAZ2GxxNfy3xrYD8ZUetK eF8x64w4ubudgy+YF2sl+W7p+lkDK2I= X-MC-Unique: sfwXw-EzNp2ic5fmsEgffQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Ilya Leoshkevich , qemu-stable@nongnu.org, Richard Henderson , David Hildenbrand Subject: [PULL 06/11] target/s390x: Fix CLC corrupting cc_src Date: Tue, 7 Nov 2023 19:32:23 +0100 Message-ID: <20231107183228.276424-7-thuth@redhat.com> In-Reply-To: <20231107183228.276424-1-thuth@redhat.com> References: <20231107183228.276424-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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: 1699382079893100001 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich CLC updates cc_src before accessing the second operand; if the latter is inaccessible, the former ends up containing a bogus value. Fix by reading cc_src into a temporary first. Fixes: 4f7403d52b1c ("target-s390: Convert CLC") Closes: https://gitlab.com/qemu-project/qemu/-/issues/1865 Cc: qemu-stable@nongnu.org Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Reviewed-by: David Hildenbrand Message-ID: <20231106093605.1349201-2-iii@linux.ibm.com> Signed-off-by: Thomas Huth --- target/s390x/tcg/translate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 4bae1509f5..a0d6a2a35d 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -2007,6 +2007,7 @@ static DisasJumpType op_cksm(DisasContext *s, DisasOp= s *o) static DisasJumpType op_clc(DisasContext *s, DisasOps *o) { int l =3D get_field(s, l1); + TCGv_i64 src; TCGv_i32 vl; MemOp mop; =20 @@ -2016,9 +2017,11 @@ static DisasJumpType op_clc(DisasContext *s, DisasOp= s *o) case 4: case 8: mop =3D ctz32(l + 1) | MO_TE; - tcg_gen_qemu_ld_tl(cc_src, o->addr1, get_mem_index(s), mop); + /* Do not update cc_src yet: loading cc_dst may cause an exception= . */ + src =3D tcg_temp_new_i64(); + tcg_gen_qemu_ld_tl(src, o->addr1, get_mem_index(s), mop); tcg_gen_qemu_ld_tl(cc_dst, o->in2, get_mem_index(s), mop); - gen_op_update2_cc_i64(s, CC_OP_LTUGTU_64, cc_src, cc_dst); + gen_op_update2_cc_i64(s, CC_OP_LTUGTU_64, src, cc_dst); return DISAS_NEXT; default: vl =3D tcg_constant_i32(l); --=20 2.41.0 From nobody Wed Nov 27 09:58:24 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=1699382063; cv=none; d=zohomail.com; s=zohoarc; b=Bc+SfebiYDts5AYlFm9AMxwjfW+BpaPdvs666t8dYDSXy/L9dW5q+YpB/GCMsoI1UvCZHADazw4TtdMBgXVOzNK/di+aFumDLESRzbIPDB53Wi8o9kPdzTEX/g0FJl6mECf5264868b9DxALflZHz2XRGAgSj9lfgbNbcHlUTfQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699382063; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ubA66O50Knk7PN+0Jzi5BAyjq6VNaG1ymKy8TI/O8AQ=; b=jAOGQB7XcpPI0qBGx0NcRWJehUjODvFFoLhuSeTpfAkcNqCFCUF1BuC/EgExI18YlMLBQMLC9aZC3WronrlcqvlMa5Y82rO4YABtMmlM0D8YNV2OlMmYfTSQFyt2wM3Da+IQFGByGPgZx5kcK5xWJQfMGaCRcBJqn8CrQgFvoQU= 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 1699382063891103.76355617450952; Tue, 7 Nov 2023 10:34:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0Qsb-0002si-1M; Tue, 07 Nov 2023 13:32:49 -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 1r0QsZ-0002ql-Q6 for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32: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 1r0QsY-0007PU-5r for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:47 -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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-490-Ps3OYlFJPkeogs2V8TKbYA-1; Tue, 07 Nov 2023 13:32:43 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1BBB3811E86; Tue, 7 Nov 2023 18:32:43 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 87C222166B26; Tue, 7 Nov 2023 18:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699381965; 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=ubA66O50Knk7PN+0Jzi5BAyjq6VNaG1ymKy8TI/O8AQ=; b=bOjtjizeTxVrndkmLKjDpgzTgzaAoNhU/UMETnbG5/TGPB4fv28y34j7YOkMmBqbK3aKcT sxIJH1psw53J8LJmkIDNQv3luue1Y+/2K7yy+c5ejNhbeVTwWEsFGk7WWBRwNMjCmvFSSD zNy1YZxvLzoBChkjohoUcDunUJJsc7w= X-MC-Unique: Ps3OYlFJPkeogs2V8TKbYA-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Ilya Leoshkevich , Richard Henderson Subject: [PULL 07/11] tests/tcg/s390x: Test CLC with inaccessible second operand Date: Tue, 7 Nov 2023 19:32:24 +0100 Message-ID: <20231107183228.276424-8-thuth@redhat.com> In-Reply-To: <20231107183228.276424-1-thuth@redhat.com> References: <20231107183228.276424-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1699382065824100003 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-ID: <20231106093605.1349201-3-iii@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/clc.c | 48 +++++++++++++++++++++++++++++++++ tests/tcg/s390x/Makefile.target | 1 + 2 files changed, 49 insertions(+) create mode 100644 tests/tcg/s390x/clc.c diff --git a/tests/tcg/s390x/clc.c b/tests/tcg/s390x/clc.c new file mode 100644 index 0000000000..e14189bd75 --- /dev/null +++ b/tests/tcg/s390x/clc.c @@ -0,0 +1,48 @@ +/* + * Test the CLC instruction. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#include +#include +#include +#include +#include + +static void handle_sigsegv(int sig, siginfo_t *info, void *ucontext) +{ + mcontext_t *mcontext =3D &((ucontext_t *)ucontext)->uc_mcontext; + if (mcontext->gregs[0] !=3D 600) { + write(STDERR_FILENO, "bad r0\n", 7); + _exit(EXIT_FAILURE); + } + if (((mcontext->psw.mask >> 44) & 3) !=3D 1) { + write(STDERR_FILENO, "bad cc\n", 7); + _exit(EXIT_FAILURE); + } + _exit(EXIT_SUCCESS); +} + +int main(void) +{ + register unsigned long r0 asm("r0"); + unsigned long mem =3D 42, rhs =3D 500; + struct sigaction act; + int err; + + memset(&act, 0, sizeof(act)); + act.sa_sigaction =3D handle_sigsegv; + act.sa_flags =3D SA_SIGINFO; + err =3D sigaction(SIGSEGV, &act, NULL); + assert(err =3D=3D 0); + + r0 =3D 100; + asm("algr %[r0],%[rhs]\n" + "clc 0(8,%[mem]),0(0)\n" /* The 2nd operand will cause a SEGV. */ + : [r0] "+r" (r0) + : [mem] "r" (&mem) + , [rhs] "r" (rhs) + : "cc", "memory"); + + return EXIT_FAILURE; +} diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.tar= get index 826f0a18e4..ccd4f4e68d 100644 --- a/tests/tcg/s390x/Makefile.target +++ b/tests/tcg/s390x/Makefile.target @@ -41,6 +41,7 @@ TESTS+=3Dlarl TESTS+=3Dmdeb TESTS+=3Dcgebra TESTS+=3Dclgebr +TESTS+=3Dclc =20 cdsg: CFLAGS+=3D-pthread cdsg: LDFLAGS+=3D-pthread --=20 2.41.0 From nobody Wed Nov 27 09:58:24 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=1699382030; cv=none; d=zohomail.com; s=zohoarc; b=VDnga+HQrkcLrsM0vuHTICE7pAJlgEocYKVhHGcO+kZxYrGOBLhyr+8FS9dPam4J6MW10FLHjU8xDg0nhnQUSm/tu5PvjIBMC2srtu4Hfz5vHucHHLD1EVve5x8+PDo9SGO8lOGva8j3LdTQV+zAQ6xcLfTBBadFlcFU6qoWalE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699382030; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=IW47soXfphW+eoV4lhxIi411QoI1SQPgtHMfVAKYB7Q=; b=VmyFeXslsp7eLDNGye9H3S7mvjHUA9VPiA6BLMLQegIh2PL11lsA2qO53n90DaVIhs0rF1iw/93/GxTA2+fDZkhXUcZaKClCgt90Jbqqe5S57vM0QQls77ULmtTwNx4kzeN/Ggz30vCBRJV4VQGqkT69CHV8KX/FqGfW+1v6uI4= 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 1699382030120726.4214272718582; Tue, 7 Nov 2023 10:33:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0Qsc-0002tL-Kd; Tue, 07 Nov 2023 13:32:50 -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 1r0Qsb-0002ss-EH for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:49 -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 1r0QsZ-0007Pg-Ts for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:49 -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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-522-BXnGAFTdNrKP7Kpvx2V92g-1; Tue, 07 Nov 2023 13:32:45 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4EFCF85A5B5; Tue, 7 Nov 2023 18:32:45 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9224C2166B26; Tue, 7 Nov 2023 18:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699381967; 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=IW47soXfphW+eoV4lhxIi411QoI1SQPgtHMfVAKYB7Q=; b=CEWXdmDTP1nPDvqpVljCaAcNAVoCo0TVfgr9D/OHsO78WDqT5/OBPiu3RYJTirtQkzf/Of B+svwX2VmrIlT6mK9HQ74JbN/Ap+HsB6YONFEwvrSX7meusyrk5Bu1JC1Kqu0KXfXHKmDQ Hiv2zlBkeXcE5DjXOfwCTlQHTp+Me3E= X-MC-Unique: BXnGAFTdNrKP7Kpvx2V92g-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Ilya Leoshkevich , qemu-stable@nongnu.org, David Hildenbrand , Richard Henderson Subject: [PULL 08/11] target/s390x: Fix LAALG not updating cc_src Date: Tue, 7 Nov 2023 19:32:25 +0100 Message-ID: <20231107183228.276424-9-thuth@redhat.com> In-Reply-To: <20231107183228.276424-1-thuth@redhat.com> References: <20231107183228.276424-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1699382031738100006 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich LAALG uses op_laa() and wout_addu64(). The latter expects cc_src to be set, but the former does not do it. This can lead to assertion failures if something sets cc_src to neither 0 nor 1 before. Fix by introducing op_laa_addu64(), which sets cc_src, and using it for LAALG. Fixes: 4dba4d6fef61 ("target/s390x: Use atomic operations for LOAD AND OP") Cc: qemu-stable@nongnu.org Signed-off-by: Ilya Leoshkevich Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Message-ID: <20231106093605.1349201-4-iii@linux.ibm.com> Signed-off-by: Thomas Huth --- target/s390x/tcg/insn-data.h.inc | 2 +- target/s390x/tcg/translate.c | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.= h.inc index 0bfd88d3c3..2f07f39d9c 100644 --- a/target/s390x/tcg/insn-data.h.inc +++ b/target/s390x/tcg/insn-data.h.inc @@ -442,7 +442,7 @@ D(0xebe8, LAAG, RSY_a, ILA, r3, a2, new, in2_r1, laa, adds64, MO_TE= UQ) /* LOAD AND ADD LOGICAL */ D(0xebfa, LAAL, RSY_a, ILA, r3_32u, a2, new, in2_r1_32, laa, addu32= , MO_TEUL) - D(0xebea, LAALG, RSY_a, ILA, r3, a2, new, in2_r1, laa, addu64, MO_TE= UQ) + D(0xebea, LAALG, RSY_a, ILA, r3, a2, new, in2_r1, laa_addu64, addu64= , MO_TEUQ) /* LOAD AND AND */ D(0xebf4, LAN, RSY_a, ILA, r3_32s, a2, new, in2_r1_32, lan, nz32, = MO_TESL) D(0xebe4, LANG, RSY_a, ILA, r3, a2, new, in2_r1, lan, nz64, MO_TEUQ) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index a0d6a2a35d..62ab2be8b1 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -2677,17 +2677,32 @@ static DisasJumpType op_kxb(DisasContext *s, DisasO= ps *o) return DISAS_NEXT; } =20 -static DisasJumpType op_laa(DisasContext *s, DisasOps *o) +static DisasJumpType help_laa(DisasContext *s, DisasOps *o, bool addu64) { /* The real output is indeed the original value in memory; recompute the addition for the computation of CC. */ tcg_gen_atomic_fetch_add_i64(o->in2, o->in2, o->in1, get_mem_index(s), s->insn->data | MO_ALIGN); /* However, we need to recompute the addition for setting CC. */ - tcg_gen_add_i64(o->out, o->in1, o->in2); + if (addu64) { + tcg_gen_movi_i64(cc_src, 0); + tcg_gen_add2_i64(o->out, cc_src, o->in1, cc_src, o->in2, cc_src); + } else { + tcg_gen_add_i64(o->out, o->in1, o->in2); + } return DISAS_NEXT; } =20 +static DisasJumpType op_laa(DisasContext *s, DisasOps *o) +{ + return help_laa(s, o, false); +} + +static DisasJumpType op_laa_addu64(DisasContext *s, DisasOps *o) +{ + return help_laa(s, o, true); +} + static DisasJumpType op_lan(DisasContext *s, DisasOps *o) { /* The real output is indeed the original value in memory; --=20 2.41.0 From nobody Wed Nov 27 09:58:24 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=1699382043; cv=none; d=zohomail.com; s=zohoarc; b=eisRGRUwgH3gYTBN6G54ySVkwITU3XMSRAKRkXOK8Ly4GrMkNDzobkefKx6Xt2nSuioWbLk2AOCxQspFRN7xZPcIc6iXLdfQGpGzhOqgNfwoO+qOH5/nSu8CkV5aADH0cK2AeuRJvAexmNUMX5bAD0JbQjh9Xhktb8RlKvL6E1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699382043; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mZaM0lM3k4ZdcSeHTINAPJ/0VP6fWWoldGeW+B3y4KE=; b=VhNvjj0i2SD2C8OOlQAURQgTxqh4LI6hjPnocnpZIfMAgccRJuiFZTM/6eVA2ExEpOI8OzFLIVHCinUCBD3A1pOxcYRd6KqLRfN+USnNwk7WqfJdr7KLmxDAtf/MIlqEsWKoLGH56QSX+EmPiyOqZw6uIzU0pQNtk+KAv7rYFbM= 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 1699382043892980.1897227671834; Tue, 7 Nov 2023 10:34:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0Qsi-0002vP-5d; Tue, 07 Nov 2023 13:32: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 1r0Qsf-0002ub-Mv for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:53 -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 1r0Qsd-0007QD-1t for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:52 -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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-650-OPV0UvGTMf-Hy8TbXfTecg-1; Tue, 07 Nov 2023 13:32:47 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CD3A9811E8F; Tue, 7 Nov 2023 18:32:46 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 934922166B26; Tue, 7 Nov 2023 18:32:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699381970; 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=mZaM0lM3k4ZdcSeHTINAPJ/0VP6fWWoldGeW+B3y4KE=; b=MXHf3t6VoMtQhH31+VhdtjYiIAiCimQV7FbymSK7BMrTYCVRswapl2QjUxvu1x05kaNuUV 9XJeEPgoWD7bvF+s0LC1AqWcqv9U0JVzJtjjAI3AXGYZDPNGkOi94m7w3IObpRHsBchyCw jDwW9UJlbuFH6lO4VE10Hnzvi4KkxwA= X-MC-Unique: OPV0UvGTMf-Hy8TbXfTecg-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Ilya Leoshkevich , Richard Henderson Subject: [PULL 09/11] tests/tcg/s390x: Test LAALG with negative cc_src Date: Tue, 7 Nov 2023 19:32:26 +0100 Message-ID: <20231107183228.276424-10-thuth@redhat.com> In-Reply-To: <20231107183228.276424-1-thuth@redhat.com> References: <20231107183228.276424-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1699382045777100003 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-ID: <20231106093605.1349201-5-iii@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/laalg.c | 27 +++++++++++++++++++++++++++ tests/tcg/s390x/Makefile.target | 1 + 2 files changed, 28 insertions(+) create mode 100644 tests/tcg/s390x/laalg.c diff --git a/tests/tcg/s390x/laalg.c b/tests/tcg/s390x/laalg.c new file mode 100644 index 0000000000..797d168bb1 --- /dev/null +++ b/tests/tcg/s390x/laalg.c @@ -0,0 +1,27 @@ +/* + * Test the LAALG instruction. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#include +#include + +int main(void) +{ + unsigned long cc =3D 0, op1, op2 =3D 40, op3 =3D 2; + + asm("slgfi %[cc],1\n" /* Set cc_src =3D -1. */ + "laalg %[op1],%[op3],%[op2]\n" + "ipm %[cc]" + : [cc] "+r" (cc) + , [op1] "=3Dr" (op1) + , [op2] "+T" (op2) + : [op3] "r" (op3) + : "cc"); + + assert(cc =3D=3D 0xffffffff10ffffff); + assert(op1 =3D=3D 40); + assert(op2 =3D=3D 42); + + return EXIT_SUCCESS; +} diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.tar= get index ccd4f4e68d..a476547b65 100644 --- a/tests/tcg/s390x/Makefile.target +++ b/tests/tcg/s390x/Makefile.target @@ -42,6 +42,7 @@ TESTS+=3Dmdeb TESTS+=3Dcgebra TESTS+=3Dclgebr TESTS+=3Dclc +TESTS+=3Dlaalg =20 cdsg: CFLAGS+=3D-pthread cdsg: LDFLAGS+=3D-pthread --=20 2.41.0 From nobody Wed Nov 27 09:58:24 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=1699382072; cv=none; d=zohomail.com; s=zohoarc; b=ZCui4iuBh2J+MnIewbVxl8mglP4QL1w57dC6QYffer7Fe/vXWfBukF43ZE8dxkeeWDYzs/3ry/G7W3sjeGaIEv738QvgCzS/2YGU37q//8D5NteHcKTyp1TCz+darzAlqJXp+rILN2en9H4fdhg+FeIUCN+Nlepfgz4mGOSaC2s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699382072; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0hRYBjcj2W+Zbjl0cv92FXFJYMNyto1lD0c7MJweonU=; b=NU00N2fpMtKfqNe9EinnzNvrI4dPcFODLNDJZHJwDP9tFe4+hqTyC37WH4+rbRyXgOt9daRleMGmfnTgPR+jPQEmYlYLAvUfmpdHQhhJBe1Qun8FjFGnR8TMPMfv4CnlR1Cnhurbt1boRd74bHDgHzESVH83wHPtJ/ZxQBHmTRA= 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 1699382072858989.8815163793714; Tue, 7 Nov 2023 10:34:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0Qsh-0002v7-2h; Tue, 07 Nov 2023 13:32: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 1r0Qsf-0002uc-OD for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:53 -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 1r0Qsc-0007Q6-FU for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:52 -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.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-638-toyCzIfqObGn2SKJEJ0XYQ-1; Tue, 07 Nov 2023 13:32:48 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 62FDF9423C1; Tue, 7 Nov 2023 18:32:48 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1911F2166B26; Tue, 7 Nov 2023 18:32:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699381970; 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=0hRYBjcj2W+Zbjl0cv92FXFJYMNyto1lD0c7MJweonU=; b=NOyvf9JgzV/tT/PNcs8ZSqvIkvjJj2weinDFOsa6hSavkc1nzebUVQn7jMtlzfwpPDx7w4 w9sBJD9r/2NL8FOXQvOeHceCXKDEfQV+LbYsZSyguYlBfXGVi6TBej0rO23riQBrEFLLQs 2/hyK4BO6Ktv1NLMpTjkjUhqm59gy4Q= X-MC-Unique: toyCzIfqObGn2SKJEJ0XYQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Ilya Leoshkevich Subject: [PULL 10/11] tests/tcg/s390x: Test ADD LOGICAL WITH CARRY Date: Tue, 7 Nov 2023 19:32:27 +0100 Message-ID: <20231107183228.276424-11-thuth@redhat.com> In-Reply-To: <20231107183228.276424-1-thuth@redhat.com> References: <20231107183228.276424-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1699382073954100003 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich Add a test that tries different combinations of ADD LOGICAL WITH CARRY instructions. Signed-off-by: Ilya Leoshkevich Message-ID: <20231106093605.1349201-6-iii@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/add-logical-with-carry.c | 156 +++++++++++++++++++++++ tests/tcg/s390x/Makefile.target | 1 + 2 files changed, 157 insertions(+) create mode 100644 tests/tcg/s390x/add-logical-with-carry.c diff --git a/tests/tcg/s390x/add-logical-with-carry.c b/tests/tcg/s390x/add= -logical-with-carry.c new file mode 100644 index 0000000000..d982f8a651 --- /dev/null +++ b/tests/tcg/s390x/add-logical-with-carry.c @@ -0,0 +1,156 @@ +/* + * Test ADD LOGICAL WITH CARRY instructions. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#include +#include + +static const struct test { + const char *name; + unsigned long values[3]; + unsigned long exp_sum; + int exp_cc; +} tests[] =3D { + /* + * Each test starts with CC 0 and executes two chained ADD LOGICAL WITH + * CARRY instructions on three input values. The values must be compat= ible + * with both 32- and 64-bit test functions. + */ + + /* NAME VALUES EXP_SUM EXP_CC */ + { "cc0->cc0", {0, 0, 0}, 0, 0, }, + { "cc0->cc1", {0, 0, 42}, 42, 1, }, + /* cc0->cc2 is not possible */ + /* cc0->cc3 is not possible */ + /* cc1->cc0 is not possible */ + { "cc1->cc1", {-3, 1, 1}, -1, 1, }, + { "cc1->cc2", {-3, 1, 2}, 0, 2, }, + { "cc1->cc3", {-3, 1, -1}, -3, 3, }, + /* cc2->cc0 is not possible */ + { "cc2->cc1", {-1, 1, 1}, 2, 1, }, + { "cc2->cc2", {-1, 1, -1}, 0, 2, }, + /* cc2->cc3 is not possible */ + /* cc3->cc0 is not possible */ + { "cc3->cc1", {-1, 2, 1}, 3, 1, }, + { "cc3->cc2", {-1, 2, -2}, 0, 2, }, + { "cc3->cc3", {-1, 2, -1}, 1, 3, }, +}; + +/* Test ALCR (register variant) followed by ALC (memory variant). */ +static unsigned long test32rm(unsigned long a, unsigned long b, + unsigned long c, int *cc) +{ + unsigned int a32 =3D a, b32 =3D b, c32 =3D c; + + asm("xr %[cc],%[cc]\n" + "alcr %[a],%[b]\n" + "alc %[a],%[c]\n" + "ipm %[cc]" + : [a] "+&r" (a32), [cc] "+&r" (*cc) + : [b] "r" (b32), [c] "T" (c32) + : "cc"); + *cc >>=3D 28; + + return (int)a32; +} + +/* Test ALC (memory variant) followed by ALCR (register variant). */ +static unsigned long test32mr(unsigned long a, unsigned long b, + unsigned long c, int *cc) +{ + unsigned int a32 =3D a, b32 =3D b, c32 =3D c; + + asm("xr %[cc],%[cc]\n" + "alc %[a],%[b]\n" + "alcr %[c],%[a]\n" + "ipm %[cc]" + : [a] "+&r" (a32), [c] "+&r" (c32), [cc] "+&r" (*cc) + : [b] "T" (b32) + : "cc"); + *cc >>=3D 28; + + return (int)c32; +} + +/* Test ALCGR (register variant) followed by ALCG (memory variant). */ +static unsigned long test64rm(unsigned long a, unsigned long b, + unsigned long c, int *cc) +{ + asm("xr %[cc],%[cc]\n" + "alcgr %[a],%[b]\n" + "alcg %[a],%[c]\n" + "ipm %[cc]" + : [a] "+&r" (a), [cc] "+&r" (*cc) + : [b] "r" (b), [c] "T" (c) + : "cc"); + *cc >>=3D 28; + return a; +} + +/* Test ALCG (memory variant) followed by ALCGR (register variant). */ +static unsigned long test64mr(unsigned long a, unsigned long b, + unsigned long c, int *cc) +{ + asm("xr %[cc],%[cc]\n" + "alcg %[a],%[b]\n" + "alcgr %[c],%[a]\n" + "ipm %[cc]" + : [a] "+&r" (a), [c] "+&r" (c), [cc] "+&r" (*cc) + : [b] "T" (b) + : "cc"); + *cc >>=3D 28; + return c; +} + +static const struct test_func { + const char *name; + unsigned long (*ptr)(unsigned long, unsigned long, unsigned long, int = *); +} test_funcs[] =3D { + { "test32rm", test32rm }, + { "test32mr", test32mr }, + { "test64rm", test64rm }, + { "test64mr", test64mr }, +}; + +static const struct test_perm { + const char *name; + size_t a_idx, b_idx, c_idx; +} test_perms[] =3D { + { "a, b, c", 0, 1, 2 }, + { "b, a, c", 1, 0, 2 }, +}; + +int main(void) +{ + unsigned long a, b, c, sum; + int result =3D EXIT_SUCCESS; + const struct test_func *f; + const struct test_perm *p; + size_t i, j, k; + const struct test *t; + int cc; + + for (i =3D 0; i < sizeof(tests) / sizeof(tests[0]); i++) { + t =3D &tests[i]; + for (j =3D 0; j < sizeof(test_funcs) / sizeof(test_funcs[0]); j++)= { + f =3D &test_funcs[j]; + for (k =3D 0; k < sizeof(test_perms) / sizeof(test_perms[0]); = k++) { + p =3D &test_perms[k]; + a =3D t->values[p->a_idx]; + b =3D t->values[p->b_idx]; + c =3D t->values[p->c_idx]; + sum =3D f->ptr(a, b, c, &cc); + if (sum !=3D t->exp_sum || cc !=3D t->exp_cc) { + fprintf(stderr, + "[ FAILED ] %s %s(0x%lx, 0x%lx, 0x%lx) retur= ned 0x%lx cc %d, expected 0x%lx cc %d\n", + t->name, f->name, a, b, c, sum, cc, + t->exp_sum, t->exp_cc); + result =3D EXIT_FAILURE; + } + } + } + } + + return result; +} diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.tar= get index a476547b65..0e670f3f8b 100644 --- a/tests/tcg/s390x/Makefile.target +++ b/tests/tcg/s390x/Makefile.target @@ -43,6 +43,7 @@ TESTS+=3Dcgebra TESTS+=3Dclgebr TESTS+=3Dclc TESTS+=3Dlaalg +TESTS+=3Dadd-logical-with-carry =20 cdsg: CFLAGS+=3D-pthread cdsg: LDFLAGS+=3D-pthread --=20 2.41.0 From nobody Wed Nov 27 09:58:24 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=1699382011; cv=none; d=zohomail.com; s=zohoarc; b=NH6lCg4KXJFvMhl1i321eGit7xIQ0oLy4i2ZO94pX6/+ADRC83VRwHlw4sj6arhsZiHj86IHhQ5/+9e5YUqUf53aGwIk2cAyFMCUkSFIkjUEcFwaaAsPV5tee3jzVgBl5ZH5MOrTlY7tImB0EPv6wAIPwx864S9mVFRngVTwaBc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699382011; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=DZ22M0ErlM+kwkIYMe4Wkn3BowRlG1ILztjN4wadLWU=; b=RBHn8gT/1I/AZkiXSjN7Eei/4C5EIL+WkawKIV+Q7vHTe1LXl9nPpjmEG94j0DfUFZ2hWCZjXVMbDvy5y4HJnQt/GEABP6Mv6n7PDHX3hXH6Pglc/7oIJC4VslcknuA02t2miroeorwGUqViVXm90A5G+1O/RpZl7e63irVDZWs= 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 1699382011280330.6692512491088; Tue, 7 Nov 2023 10:33:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0Qsk-0002xg-Me; Tue, 07 Nov 2023 13:32: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 1r0Qsi-0002vk-TH for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:56 -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 1r0Qsd-0007QV-T6 for qemu-devel@nongnu.org; Tue, 07 Nov 2023 13:32:56 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-604-WnGn5e7kOomBgqD25pzZzA-1; Tue, 07 Nov 2023 13:32:49 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7C87638041C5; Tue, 7 Nov 2023 18:32:49 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id A61C22166B26; Tue, 7 Nov 2023 18:32:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699381971; 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=DZ22M0ErlM+kwkIYMe4Wkn3BowRlG1ILztjN4wadLWU=; b=L6KuBmD/gttKQ1MNq00pSMrUzvTmTS3EuvMxyNEvhWvcbRpkoXn7is6WHg/BcToWEPjnIE rn/txJwiQW4h5DMSPpkVyr7/KZ2Aowa/QeSPQKB/+FvF3C39FSm/f19LlY2JyJxWalDw/S Jg4gehUzJS61J3eq5O6iaArR6fMaG84= X-MC-Unique: WnGn5e7kOomBgqD25pzZzA-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Nina Schoetterl-Glausch Subject: [PULL 11/11] target/s390x/cpu topology: Fix ordering and creation of TLEs Date: Tue, 7 Nov 2023 19:32:28 +0100 Message-ID: <20231107183228.276424-12-thuth@redhat.com> In-Reply-To: <20231107183228.276424-1-thuth@redhat.com> References: <20231107183228.276424-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1699382011662100001 Content-Type: text/plain; charset="utf-8" From: Nina Schoetterl-Glausch In case of horizontal polarization entitlement has no effect on ordering. Moreover, since the comparison is used to insert CPUs at the correct position in the TLE list, this affects the creation of TLEs and now correctly collapses horizontally polarized CPUs into one TLE. Fixes: f4f54b582f ("target/s390x/cpu topology: handle STSI(15) and build th= e SYSIB") Signed-off-by: Nina Schoetterl-Glausch Message-ID: <20231027163637.3060537-1-nsg@linux.ibm.com> Signed-off-by: Thomas Huth --- target/s390x/kvm/stsi-topology.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target/s390x/kvm/stsi-topology.c b/target/s390x/kvm/stsi-topol= ogy.c index efd2aa71f1..c8d6389cd8 100644 --- a/target/s390x/kvm/stsi-topology.c +++ b/target/s390x/kvm/stsi-topology.c @@ -210,6 +210,9 @@ static S390TopologyId s390_topology_from_cpu(S390CPU *c= pu) static int s390_topology_id_cmp(const S390TopologyId *l, const S390TopologyId *r) { + int l_polarization =3D l->vertical ? l->entitlement : 0; + int r_polarization =3D r->vertical ? r->entitlement : 0; + /* * lexical order, compare less significant values only if more signifi= cant * ones are equal @@ -219,9 +222,8 @@ static int s390_topology_id_cmp(const S390TopologyId *l, l->book - r->book ?: l->socket - r->socket ?: l->type - r->type ?: - /* logic is inverted for the next three */ - r->vertical - l->vertical ?: - r->entitlement - l->entitlement ?: + /* logic is inverted for the next two */ + r_polarization - l_polarization ?: r->dedicated - l->dedicated ?: l->origin - r->origin; } --=20 2.41.0