From nobody Wed Jun 28 13:56:59 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qrjn82GM7z4kbV5; Wed, 28 Jun 2023 13:57:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qrjn81ZNZz3D78; Wed, 28 Jun 2023 13:57:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687960620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6oAzJhmlGIuFDGqdcFS61pCfAh86V0WprgALu82E0/0=; b=InUD5IvzIycRSYYi3ZLzQlvkRtoOVa/qJo1VYDimqyte1B07aEEh5zrmWDy3Lw6Wy3ImOt //Rl+SLnPo0I2wrMrbXnOXB40d9wywZkInumSE8ZCih90VLJFnA/kMGiqKxgNA9LB8rZxS VKSKlIMHHdcb92T75eyU5mCPC+nnSmDrqLxazndEdhryOQPmzAHy/67+i1txK50v/Jy+4q OMZf1NtVKqpoiG6qp3kqgWsdHgMmKLyIS0s6Wpr6PXiQp++UgiwwNEf0OAOJm9WcbRz71v SwuPLmubbwW04awejxqxIy5hNTYSwHJ3Dpf1ZwI+ZNW5kxL+wN6W+IunGeRVCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687960620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6oAzJhmlGIuFDGqdcFS61pCfAh86V0WprgALu82E0/0=; b=BJdylLkQksO9F0h/3ZI07HaUFzoErf7SDeLOjoKkkZICY1dqulEoBa/FPxR72fD86amsqS VXLcwdkrPmRXjwvek6Yo793N4VLNl4SM0yA/iaE6F6pYnzW8FLr7zURcQN1cqsQOCaoQWW Ua/0kAaUwkICFrCMJM+rar5ovs9hOn0sDrN7FoiS3swG32v83R3ju4m0qbSUSi/hvqdPVw 4W9GsyHefOWPjaxR2AHM2UE8yLEMN3x878caAzIiliAuWyV2SfTl1PS1+STgvlfO4JOwWn T4tR5ldGp4uVLFk3j7OwJqfOHBff7vmHU60MDyi34Wm7NH9xnQ7Tqy/Wu34P4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687960620; a=rsa-sha256; cv=none; b=ZFdcC3ox9PggNQla/yeRtwH4vegQkWvgpSkTpZ6L+ybstcqEAvWkcF8KjMY63SYvvVYl9B l4Obn3e3f3ifZQhM3dM3W34OuhMK/g8WplXDWucilfMsDFY0jAUjDEGNI/bHJ0Vr/amYr+ mzkAWIT7Ez3n3cyXnPnQM8CKGTYbkWbcLP4od7EZ4p18dYEtGz3qyslS/c2VMjwXw754sG iJtyP774kKwCZOVssCL4rBoU/yYxBQYj1WrZE/jQH1SvXW0LiCuta7waDMbTtbjYl/xHSx iLTo7fKj/TeKptP7pcC+mmM8sGJjpfRVYsmBnDfQNfiINVWDbIoHh6bdYPrm8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrjn80V2xzcDs; Wed, 28 Jun 2023 13:57:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SDuxii075801; Wed, 28 Jun 2023 13:56:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SDuxkK075800; Wed, 28 Jun 2023 13:56:59 GMT (envelope-from git) Date: Wed, 28 Jun 2023 13:56:59 GMT Message-Id: <202306281356.35SDuxkK075800@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?Q?Roger=20Pau=20Monn=C3=A9?= Subject: git: 8d3618a14d48 - main - sys-utils/xen-tools: remove usage of signed bitfields List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d3618a14d48e06e7645cbdfac7851a1f1664747 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/ports/commit/?id=8d3618a14d48e06e7645cbdfac7851a1f1664747 commit 8d3618a14d48e06e7645cbdfac7851a1f1664747 Author: Roger Pau Monné AuthorDate: 2023-06-28 09:12:32 +0000 Commit: Roger Pau Monné CommitDate: 2023-06-28 13:56:06 +0000 sys-utils/xen-tools: remove usage of signed bitfields When using a single-bit signed bitfield clang complains with: xenalyze.c:6157:17: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 Backport fix from upstream Xen. Sponsored by: Citrix System R&D Approved by: bapt (implicit) --- sysutils/xen-tools/Makefile | 5 +- ...-tools-convert-bitfields-to-unsigned-type.patch | 71 ++++++++++++++++++++++ 2 files changed, 74 insertions(+), 2 deletions(-) diff --git a/sysutils/xen-tools/Makefile b/sysutils/xen-tools/Makefile index f6d8b8f8242b..c35ffd1e2b57 100644 --- a/sysutils/xen-tools/Makefile +++ b/sysutils/xen-tools/Makefile @@ -1,7 +1,7 @@ PORTNAME= xen PKGNAMESUFFIX= -tools PORTVERSION= 4.17.0 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= sysutils emulators MASTER_SITES= http://downloads.xenproject.org/release/xen/${PORTVERSION}/ @@ -63,7 +63,8 @@ DOCS_INSTALL_TARGET= install-docs # clang build fixes EXTRA_PATCHES+= ${PATCHDIR}/0001-xen-x86-Remove-the-use-of-K-R-functions.patch:-p1 \ - ${PATCHDIR}/0001-tools-Remove-the-use-of-K-R-functions.patch:-p1 + ${PATCHDIR}/0001-tools-Remove-the-use-of-K-R-functions.patch:-p1 \ + ${PATCHDIR}/0001-tools-convert-bitfields-to-unsigned-type.patch:-p1 .include diff --git a/sysutils/xen-tools/files/0001-tools-convert-bitfields-to-unsigned-type.patch b/sysutils/xen-tools/files/0001-tools-convert-bitfields-to-unsigned-type.patch new file mode 100644 index 000000000000..83b11f35d373 --- /dev/null +++ b/sysutils/xen-tools/files/0001-tools-convert-bitfields-to-unsigned-type.patch @@ -0,0 +1,71 @@ +From 99ab02f63ea813f2e467a39a7736bf460a3f3495 Mon Sep 17 00:00:00 2001 +From: Olaf Hering +Date: Mon, 8 May 2023 16:46:18 +0000 +Subject: [PATCH] tools: convert bitfields to unsigned type + +clang complains about the signed type: + +implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] + +The potential ABI change in libxenvchan is covered by the Xen version based SONAME. + +Signed-off-by: Olaf Hering +Reviewed-by: Juergen Gross +Acked-by: Anthony PERARD +--- + tools/include/libxenvchan.h | 6 +++--- + tools/xentrace/xenalyze.c | 8 ++++---- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/tools/include/libxenvchan.h b/tools/include/libxenvchan.h +index 30cc73cf97e3..3d3b8aa8dd79 100644 +--- a/tools/include/libxenvchan.h ++++ b/tools/include/libxenvchan.h +@@ -79,11 +79,11 @@ struct libxenvchan { + xenevtchn_handle *event; + uint32_t event_port; + /* informative flags: are we acting as server? */ +- int is_server:1; ++ unsigned int is_server:1; + /* true if server remains active when client closes (allows reconnection) */ +- int server_persist:1; ++ unsigned int server_persist:1; + /* true if operations should block instead of returning 0 */ +- int blocking:1; ++ unsigned int blocking:1; + /* communication rings */ + struct libxenvchan_ring read, write; + /** +diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c +index 12dcca964645..a50538e9a8c8 100644 +--- a/tools/xentrace/xenalyze.c ++++ b/tools/xentrace/xenalyze.c +@@ -1377,7 +1377,7 @@ struct hvm_data { + tsc_t exit_tsc, arc_cycles, entry_tsc; + unsigned long long rip; + unsigned exit_reason, event_handler; +- int short_summary_done:1, prealloc_unpin:1, wrmap_bf:1; ++ unsigned int short_summary_done:1, prealloc_unpin:1, wrmap_bf:1; + + /* Immediate processing */ + void *d; +@@ -8235,13 +8235,13 @@ void mem_set_p2m_entry_process(struct pcpu_info *p) + + struct { + uint64_t gfn, mfn; +- int p2mt; +- int d:16,order:16; ++ uint32_t p2mt; ++ uint16_t d, order; + } *r = (typeof(r))ri->d; + + if ( opt.dump_all ) + { +- printf(" %s set_p2m_entry d%d o%d t %d g %llx m %llx\n", ++ printf(" %s set_p2m_entry d%u o%u t %u g %llx m %llx\n", + ri->dump_header, + r->d, r->order, + r->p2mt, +-- +2.41.0 +