From nobody Sun Feb 8 14:12:25 2026 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=1648826751; cv=none; d=zohomail.com; s=zohoarc; b=kfmtfLz74XYDUk7o7FwcuenZeBbdbzuRdNrJu8KXX4SsN83gV0WdFjecRG45onwAJBCfjLwux7nN76vBkSkkFjGr/5LJvmORw1BdXsU1zFONbaKMGB3iLqIMG2Q9uLag0bqngVh46r0Y+TfIpNx55+Z4b/RXj63cZwBWS89JecA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648826751; 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=kUFthdLADyGYhqg960Ti2tj+IEQt1bOcOPf+CdvzN2Y=; b=MP0hggebD9rb7RQoyMdszGOK7SXmC4Rc0t10AOZ4AS9DKp4Zq30Y1qLrgD8oo6/JDut1ZvvDgwAXSDeu5fEWYUqROVSw0fOpuZwZYBRU1GiJ3LB9v4hRM+0ysqG/b2njPE6fDDJNMnbEVyTNeWl2E/xi+N7B6t/8EfmCYpdyRik= 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 1648826751806512.5315505137679; Fri, 1 Apr 2022 08:25:51 -0700 (PDT) Received: from localhost ([::1]:44948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naJ9q-0003TA-NK for importer@patchew.org; Fri, 01 Apr 2022 11:25:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naJ7e-0000z2-Bb for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:23:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:55689) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naJ7c-0000qr-0S for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:23:33 -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-169-zp7BYuAMMd-HUSMUzlnD6Q-1; Fri, 01 Apr 2022 11:23:28 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 27B3F811E7A; Fri, 1 Apr 2022 15:23:28 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.146]) by smtp.corp.redhat.com (Postfix) with ESMTP id C377A2166B4E; Fri, 1 Apr 2022 15:23:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648826611; 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=kUFthdLADyGYhqg960Ti2tj+IEQt1bOcOPf+CdvzN2Y=; b=M6hxX4iMCcMXgs8BZy6dNPHgvQJVlexam9TAx9PtsGVSs7pkYLjM+TNtVBgqm2RxVhpR3v jSMPAbqZaEP3Vu7B7gdypGnfcO6e1W4xHcYdf/NHQxNST4ZbwTIvCT3XWcemHTVpdM3HFo mBlcAd+bAufhXTV0Gyc3iFwCLbcSM88= X-MC-Unique: zp7BYuAMMd-HUSMUzlnD6Q-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 1/6] misc: Fixes MAINTAINERS's path .github/workflows/lockdown.yml Date: Fri, 1 Apr 2022 17:23:18 +0200 Message-Id: <20220401152323.52519-2-thuth@redhat.com> In-Reply-To: <20220401152323.52519-1-thuth@redhat.com> References: <20220401152323.52519-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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: , Cc: Peter Maydell , Yonggang Luo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1648826753371100001 From: Yonggang Luo Signed-off-by: Yonggang Luo Message-Id: <20220323080755.156-4-luoyonggang@gmail.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index cc364afef7..d8b2601981 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3615,7 +3615,7 @@ M: Thomas Huth R: Wainer dos Santos Moschetta R: Beraldo Leal S: Maintained -F: .github/lockdown.yml +F: .github/workflows/lockdown.yml F: .gitlab-ci.yml F: .gitlab-ci.d/ F: .travis.yml --=20 2.27.0 From nobody Sun Feb 8 14:12:25 2026 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=1648826754; cv=none; d=zohomail.com; s=zohoarc; b=XTjscc08Dz7vzGbRmN8Kh1pr3mmsoCwdWUvYELSP5IWFELoTWRsyaxkeifHna0RcGrBx58mBP6lmGzRdFhz4xZBhW+2Ae9e8hgXbRpvHcFNl7QNpl1PVkW/0uzjmQ6LBII3pf3EDH/jFiEb9/GDthD5xrENgnbOY9WJN1haBHKU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648826754; 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=PxUM9gXylkG6Gj+SSFfAy4oYM7r8dYARxB6sPw5viT0=; b=kh8fjU3HuzxIhTkoXZ7wPgrzozQ+K3YjRUG0nQZHL10vrtCzHsFj6x8ipjAS8g275rF7j+vSNqeih61QouOZLIKk6w2n3zzjHsKVVVO09VmDv9pst/gfFyUefgXEu8QAH4z4gi1dhgWII9AOu6iPDfCTH+N9aPw2hBkwrI+Yc8g= 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 1648826754452689.3277862586307; Fri, 1 Apr 2022 08:25:54 -0700 (PDT) Received: from localhost ([::1]:45102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naJ9t-0003ZS-Ah for importer@patchew.org; Fri, 01 Apr 2022 11:25:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naJ7f-00011A-53 for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:23:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:36328) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naJ7d-0000r1-LS for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:23: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-608-jsvheyM9M-a8SMgbvy_sxg-1; Fri, 01 Apr 2022 11:23:30 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A9D36101161B; Fri, 1 Apr 2022 15:23:29 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.146]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89BB92166B4E; Fri, 1 Apr 2022 15:23:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648826612; 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=PxUM9gXylkG6Gj+SSFfAy4oYM7r8dYARxB6sPw5viT0=; b=Ztll4EpU9FTLrxPUxoHNQl1NK5odn/dh4pUf6XeSQSiNWMjTKPDsRyoRF5ty1DFsze4W23 LTPvuSOGB5KlM/NAzZy6nBUe17nrVDvnpcqn47RooJ693oNDnQAmAW2knwVTZ4PP/BIVsM up6GuUpJvUQOG/N+jkv0jgZ0F4bcGxg= X-MC-Unique: jsvheyM9M-a8SMgbvy_sxg-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 2/6] target/s390x: Fix determination of overflow condition code after addition Date: Fri, 1 Apr 2022 17:23:19 +0200 Message-Id: <20220401152323.52519-3-thuth@redhat.com> In-Reply-To: <20220401152323.52519-1-thuth@redhat.com> References: <20220401152323.52519-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: application/octet-stream; x-default=true 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: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, BODY_EMPTY=1.31, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Peter Maydell , Bruno Haible Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-Zoho-Virus-Status: 1 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1648826755252100003 From: Bruno Haible This program currently prints different results when run with TCG instead of running on real s390x hardware: #include int overflow_32 (int x, int y) { int sum; return ! __builtin_add_overflow (x, y, &sum); } int overflow_64 (long long x, long long y) { long sum; return ! __builtin_add_overflow (x, y, &sum); } int a1 = -2147483648; int b1 = -2147483648; long long a2 = -9223372036854775808L; long long b2 = -9223372036854775808L; int main () { { int a = a1; int b = b1; printf ("a = 0x%x, b = 0x%x\n", a, b); printf ("no_overflow = %d\n", overflow_32 (a, b)); } { long long a = a2; long long b = b2; printf ("a = 0x%llx, b = 0x%llx\n", a, b); printf ("no_overflow = %d\n", overflow_64 (a, b)); } } Signed-off-by: Bruno Haible Resolves: https://gitlab.com/qemu-project/qemu/-/issues/616 Message-Id: <20220323162621.139313-2-thuth@redhat.com> Signed-off-by: Thomas Huth --- target/s390x/tcg/cc_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/tcg/cc_helper.c b/target/s390x/tcg/cc_helper.c index 8d04097f78..e11cdb745d 100644 --- a/target/s390x/tcg/cc_helper.c +++ b/target/s390x/tcg/cc_helper.c @@ -136,7 +136,7 @@ static uint32_t cc_calc_subu(uint64_t borrow_out, uint64_t result) static uint32_t cc_calc_add_64(int64_t a1, int64_t a2, int64_t ar) { - if ((a1 > 0 && a2 > 0 && ar < 0) || (a1 < 0 && a2 < 0 && ar > 0)) { + if ((a1 > 0 && a2 > 0 && ar < 0) || (a1 < 0 && a2 < 0 && ar >= 0)) { return 3; /* overflow */ } else { if (ar < 0) { @@ -196,7 +196,7 @@ static uint32_t cc_calc_comp_64(int64_t dst) static uint32_t cc_calc_add_32(int32_t a1, int32_t a2, int32_t ar) { - if ((a1 > 0 && a2 > 0 && ar < 0) || (a1 < 0 && a2 < 0 && ar > 0)) { + if ((a1 > 0 && a2 > 0 && ar < 0) || (a1 < 0 && a2 < 0 && ar >= 0)) { return 3; /* overflow */ } else { if (ar < 0) { -- 2.27.0 From nobody Sun Feb 8 14:12:25 2026 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=1648826873; cv=none; d=zohomail.com; s=zohoarc; b=De23l/EYwNiIOm2KEX+xtw9w9JdkjSo0F/A8O4NGkUrY2gzOxVhc8MIE/hSZ0ytFLPQAUVRXipsSvqxat8F0l89JpyxCLgbYA6kW/o2AR64ewIUgmwUJe1kB9z4lEv8hXZKeKhfyBCLTLpGy2mmFjThteuprPw+VRvswyuLMrjI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648826873; 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=jkGJb9whu0wnOJ1j+/dU3csF7thPNVIwm1ysAu+AbeE=; b=QVvLQDwACiY7AIlrphLbz42TTtSnnX4ScDz9ul1aXhM8IF6hPxt12NZbh05ZT+IvHXkqtosREJ6ySwo363BtSGkp+U0DCWu2ZTXcDbYbJSyblm4FeyK/vxS4+gwJgQ1DJ7oppnAOXpaQIWn6oqf5hnKAWr2NuMyjQdIP75WSM0E= 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 1648826873183396.35266848392564; Fri, 1 Apr 2022 08:27:53 -0700 (PDT) Received: from localhost ([::1]:52776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naJBn-0000K2-Rn for importer@patchew.org; Fri, 01 Apr 2022 11:27:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naJ7e-0000zv-GY for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:23:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:34873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naJ7d-0000qw-20 for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:23:34 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-544-d1V24z8TOX-kZpOMvahJjA-1; Fri, 01 Apr 2022 11:23:31 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0F1931C0151E; Fri, 1 Apr 2022 15:23:31 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.146]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF7422166B4E; Fri, 1 Apr 2022 15:23:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648826612; 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=jkGJb9whu0wnOJ1j+/dU3csF7thPNVIwm1ysAu+AbeE=; b=epHgnvOTIzz3CtmUffs7w7l0wrKTHfWR/txGIYzTyGxda43umwNQyUE2sWq7PaES1331Im k86LoqAmH3jEUYSAb6hWaY28r0y6CJIITk4Iw17q4n/i0DHxF3WkBLS1QvU/jejrMfHv8N mLDzAALYyChPH7haK10UE7dF1vrSvtQ= X-MC-Unique: d1V24z8TOX-kZpOMvahJjA-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 3/6] target/s390x: Fix determination of overflow condition code after subtraction Date: Fri, 1 Apr 2022 17:23:20 +0200 Message-Id: <20220401152323.52519-4-thuth@redhat.com> In-Reply-To: <20220401152323.52519-1-thuth@redhat.com> References: <20220401152323.52519-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: application/octet-stream; x-default=true 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: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, BODY_EMPTY=1.31, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Peter Maydell , Bruno Haible Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-Zoho-Virus-Status: 1 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1648826875068100013 From: Bruno Haible Reported by Paul Eggert in https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00050.html This program currently prints different results when run with TCG instead of running on real s390x hardware: #include int overflow_32 (int x, int y) { int sum; return __builtin_sub_overflow (x, y, &sum); } int overflow_64 (long long x, long long y) { long sum; return __builtin_sub_overflow (x, y, &sum); } int a1 = 0; int b1 = -2147483648; long long a2 = 0L; long long b2 = -9223372036854775808L; int main () { { int a = a1; int b = b1; printf ("a = 0x%x, b = 0x%x\n", a, b); printf ("no_overflow = %d\n", ! overflow_32 (a, b)); } { long long a = a2; long long b = b2; printf ("a = 0x%llx, b = 0x%llx\n", a, b); printf ("no_overflow = %d\n", ! overflow_64 (a, b)); } } Signed-off-by: Bruno Haible Resolves: https://gitlab.com/qemu-project/qemu/-/issues/618 Message-Id: <20220323162621.139313-3-thuth@redhat.com> Signed-off-by: Thomas Huth --- target/s390x/tcg/cc_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/tcg/cc_helper.c b/target/s390x/tcg/cc_helper.c index e11cdb745d..b2e8d3d9f5 100644 --- a/target/s390x/tcg/cc_helper.c +++ b/target/s390x/tcg/cc_helper.c @@ -151,7 +151,7 @@ static uint32_t cc_calc_add_64(int64_t a1, int64_t a2, int64_t ar) static uint32_t cc_calc_sub_64(int64_t a1, int64_t a2, int64_t ar) { - if ((a1 > 0 && a2 < 0 && ar < 0) || (a1 < 0 && a2 > 0 && ar > 0)) { + if ((a1 >= 0 && a2 < 0 && ar < 0) || (a1 < 0 && a2 > 0 && ar > 0)) { return 3; /* overflow */ } else { if (ar < 0) { @@ -211,7 +211,7 @@ static uint32_t cc_calc_add_32(int32_t a1, int32_t a2, int32_t ar) static uint32_t cc_calc_sub_32(int32_t a1, int32_t a2, int32_t ar) { - if ((a1 > 0 && a2 < 0 && ar < 0) || (a1 < 0 && a2 > 0 && ar > 0)) { + if ((a1 >= 0 && a2 < 0 && ar < 0) || (a1 < 0 && a2 > 0 && ar > 0)) { return 3; /* overflow */ } else { if (ar < 0) { -- 2.27.0 From nobody Sun Feb 8 14:12:25 2026 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=1648826955; cv=none; d=zohomail.com; s=zohoarc; b=XeAKFY1AS9wC7dakL2TtHNEPMQk3vDUu0R0pYPoIylGrHuDni3LAaJLCXMsP8MdvWflrUwa9ffbiqpW0wdlRi+KZdxxzrTsjOZ09IdjjUyijA6eOhAcNsuWaCw2tQz6PbSi31jFgPkAA8aIulhsz+KUjDVvJSQIzajPesGwcfkE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648826955; 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=arVoTcAZW7Mlx0fGNyg6R8QmTtIumam8RmQcU84wRbo=; b=G5xmHo6sNCLH5fe6h0lzhyvi0PSOBGQyfugxHOgcG1zajJqhwC/+4JimAUdq1GX/iNC6KJxAYm5eIc7C/Xd7lCSbO8cunc/GC07mrvKG2H9WL9c/OIiPFWrbMxjqsQky/7SDf6BedpBPMExX0b261bzZSv412pm8lwmBGz+PmV0= 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 1648826955802692.5596726622495; Fri, 1 Apr 2022 08:29:15 -0700 (PDT) Received: from localhost ([::1]:58296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naJD8-0003ze-Rq for importer@patchew.org; Fri, 01 Apr 2022 11:29:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naJ7l-0001L5-Mt for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:23:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52295) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naJ7g-0000rQ-F7 for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:23:41 -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-100-vg7ApgA5OKSSRSW697fWVg-1; Fri, 01 Apr 2022 11:23:32 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3DA54811E75; Fri, 1 Apr 2022 15:23:32 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.146]) by smtp.corp.redhat.com (Postfix) with ESMTP id 66D432166B4E; Fri, 1 Apr 2022 15:23:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648826615; 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=arVoTcAZW7Mlx0fGNyg6R8QmTtIumam8RmQcU84wRbo=; b=A6R5FKheFR1KdIlWFHrLnEgF9407wMIyi+oJr9uliZozOkVyAoJ85WOBLwJlcznltqG10R O6s4Tqy3q0gpF2tie+TyvrpUICd6eWnhRCSovLM/C7c5smv52VGDc0HjMCJYBp7ktTMcsr /LodzKBUHNe9A09pjEswRIhuKFTM3Hg= X-MC-Unique: vg7ApgA5OKSSRSW697fWVg-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 4/6] meson.build: Fix dependency of page-vary-common.c to config-poison.h Date: Fri, 1 Apr 2022 17:23:21 +0200 Message-Id: <20220401152323.52519-5-thuth@redhat.com> In-Reply-To: <20220401152323.52519-1-thuth@redhat.com> References: <20220401152323.52519-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: application/octet-stream; x-default=true 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: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, BODY_EMPTY=1.31, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Peter Maydell , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-Zoho-Virus-Status: 1 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1648826957922100001 Before compiling page-vary-common.c, we have to make sure that config-poison.h has been generated (which is in the "genh" list). Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson Resolves: https://gitlab.com/qemu-project/qemu/-/issues/948 Message-Id: <20220330114808.942933-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index aef724ad3c..04ce33fef1 100644 --- a/meson.build +++ b/meson.build @@ -2881,7 +2881,7 @@ if get_option('b_lto') if get_option('cfi') pagevary_flags += '-fno-sanitize=cfi-icall' endif - pagevary = static_library('page-vary-common', sources: pagevary, + pagevary = static_library('page-vary-common', sources: pagevary + genh, c_args: pagevary_flags) pagevary = declare_dependency(link_with: pagevary) endif -- 2.27.0 From nobody Sun Feb 8 14:12:25 2026 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=1648826875; cv=none; d=zohomail.com; s=zohoarc; b=dBK6ScWbGfAoZVjKoujVHa0PwyhFYsyTNpezS73Qs/ngre3byrmxvUsXyOLByrO/bvwqDhPkdOYYD6r+BqtJHwxb5CTF6hPamIBdT79YoZVg3OSzKjgixvLx/ve25XP38xyeCAQESPVY7V+hlfXYwXimK7VZWOD9lRYEMGqzFDc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648826875; 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=ddT7acmFZ86vqC/RzoUPKTSfDmWDhQhw4L4L5BvQtMQ=; b=BQl6T63hUngRXFHcGFFYUqB+m4eXOdqxzhwh/9/f4WJFcIxkdX942St4c3HPUGMDyCh7jTphH7U4TRazEP2uXmpiyA3gypfhWF1LkV6+wHVoCMb3oUTNtpY+KZ8EJyA4gCum+8NADAlQHXLVYjGQHQvUqeEqR2HKAM8HGQhXGo0= 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 1648826875135254.8040074983105; Fri, 1 Apr 2022 08:27:55 -0700 (PDT) Received: from localhost ([::1]:53004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naJBq-0000TX-61 for importer@patchew.org; Fri, 01 Apr 2022 11:27:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naJ7h-000174-8b for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:23:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:55303) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naJ7f-0000rL-Nt for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:23: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-359-n7yltNsgN0exjOo-FW_NeA-1; Fri, 01 Apr 2022 11:23:34 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BBB80185A79C; Fri, 1 Apr 2022 15:23:33 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.146]) by smtp.corp.redhat.com (Postfix) with ESMTP id A138D2166B4E; Fri, 1 Apr 2022 15:23:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648826615; 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=ddT7acmFZ86vqC/RzoUPKTSfDmWDhQhw4L4L5BvQtMQ=; b=Fb98RTgIC04JRgxgfYbUrvsBkeYmCAVAQJbk4uHEHMEFhHA08imHmW/BJblh+TdFhYic10 CJFdlCxaSWmND+ZiyygE6vIfPehymH6lmAxjARLKddhHB6JxayAbzOPtmz3zv7rFKcrdBQ JgDKgcZ4ZWrWtMu6Xe7zPjF8rtf4aYA= X-MC-Unique: n7yltNsgN0exjOo-FW_NeA-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 5/6] 9p: move P9_XATTR_SIZE_MAX from 9p.h to 9p.c Date: Fri, 1 Apr 2022 17:23:22 +0200 Message-Id: <20220401152323.52519-6-thuth@redhat.com> In-Reply-To: <20220401152323.52519-1-thuth@redhat.com> References: <20220401152323.52519-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: application/octet-stream; x-default=true 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: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, BODY_EMPTY=1.31, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Peter Maydell , Will Cohen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-Zoho-Virus-Status: 1 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1648826877049100015 From: Will Cohen The patch set adding 9p functionality to darwin introduced an issue where limits.h, which defines XATTR_SIZE_MAX, is included in 9p.c, though the referenced constant is needed in 9p.h. This commit fixes that issue by moving the definition of P9_XATTR_SIZE_MAX, which uses XATTR_SIZE_MAX, to also be in 9p.c. Additionally, this commit moves the location of the system headers include in 9p.c to occur before the project headers (except osdep.h). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/950 Fixes: 38d7fd68b0 ("9p: darwin: Move XATTR_SIZE_MAX->P9_XATTR_SIZE_MAX") Signed-off-by: Will Cohen Message-Id: <20220331182651.887-1-wwcohen@gmail.com> [thuth: Adjusted placement of osdep.h] Signed-off-by: Thomas Huth --- hw/9pfs/9p.h | 18 ------------------ hw/9pfs/9p.c | 28 +++++++++++++++++++++++----- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h index af2635fae9..994f952600 100644 --- a/hw/9pfs/9p.h +++ b/hw/9pfs/9p.h @@ -479,22 +479,4 @@ struct V9fsTransport { void (*push_and_notify)(V9fsPDU *pdu); }; -#if defined(XATTR_SIZE_MAX) -/* Linux */ -#define P9_XATTR_SIZE_MAX XATTR_SIZE_MAX -#elif defined(CONFIG_DARWIN) -/* - * Darwin doesn't seem to define a maximum xattr size in its user - * space header, so manually configure it across platforms as 64k. - * - * Having no limit at all can lead to QEMU crashing during large g_malloc() - * calls. Because QEMU does not currently support macOS guests, the below - * preliminary solution only works due to its being a reflection of the limit of - * Linux guests. - */ -#define P9_XATTR_SIZE_MAX 65536 -#else -#error Missing definition for P9_XATTR_SIZE_MAX for this host system -#endif - #endif diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index dcaa602d4c..225f31fc31 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -17,6 +17,11 @@ */ #include "qemu/osdep.h" +#ifdef CONFIG_LINUX +#include +#else +#include +#endif #include #include "hw/virtio/virtio.h" #include "qapi/error.h" @@ -33,11 +38,6 @@ #include "migration/blocker.h" #include "qemu/xxhash.h" #include -#ifdef CONFIG_LINUX -#include -#else -#include -#endif int open_fd_hw; int total_open_fd; @@ -3925,6 +3925,24 @@ out_nofid: v9fs_string_free(&name); } +#if defined(CONFIG_LINUX) +/* Currently, only Linux has XATTR_SIZE_MAX */ +#define P9_XATTR_SIZE_MAX XATTR_SIZE_MAX +#elif defined(CONFIG_DARWIN) +/* + * Darwin doesn't seem to define a maximum xattr size in its user + * space header, so manually configure it across platforms as 64k. + * + * Having no limit at all can lead to QEMU crashing during large g_malloc() + * calls. Because QEMU does not currently support macOS guests, the below + * preliminary solution only works due to its being a reflection of the limit of + * Linux guests. + */ +#define P9_XATTR_SIZE_MAX 65536 +#else +#error Missing definition for P9_XATTR_SIZE_MAX for this host system +#endif + static void coroutine_fn v9fs_xattrcreate(void *opaque) { int flags, rflags = 0; -- 2.27.0 From nobody Sun Feb 8 14:12:25 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1648826802837347.1367732349977; Fri, 1 Apr 2022 08:26:42 -0700 (PDT) Received: from localhost ([::1]:46844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naJAf-0004oZ-LP for importer@patchew.org; Fri, 01 Apr 2022 11:26:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naJ7v-0001qN-5F for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:23:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:27650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naJ7t-0000u4-8F for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:23:50 -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-425-xTI_6KQ9PbiAGHbYf9dALA-1; Fri, 01 Apr 2022 11:23:45 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 35D1986B8AC; Fri, 1 Apr 2022 15:23:45 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.146]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1D58C2166B4E; Fri, 1 Apr 2022 15:23:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648826628; 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=4HPbeD6AAeDVJtEb3Om9tQ7uY4+AVoVcac7NPB0sl1Q=; b=EWLXtz85muxivJhaagLHnkf8iTaS9IQJeXpBJPYVtwzNZBXh/bbMng/zHEkqQPk6VtJVfe SLi+FmoDoXe/0YvHzCnR0QWBZUel38jduB/QzrK77EW1RSfBOoaFUcrS0OkwF//0tO5t+p 8P2TGC8FakK8F9zNEjdW/nSNURr8bIo= X-MC-Unique: xTI_6KQ9PbiAGHbYf9dALA-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 6/6] trace: fix compilation with lttng-ust >= 2.13 Date: Fri, 1 Apr 2022 17:23:23 +0200 Message-Id: <20220401152323.52519-7-thuth@redhat.com> In-Reply-To: <20220401152323.52519-1-thuth@redhat.com> References: <20220401152323.52519-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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: , Cc: Peter Maydell , Stefan Hajnoczi , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1648826804166100001 From: Marc-Andr=C3=A9 Lureau On Fedora 36, with lttng-ust 2.13.1, compilation fails with: In file included from trace/trace-ust-all.h:49085, from trace/trace-ust-all.c:13: /usr/include/lttng/tracepoint-event.h:67:10: error: #include expects "FILEN= AME" or 67 | #include LTTNG_UST_TRACEPOINT_INCLUDE | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In lttng-ust commit 41858e2b6e8 ("Fix: don't do macro expansion in tracepoint file name") from 2012, starting from lttng-ust 2.1, the API was changed to expect TRACEPOINT_INCLUDE to be defined as a string. In lttng-ust commit d2966b4b0b2 ("Remove TRACEPOINT_INCLUDE_FILE macro"), in 2021, the compatibility macro was removed. Use the "new" API from 2012, and bump the version requirement to 2.1 to fix compilation with >=3D 2.13. According to repology, all distributions we support have >=3D 2.1 (centos 8 has oldest with 2.8.1 afaict) Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefan Hajnoczi Message-Id: <20220328084717.367993-2-marcandre.lureau@redhat.com> Signed-off-by: Thomas Huth --- meson.build | 4 ++-- scripts/tracetool/format/ust_events_h.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 04ce33fef1..861de93c4f 100644 --- a/meson.build +++ b/meson.build @@ -455,8 +455,8 @@ if 'CONFIG_GIO' in config_host endif lttng =3D not_found if 'ust' in get_option('trace_backends') - lttng =3D dependency('lttng-ust', required: true, method: 'pkg-config', - kwargs: static_kwargs) + lttng =3D dependency('lttng-ust', required: true, version: '>=3D 2.1', + method: 'pkg-config', kwargs: static_kwargs) endif pixman =3D not_found if have_system or have_tools diff --git a/scripts/tracetool/format/ust_events_h.py b/scripts/tracetool/f= ormat/ust_events_h.py index 6ce559f6cc..b99fe6896b 100644 --- a/scripts/tracetool/format/ust_events_h.py +++ b/scripts/tracetool/format/ust_events_h.py @@ -29,8 +29,8 @@ def generate(events, backend, group): '#undef TRACEPOINT_PROVIDER', '#define TRACEPOINT_PROVIDER qemu', '', - '#undef TRACEPOINT_INCLUDE_FILE', - '#define TRACEPOINT_INCLUDE_FILE ./%s' % include, + '#undef TRACEPOINT_INCLUDE', + '#define TRACEPOINT_INCLUDE "./%s"' % include, '', '#if !defined (TRACE_%s_GENERATED_UST_H) || \\' % group.upper(), ' defined(TRACEPOINT_HEADER_MULTI_READ)', --=20 2.27.0