From nobody Thu May 16 06:50:08 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=1693509506; cv=none; d=zohomail.com; s=zohoarc; b=jAzngEgeuL1dDnBWr2TLfm54Tan/EeN6ZAEUTDZMR8wjpBl6+KFFs8syd1mMVyrWwA/FdS8JCuACTPZPh4+AcrtsBe0yhx/iD5mNGit+gaBVBRrQvPBB9kDrraZXF7sHMdAt/Q5Yo5r8KLBcR/qZBqU63OKPv33jYzDEk6ufZQ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693509506; 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=jdgP5F/yXX+hJjmU4snMPTChZc1rm4GZdPcoUAT34Tg=; b=iIAscD//9t0xk42ba3iRqASae/wxkwqIf+i4zu4UzHXtfODosGF9La9JpVnuigVaLIzH+Yst1omHLpG7Cse7LiCujRA5FUQfgYr2gDjl2SfcEgwW/Eyx/su8XxFg7Kv+z6773ijVwWdkfeKeA3kLLqH7HdrDSUQtFvFYId8/7z4= 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 1693509506232660.4426347949727; Thu, 31 Aug 2023 12:18:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbnAe-00005E-Cf; Thu, 31 Aug 2023 15:17:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAc-0008WG-HL for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAZ-0001wF-4E for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:34 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-503-vy1UoK7bP3WONnOqTfnUNQ-1; Thu, 31 Aug 2023 15:17:26 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CC982805F5B; Thu, 31 Aug 2023 19:17:25 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id B37CA63F7A; Thu, 31 Aug 2023 19:17:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693509449; 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=jdgP5F/yXX+hJjmU4snMPTChZc1rm4GZdPcoUAT34Tg=; b=DF9Y/MQYMEmTimW9METCkeVcOC5r8ZjIhL397+TKZ0ZQQh9TM0J9PhyaW9tWwbGv1u6TY3 zsVKROhkHVkZwkaZIqI6emHqa2PU/wMOt68BOjexkBfMGHXXBlW8sFIWe9icOI9ZrPCJAd GqaHZNWCYdENBqB3A4D6L3Y3fB0iFUc= X-MC-Unique: vy1UoK7bP3WONnOqTfnUNQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Ilya Leoshkevich , David Hildenbrand Subject: [PULL 1/7] target/s390x: Define TARGET_HAS_PRECISE_SMC Date: Thu, 31 Aug 2023 21:17:13 +0200 Message-Id: <20230831191719.140001-2-thuth@redhat.com> In-Reply-To: <20230831191719.140001-1-thuth@redhat.com> References: <20230831191719.140001-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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 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: 1693509508178100006 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich PoP (Sequence of Storage References -> Instruction Fetching) says: ... if a store that is conceptually earlier is made by the same CPU using the same effective address as that by which the instruction is subse- quently fetched, the updated information is obtained ... QEMU already has support for this in the common code; enable it for s390x. Signed-off-by: Ilya Leoshkevich Message-Id: <20230807114921.438881-1-iii@linux.ibm.com> Acked-by: David Hildenbrand Signed-off-by: Thomas Huth --- target/s390x/cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index eb5b65b7d3..304029e57c 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -36,6 +36,8 @@ /* The z/Architecture has a strong memory model with some store-after-load= re-ordering */ #define TCG_GUEST_DEFAULT_MO (TCG_MO_ALL & ~TCG_MO_ST_LD) =20 +#define TARGET_HAS_PRECISE_SMC + #define TARGET_INSN_START_EXTRA_WORDS 2 =20 #define MMU_USER_IDX 0 --=20 2.39.3 From nobody Thu May 16 06:50:08 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=1693509501; cv=none; d=zohomail.com; s=zohoarc; b=VRvkWJ3zkJwPef/5v+xaPxyOmMNt81M3VhcK34JHFNYd81S9SKeG3wBesmBE4ufFuY6kEKlNcpXaZP/k1FXPg7i3QGgO+b6fYTSRquEkQRJg2WLvTDhvn3Kc7cZZZUhBXgDKDYQJWNrC9KXEMm7n7gnT3NAGLULKFdt01kQLhtY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693509501; 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=52qLlz5c3JUAJMjtDe1EUv+O4wVeVL3aowZhXNrGHO4=; b=X5oCaffYciTMfCU3xbG5hWaSVJeb3rc4AtH15xXDKn9DYgloVWhXjwC3RYZfV3QJAf2OtGapkztiER07zuaIClUQCLpjFvRmVBjAzgu4zYcrm67kj0RDM0kfBCAOcmwPZE5RUuPbYRiuklkVGdQYrQpmNhIKs/ohrE01aDdWwKs= 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 1693509501539480.3006009806295; Thu, 31 Aug 2023 12:18:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbnAg-00005x-Oa; Thu, 31 Aug 2023 15:17:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAc-0008WN-Qb for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAZ-0001wQ-B0 for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:34 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-374-viIMyMamOSGV-91KvkdQmg-1; Thu, 31 Aug 2023 15:17:27 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 01777101A5B4; Thu, 31 Aug 2023 19:17:27 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F1575CC05; Thu, 31 Aug 2023 19:17:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693509450; 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=52qLlz5c3JUAJMjtDe1EUv+O4wVeVL3aowZhXNrGHO4=; b=eQP+aYwq6tsgieVGnh9r+vgYNq9+dKaUtJY+d6ztI746gkc0dx7YCaKwWItLjb9VTudXNa S2XEKk8ms69TtoUpryhHmf4kI8pCeroV3i9xZOK8aR9I+mIEO7oOa6nH6bKuK+lnB/L/uU j70iVXStI7k3iIiV1GcBHh5Hxejy/7A= X-MC-Unique: viIMyMamOSGV-91KvkdQmg-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Ilya Leoshkevich Subject: [PULL 2/7] tests/tcg/s390x: Test precise self-modifying code handling Date: Thu, 31 Aug 2023 21:17:14 +0200 Message-Id: <20230831191719.140001-3-thuth@redhat.com> In-Reply-To: <20230831191719.140001-1-thuth@redhat.com> References: <20230831191719.140001-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1693509502177100001 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich Add small softmmu and user tests to prevent regressions. Signed-off-by: Ilya Leoshkevich Message-Id: <20230807114921.438881-2-iii@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/precise-smc-user.c | 39 +++++++++++++++ tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/precise-smc-softmmu.S | 63 +++++++++++++++++++++++++ 4 files changed, 104 insertions(+) create mode 100644 tests/tcg/s390x/precise-smc-user.c create mode 100644 tests/tcg/s390x/precise-smc-softmmu.S diff --git a/tests/tcg/s390x/precise-smc-user.c b/tests/tcg/s390x/precise-s= mc-user.c new file mode 100644 index 0000000000..33a5270865 --- /dev/null +++ b/tests/tcg/s390x/precise-smc-user.c @@ -0,0 +1,39 @@ +/* + * Test s390x-linux-user precise self-modifying code handling. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#include +#include +#include +#include + +extern __uint128_t __attribute__((__aligned__(1))) smc; +extern __uint128_t __attribute__((__aligned__(1))) patch; + +int main(void) +{ + char *aligned_smc =3D (char *)((uintptr_t)&smc & ~0xFFFULL); + char *smc_end =3D (char *)&smc + sizeof(smc); + uint64_t value =3D 21; + int err; + + err =3D mprotect(aligned_smc, smc_end - aligned_smc, + PROT_READ | PROT_WRITE | PROT_EXEC); + assert(err =3D=3D 0); + + asm("jg 0f\n" /* start a new TB */ + "patch: .byte 0,0,0,0,0,0\n" /* replaces padding */ + ".byte 0,0,0,0,0,0\n" /* replaces vstl */ + "agr %[value],%[value]\n" /* replaces sgr */ + "smc: .org . + 6\n" /* pad patched code to 16 byte= s */ + "0: vstl %[patch],%[idx],%[smc]\n" /* start writing before TB */ + "sgr %[value],%[value]" /* this becomes `agr %r0,%r0` = */ + : [smc] "=3DR" (smc) + , [value] "+r" (value) + : [patch] "v" (patch) + , [idx] "r" (sizeof(patch) - 1) + : "cc"); + + return value =3D=3D 42 ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Make= file.softmmu-target index 76345b6e64..1a1f088b28 100644 --- a/tests/tcg/s390x/Makefile.softmmu-target +++ b/tests/tcg/s390x/Makefile.softmmu-target @@ -25,6 +25,7 @@ ASM_TESTS =3D = \ lpswe-early = \ lra = \ mc = \ + precise-smc-softmmu = \ ssm-early = \ stosm-early = \ stpq = \ diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.tar= get index 9c0e70c6ca..c650aefe5c 100644 --- a/tests/tcg/s390x/Makefile.target +++ b/tests/tcg/s390x/Makefile.target @@ -61,6 +61,7 @@ Z13_TESTS+=3Dlocfhr Z13_TESTS+=3Dvcksm Z13_TESTS+=3Dvstl Z13_TESTS+=3Dvrep +Z13_TESTS+=3Dprecise-smc-user $(Z13_TESTS): CFLAGS+=3D-march=3Dz13 -O2 TESTS+=3D$(Z13_TESTS) =20 diff --git a/tests/tcg/s390x/precise-smc-softmmu.S b/tests/tcg/s390x/precis= e-smc-softmmu.S new file mode 100644 index 0000000000..f7fa57d899 --- /dev/null +++ b/tests/tcg/s390x/precise-smc-softmmu.S @@ -0,0 +1,63 @@ +/* + * Test s390x-softmmu precise self-modifying code handling. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + .org 0x8e +program_interruption_code: + .org 0x150 +program_old_psw: + .org 0x1D0 /* program new PSW */ + .quad 0x180000000,pgm /* 64-bit mode */ + .org 0x200 /* lowcore padding */ + .globl _start +_start: + lctlg %c0,%c0,c0 + lghi %r0,15 + + /* Test 1: replace sgr with agr. */ + lghi %r1,21 + vl %v0,patch1 + jg 1f /* start a new TB */ +0: + .org . + 6 /* pad patched code to 16 bytes */ +1: + vstl %v0,%r0,0b /* start writing before TB */ + sgr %r1,%r1 /* this becomes `agr %r1,%r1` */ + cgijne %r1,42,failure + + /* Test 2: replace agr with division by zero. */ + vl %v0,patch2 + jg 1f /* start a new TB */ +0: + .org . + 6 /* pad patched code to 16 bytes */ +1: + vstl %v0,%r0,0b /* start writing before TB */ + sgr %r1,%r1 /* this becomes `d %r0,zero` */ +failure: + lpswe failure_psw + +pgm: + chhsi program_interruption_code,0x9 /* divide exception? */ + jne failure + clc program_old_psw(16),expected_old_psw2 /* correct old PSW? */ + jne failure + lpswe success_psw + +patch1: + .fill 12 /* replaces padding and stpq */ + agr %r1,%r1 /* replaces sgr */ +patch2: + .fill 12 /* replaces padding and stpq */ + d %r0,zero /* replaces sgr */ +zero: + .long 0 +expected_old_psw2: + .quad 0x200180000000,failure /* cc is from addition */ + .align 8 +c0: + .quad 0x60000 /* AFP, VX */ +success_psw: + .quad 0x2000000000000,0xfff /* see is_special_wait_psw() */ +failure_psw: + .quad 0x2000000000000,0 /* disabled wait */ --=20 2.39.3 From nobody Thu May 16 06:50:08 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=1693509519; cv=none; d=zohomail.com; s=zohoarc; b=Xm2vZGVOjj/evtHLosHAeaFEZZ1eDk36+1Tl2mxnGI4xvcSsbCyUeEFhqcZWYz5t8sFlH4pE4BAD691Movda2SRwGTxA5ozYzDn2mfeeVU60qsg5NtnIPxmo3cpYbK0yyAuR/d4LBc77cNTybwX7WpUmS4na+oeJv++7SY1lLhg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693509519; 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=GBc3V6ECXTqE9QwjF+qMciYIQQfWlg1CKmWNzzrBdwM=; b=XDocO86H8tY6D+Vgaz+I5/GaNoh5+JLkT50bkLwo+x+c7JGvHde8E9CWrjH4Hg5CUrTGsIQ4KY7sh4FHlkeYv+wM7t6WC1rdINPkHNlHBUe+Jlql9+GJYZNaMk8tOFE9pzkgD4OgF++EQZJxMaVhdiPDazTsIq1BWXdpXV5PTZ8= 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 169350951899776.24936383065415; Thu, 31 Aug 2023 12:18:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbnAf-00005h-3i; Thu, 31 Aug 2023 15:17:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAc-0008WO-Ra for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAZ-0001wU-LP for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:34 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-96-F-0sGPfiNpanbE03IuIPhQ-1; Thu, 31 Aug 2023 15:17:28 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2AC6E8015AA; Thu, 31 Aug 2023 19:17:28 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 66A045CC05; Thu, 31 Aug 2023 19:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693509450; 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=GBc3V6ECXTqE9QwjF+qMciYIQQfWlg1CKmWNzzrBdwM=; b=Ic2TGy85BrGtLnrp+Mcti6IK+lf/mw6PYfntwsEfJb8Ch0sgyHsOGyoEwtdakvNJS2mn8M XGbPOeclciFGh3Eo1xxfY0w+gP2WQyZkC41RPOYQcT0YzeJUIyKSmTxjuPTTmtjY9zjnvT zi650J0h/d4Opg5Rmph+NQ+JOf71Fsw= X-MC-Unique: F-0sGPfiNpanbE03IuIPhQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Fabiano Rosas Subject: [PULL 3/7] tests/qtest/usb-hcd-xhci-test: Check availability of devices before using them Date: Thu, 31 Aug 2023 21:17:15 +0200 Message-Id: <20230831191719.140001-4-thuth@redhat.com> In-Reply-To: <20230831191719.140001-1-thuth@redhat.com> References: <20230831191719.140001-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1693509520270100003 Content-Type: text/plain; charset="utf-8" The "usb-uas" and "usb-ccid" might not be compiled into the QEMU binary, so let's better check first whether they are available. Message-Id: <20230822163024.61529-1-thuth@redhat.com> Reviewed-by: Fabiano Rosas Signed-off-by: Thomas Huth --- tests/qtest/usb-hcd-xhci-test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qtest/usb-hcd-xhci-test.c b/tests/qtest/usb-hcd-xhci-tes= t.c index 10ef9d2a91..80bc039446 100644 --- a/tests/qtest/usb-hcd-xhci-test.c +++ b/tests/qtest/usb-hcd-xhci-test.c @@ -56,8 +56,12 @@ int main(int argc, char **argv) =20 qtest_add_func("/xhci/pci/init", test_xhci_init); qtest_add_func("/xhci/pci/hotplug", test_xhci_hotplug); - qtest_add_func("/xhci/pci/hotplug/usb-uas", test_usb_uas_hotplug); - qtest_add_func("/xhci/pci/hotplug/usb-ccid", test_usb_ccid_hotplug); + if (qtest_has_device("usb-uas")) { + qtest_add_func("/xhci/pci/hotplug/usb-uas", test_usb_uas_hotplug); + } + if (qtest_has_device("usb-ccid")) { + qtest_add_func("/xhci/pci/hotplug/usb-ccid", test_usb_ccid_hotplug= ); + } =20 qtest_start("-device nec-usb-xhci,id=3Dxhci" " -drive id=3Ddrive0,if=3Dnone,file=3Dnull-co://," --=20 2.39.3 From nobody Thu May 16 06:50:08 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=1693509513; cv=none; d=zohomail.com; s=zohoarc; b=h2f53qKjGf+het1ALRtc25Fepb/UVL5cvld50QB97ATJqTOjvzDpZhlF56glWPzFEOORIbaS8m72YuqEXvZdxEtFf/nOpkl8CLlcLlrREY4wzomm/HSwo9TOGi6fOU+GiQeXry5g8J+8CqSHqv1EgUjKCW/b3S60ueYHklNQLHU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693509513; 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=pTOAPWFYD9cHPnCZknDRCKlTb1DlAq/a97UhZ5O9Xcs=; b=kNLsR1E1O6GO86iWPzVC1M6PIUaDw0p1WiVS8pzO+G1DFJiUUnABrH6Op/KOSwnGfXs51xeE/NmnS6GjIkWH4ftLHW70WyM4MFIvK5pLDGkSSqp8aUjY29uOTR82q2Ht8e2M+ENZZs/8kl8aWntYoWOiLHAKzy+4bOx/OET5cpM= 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 1693509513647772.2840912765874; Thu, 31 Aug 2023 12:18:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbnAm-000070-HU; Thu, 31 Aug 2023 15:17:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAf-00005j-1A for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAc-0001xm-TA for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:36 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-102-gaal-AmsMjmbgQkDdE_C1w-1; Thu, 31 Aug 2023 15:17:30 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1CBEA800193; Thu, 31 Aug 2023 19:17:30 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B6A45CC05; Thu, 31 Aug 2023 19:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693509454; 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=pTOAPWFYD9cHPnCZknDRCKlTb1DlAq/a97UhZ5O9Xcs=; b=CBYeHLSNmHuKbKmGwvmyzEoWDJz37Z9MnuqHBcknhfziqRvfBQM3Hs1jOynVDGtpQAeuiy A1RyMGMaAUuPffLvI4nHnxo+9ABeEkralkeiKJx7zjEQldgal5AirYB/amaBxXd3cVbG1k BQpAEBNcqTZBE18padX/tP1vqVH+clA= X-MC-Unique: gaal-AmsMjmbgQkDdE_C1w-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 4/7] tests/qtest/netdev-socket: Avoid variable-length array in inet_get_free_port_multiple() Date: Thu, 31 Aug 2023 21:17:16 +0200 Message-Id: <20230831191719.140001-5-thuth@redhat.com> In-Reply-To: <20230831191719.140001-1-thuth@redhat.com> References: <20230831191719.140001-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.5 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1693509514454100001 From: Peter Maydell We use a variable-length array in inet_get_free_port_multiple(). This is only test code called at the start of a test, so switch to a heap allocation instead. The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-2021-3527). Signed-off-by: Peter Maydell Message-Id: <20230824164535.2652070-1-peter.maydell@linaro.org> Reviewed-by: Laurent Vivier Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- tests/qtest/netdev-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/netdev-socket.c b/tests/qtest/netdev-socket.c index 097abc0230..8eed54801f 100644 --- a/tests/qtest/netdev-socket.c +++ b/tests/qtest/netdev-socket.c @@ -82,7 +82,7 @@ static int inet_get_free_port_socket_ipv6(int sock) =20 static int inet_get_free_port_multiple(int nb, int *port, bool ipv6) { - int sock[nb]; + g_autofree int *sock =3D g_new(int, nb); int i; =20 for (i =3D 0; i < nb; i++) { --=20 2.39.3 From nobody Thu May 16 06:50:08 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=1693509514; cv=none; d=zohomail.com; s=zohoarc; b=ODlvXw3FT+4ClEFVmhHTfyTnJfIZqi/AUNc7CcN9Net21BGEfyyYHnO17z+4PQ0RiP2nmnj++H9qsPBVFt/TVlNV5rtjZLA2FDYxigVYndPH1xhytzt5qvdJWUEQ6iyIhB1w37bZiRqfzEsUw95DqGjV+jugzoiUap8h+Ba78FM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693509514; 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=6vSV/j/zLByu/A1qVUIboCvFC41r4P+CMlCjoZbQ48I=; b=YqRQY94Hsh8bkytLzf6nHGd+/PLHobJYQMApploixkbGsMN1DlCru13nXhggPqx3GsWoaTBeSPJdfhFCqXcGLp5+BqvfkpU60d1kxMSdgUDGuS7nWgnVQenQoU6LjCLjRdMkYQ98ZJU3w1AGvFnesf4xSQ7+52M6L868wlxjsF4= 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 1693509514545793.920505868884; Thu, 31 Aug 2023 12:18:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbnAw-00009k-HQ; Thu, 31 Aug 2023 15:17:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAg-00006H-Qy for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAe-0001yn-MA for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:38 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-312-rVMBzFQhMOSu30Sn6mN3Vw-1; Thu, 31 Aug 2023 15:17:32 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C464285CBE0 for ; Thu, 31 Aug 2023 19:17:31 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8CD6163F78; Thu, 31 Aug 2023 19:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693509456; 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=6vSV/j/zLByu/A1qVUIboCvFC41r4P+CMlCjoZbQ48I=; b=RY2ekyT/w4fUkJgnp+UgiIzBQGOCKr0+b6Tcgk0MJeDUEvijzjodH4ZVNtLKuacB9efDW9 s5+C2p9xhOAlmm0/KDG4ygsslLQnf6JpHAqtKe1/iWaqqL+JEmqEyLgrpTDOQrwKwtbG4u kPq/VXZxbgrhbejqVeoT6r8vK6XgU0k= X-MC-Unique: rVMBzFQhMOSu30Sn6mN3Vw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Igor Mammedov Subject: [PULL 5/7] tests/qtest/bios-tables-test: Check for virtio-iommu device before using it Date: Thu, 31 Aug 2023 21:17:17 +0200 Message-Id: <20230831191719.140001-6-thuth@redhat.com> In-Reply-To: <20230831191719.140001-1-thuth@redhat.com> References: <20230831191719.140001-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1693509515975100005 Content-Type: text/plain; charset="utf-8" The virtio-iommu device might be missing in the QEMU binary (e.g. in downstream RHEL builds), so let's better check for its availability first before using it. Message-Id: <20230822164948.65187-1-thuth@redhat.com> Acked-by: Igor Mammedov Signed-off-by: Thomas Huth --- tests/qtest/bios-tables-test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 47ba20b957..dd06e6300a 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -2138,7 +2138,9 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/core-count2", test_acpi_q35_tcg_core_count2); } - qtest_add_func("acpi/q35/viot", test_acpi_q35_viot); + if (qtest_has_device("virtio-iommu-pci")) { + qtest_add_func("acpi/q35/viot", test_acpi_q35_viot); + } #ifdef CONFIG_POSIX qtest_add_func("acpi/q35/cxl", test_acpi_q35_cxl); #endif @@ -2173,7 +2175,9 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp); qtest_add_func("acpi/virt/pxb", test_acpi_virt_tcg_pxb); qtest_add_func("acpi/virt/oem-fields", test_acpi_virt_oem_fiel= ds); - qtest_add_func("acpi/virt/viot", test_acpi_virt_viot); + if (qtest_has_device("virtio-iommu-pci")) { + qtest_add_func("acpi/virt/viot", test_acpi_virt_viot); + } } } ret =3D g_test_run(); --=20 2.39.3 From nobody Thu May 16 06:50:08 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=1693509505; cv=none; d=zohomail.com; s=zohoarc; b=K5Zu4IAMy0pbStkYdrnFKitahTp4g2Y95joTRCjXbnnNH4NZxVBLIaOqND/beUUtAJNQAu8NOKPQj7a4gOFIOrp4ofQkC32Ox+lKsJhVD6nNbS8VRMoMryEYof2czzUtHbZAw0o2fkhbGH4fQVukrz5QdrKrmSQxZIJ2BDciHuQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693509505; 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=0jShxP7Fs7HBKLeuT0xC5e/5iyO3wPBMMGCE15LEb8o=; b=UOoWMnoPkX8EodslS/i4W2fJ99q0RvtUvylzjclQt2gLaXS0oTkWdKk4Npqm7pc+6gPC/tFyptVO7Le8/K/6swunrNW5Mn2FCvD1P4IvNY2Vx0Gmyg/uKTtpZY09KWH0HHdCO8cJLF0O8Hvidej1cCGTmyrXMpNwG/x5Rf9mD18= 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 1693509505971565.237275184833; Thu, 31 Aug 2023 12:18:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbnAw-00007l-Bo; Thu, 31 Aug 2023 15:17:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAi-00006W-Vw for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAg-0001zC-MN for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:40 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-482-eDt0gVfXNYarhE83EOvCYw-1; Thu, 31 Aug 2023 15:17:33 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 28954800193; Thu, 31 Aug 2023 19:17:33 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D8E05CC05; Thu, 31 Aug 2023 19:17:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693509458; 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=0jShxP7Fs7HBKLeuT0xC5e/5iyO3wPBMMGCE15LEb8o=; b=Y1BfUzWJj3G7/1pf9b3IAwZWqekq6DAbooc8ZHz93Tvg/g2xMPq3tNaqpNc0QbAHykKM0G ETeLhgjLsnvlV8rHLst4/fldlwiJ5fZmnpahGsl4pF9nMUZ0Rbw/nZOU0gq8gUUQc2FXMI 1DXaSMxKx0A0yDTejKslO5kzcZIw86I= X-MC-Unique: eDt0gVfXNYarhE83EOvCYw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Olaf Hering Subject: [PULL 6/7] subprojects/berkeley-testfloat-3: Update to fix a problem with compiler warnings Date: Thu, 31 Aug 2023 21:17:18 +0200 Message-Id: <20230831191719.140001-7-thuth@redhat.com> In-Reply-To: <20230831191719.140001-1-thuth@redhat.com> References: <20230831191719.140001-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1693509508164100005 Content-Type: text/plain; charset="utf-8" Update the berkeley-testfloat-3 wrap to include a patch provided by Olaf Hering. This fixes a problem with "control reaches end of non-void function [-Werror=3Dreturn-type]" compiler warning/errors that are now enabled by default in certain versions of GCC. Reported-by: Olaf Hering Message-Id: <20230816091522.1292029-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- subprojects/berkeley-testfloat-3.wrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/berkeley-testfloat-3.wrap b/subprojects/berkeley-t= estfloat-3.wrap index 6ad80a37b2..c86dc078a8 100644 --- a/subprojects/berkeley-testfloat-3.wrap +++ b/subprojects/berkeley-testfloat-3.wrap @@ -1,5 +1,5 @@ [wrap-git] url =3D https://gitlab.com/qemu-project/berkeley-testfloat-3 -revision =3D 40619cbb3bf32872df8c53cc457039229428a263 +revision =3D e7af9751d9f9fd3b47911f51a5cfd08af256a9ab patch_directory =3D berkeley-testfloat-3 depth =3D 1 --=20 2.39.3 From nobody Thu May 16 06:50:08 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=1693509519; cv=none; d=zohomail.com; s=zohoarc; b=ZmYAdC5VD3vGI/P/94LTJCKcUTMlw0Pp1RmfyEBms5YxOTwYiTKPvCiIwAkBzEvMU/I1aUWRfnBCu12mdqhlp5yqeYLHWDPW/UxDNz4Xq4p54klKOgHV8NRm++nWZeDLantlP2s9OtCaQ737TqDizp2E/+bt+85Ba5N2JOJ4bo8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693509519; 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=A7CMVoyE7yLjf7KDSxm6tVnuJMS64Nf0+CSsGrA672Q=; b=LW6cbTNq7B4FNL50q3JVkB2q8wF5tegMjfr0eZgofIcr2HwTSbSdRsyJ3qpF1WlJlkxaW3valEA0+539FC7/G7qprMlPk8NuGLNcgoJW5LmTWyGvCiUs0YGS8NGkEIKN+tljdxBkb2y4TLS46uZp0xV09GmHeqnwbhp/SYEpL5I= 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 1693509519820869.0508830295394; Thu, 31 Aug 2023 12:18:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbnAz-0000Gb-EJ; Thu, 31 Aug 2023 15:17:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAj-00006Y-5C for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbnAg-0001zI-V7 for qemu-devel@nongnu.org; Thu, 31 Aug 2023 15:17:40 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-18-5yonw1GJOCmwuBDjg2vPqw-1; Thu, 31 Aug 2023 15:17:35 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C528C101A53C; Thu, 31 Aug 2023 19:17:34 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86DA663F78; Thu, 31 Aug 2023 19:17:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693509458; 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=A7CMVoyE7yLjf7KDSxm6tVnuJMS64Nf0+CSsGrA672Q=; b=cjxfzI6gR6B7wFUxHVivHk/c7qpAkkI7OpAQmh3gCZF+iOY7rfkuiU91dxJ2NcfqTlk9aN Wt4NJpjjrq/Rf3EiDoyii0kAQ3LXPrOCsUg1yPagGg/xPHXf+jiDKMlbsdxJY4ao2KZeKH h6As/7GGd7MFqCWutMvLap1BTpVt/VY= X-MC-Unique: 5yonw1GJOCmwuBDjg2vPqw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 7/7] meson: test for CONFIG_TCG in config_all Date: Thu, 31 Aug 2023 21:17:19 +0200 Message-Id: <20230831191719.140001-8-thuth@redhat.com> In-Reply-To: <20230831191719.140001-1-thuth@redhat.com> References: <20230831191719.140001-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.5 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_H4=0.001, RCVD_IN_MSPIKE_WL=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: 1693509520401100005 From: Paolo Bonzini CONFIG_TCG is not included in *-config-devices.h, so the test is always failing. Fixes: 74884cb1a6d ("qtest/meson.build: check CONFIG_TCG for boot-serial-te= st in qtests_ppc", 2022-03-14) Fixes: 44d827ea69e ("qtest/meson.build: check CONFIG_TCG for prom-env-test = in qtests_ppc", 2022-03-14) Signed-off-by: Paolo Bonzini Message-Id: <20230830095347.132485-1-pbonzini@redhat.com> Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- tests/qtest/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index b071d400b3..3afe9e9ee3 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -155,8 +155,8 @@ qtests_ppc =3D \ qtests_filter + \ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] = : []) + \ (config_all_devices.has_key('CONFIG_M48T59') ? ['m48t59-test'] : []) + = \ - (config_all_devices.has_key('CONFIG_TCG') ? ['prom-env-test'] : []) + = \ - (config_all_devices.has_key('CONFIG_TCG') ? ['boot-serial-test'] : []) += \ + (config_all.has_key('CONFIG_TCG') ? ['prom-env-test'] : []) + = \ + (config_all.has_key('CONFIG_TCG') ? ['boot-serial-test'] : []) + = \ ['boot-order-test'] =20 qtests_ppc64 =3D \ --=20 2.39.3