From patchwork Fri Mar 5 12:49:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 12118411 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3AB9C433E6 for ; Fri, 5 Mar 2021 12:50:24 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B90C60233 for ; Fri, 5 Mar 2021 12:50:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B90C60233 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.93665.176679 (Exim 4.92) (envelope-from ) id 1lI9uF-0002rH-Ir; Fri, 05 Mar 2021 12:50:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 93665.176679; Fri, 05 Mar 2021 12:50:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lI9uF-0002rA-Fq; Fri, 05 Mar 2021 12:50:11 +0000 Received: by outflank-mailman (input) for mailman id 93665; Fri, 05 Mar 2021 12:50:09 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lI9uD-0002r5-Lz for xen-devel@lists.xenproject.org; Fri, 05 Mar 2021 12:50:09 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 58939bb7-5fb3-4810-b2a2-4fd69d64229f; Fri, 05 Mar 2021 12:50:08 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 58939bb7-5fb3-4810-b2a2-4fd69d64229f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1614948608; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=z1HelTmkuc3f0yOSIADiJ3232SVzO1AEpOdakbI14q0=; b=DdmbTNu6WcqpNwD81A5kIxSGJkkd69XFOpA9yeen0aOY4lyE5GIqZTlz NBJH/3UUpBToNuoKLfhe+XVWGW3QuN3kprQfr2Hflf1RN8l2k1qObhKQd XxeY84/ZD7Qdkk70e2PSYgcZZf8YaZvReYF8Q8aoa2oqo19yizFPCH8iw c=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: zV1m6LxsVZsEQc4Xjcsct9N3n2ffybb6svSYUFZtgaPA2rMjfLg6YhZ4XBM+FkVxsqci7+wO5Y t8BH7KDyoOPEHKDSUWikshYRvNwurdLFjOi8xAUn4wQoUge+ZbhbkFOHWx1OVPvIch69ZrBLuB ugJFKIupiREzsfdqHfHEfZ5ZTRePtlhwz+zvpoOSOinxMo3v1wmSpZml7wCr85XpT9ZkwKOIuu 0GieGKmwyG0h0ORXNaRhoxF+3a33NIxg1MLlqJ+iou7kYGt+UEVK9fQpVAiCueLiWSzk+GmDXB 7WY= X-SBRS: 5.1 X-MesageID: 38997299 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.81,224,1610427600"; d="scan'208";a="38997299" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Ian Jackson , Wei Liu , Juergen Gross Subject: [PATCH 1/3] tools/libxentoolcore: Fill in LIBHEADERS Date: Fri, 5 Mar 2021 12:49:47 +0000 Message-ID: <20210305124949.6719-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20210305124949.6719-1-andrew.cooper3@citrix.com> References: <20210305124949.6719-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 c/s 4664034cd replaced a glob over include/*.h with an expectation that LIBHEADER was suitably set for libraries which didn't have a single, consistently named, header file. This wasn't true for xentoolcore, which lost xentoolcore_internal.h as a consequence, and failed an API/ABI check vs 4.14 Fixes: 4664034cd ("tools/libs: move official headers to common directory") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross --- CC: Ian Jackson CC: Wei Liu CC: Juergen Gross For 4.15. This is a regression from 4.14, even if AFAICT it only impacts the ABI checking at this point. I *think* this is the only impacted library, but I would appreciate a second pair of eyes. I did experiment with this: +ifeq ($(LIBHEADER),) +$(warning $(LIBNAME) - No headers) +endif LIBHEADER ?= $(LIB_FILE_NAME).h LIBHEADERS = $(foreach h, $(LIBHEADER), $(XEN_INCLUDE)/$(h)) which yields: andrewcoop@andrewcoop:/local/xen.git$ make -j4 -s -C tools/libs/ /local/xen.git/tools/libs/toollog/../../../tools/libs/libs.mk:50: toollog - No headers /local/xen.git/tools/libs/evtchn/../../../tools/libs/libs.mk:50: evtchn - No headers /local/xen.git/tools/libs/gnttab/../../../tools/libs/libs.mk:50: gnttab - No headers /local/xen.git/tools/libs/call/../../../tools/libs/libs.mk:50: call - No headers /local/xen.git/tools/libs/foreignmemory/../../../tools/libs/libs.mk:50: foreignmemory - No headers /local/xen.git/tools/libs/devicemodel/../../../tools/libs/libs.mk:50: devicemodel - No headers ../libs.mk:50: hypfs - No headers /local/xen.git/tools/libs/stat/../../../tools/libs/libs.mk:50: stat - No headers /local/xen.git/tools/libs/stat/../../../tools/libs/libs.mk:50: stat - No headers Headers aside for a moment, there are two bugs here. hypfs doesn't use the same include pattern as the others, and stat is entered twice. --- tools/libs/toolcore/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/libs/toolcore/Makefile b/tools/libs/toolcore/Makefile index 1cf30733c9..3550786491 100644 --- a/tools/libs/toolcore/Makefile +++ b/tools/libs/toolcore/Makefile @@ -5,6 +5,8 @@ MAJOR = 1 MINOR = 0 AUTOINCS := $(XEN_INCLUDE)/_xentoolcore_list.h +LIBHEADER := xentoolcore.h xentoolcore_internal.h + SRCS-y += handlereg.c include $(XEN_ROOT)/tools/libs/libs.mk From patchwork Fri Mar 5 12:49:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 12118417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80834C433DB for ; Fri, 5 Mar 2021 12:50:52 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3AD8364F44 for ; Fri, 5 Mar 2021 12:50:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AD8364F44 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.93672.176715 (Exim 4.92) (envelope-from ) id 1lI9um-00037e-JN; Fri, 05 Mar 2021 12:50:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 93672.176715; Fri, 05 Mar 2021 12:50:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lI9um-00037X-Fr; Fri, 05 Mar 2021 12:50:44 +0000 Received: by outflank-mailman (input) for mailman id 93672; Fri, 05 Mar 2021 12:50:43 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lI9ul-00034k-Nq for xen-devel@lists.xenproject.org; Fri, 05 Mar 2021 12:50:43 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 8c69cd3e-2afb-40fd-92b6-c28aaf925f35; Fri, 05 Mar 2021 12:50:35 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8c69cd3e-2afb-40fd-92b6-c28aaf925f35 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1614948635; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bjbbijXY3Quk6aaO7tZzhGLPPA5Tof1s8Ux56AsuWVA=; b=ER4qGNg49UkbY5BceFcgoznZcnQoae8bsmgTqZEcFqElnpb0lIM1svAZ IgIv/yRIh0tEVQBCWAKrSfoHn5gzda7BJUqEtwIju5hUlD7z2IO508g2Z kh/5HAoHBIGbgLqD4ssshJNex31hBuDC3OCcYR2tY7erp5rZziTGOAyY/ s=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: BF4f4GdbBtHTAFCGu3ev5zVe1heqgu4zA3pccQd8JISXJwWZyO7Wcdh+0h4wS1Q+yg+ZwExZlm ZEgjy4/xPiyWNtmEEER15vEGhx0iY3ZKMo5P1P00HFTcFWCDne7hVtp+1yuNXvEOvwpN1d28+f xYgkN2ib0XmuIBDSogoSQUhPfkrztjkHdKIG/AxeDXO1aUthThE6URm1CIhT4bDm071MYhI2VT mtb0I8aHBihjdoTKZs2tRAxJfh07uFxoGX64iHZ9MN1tyyfjW9gc1xZDMbkZnSlcj/gRn5j94E GXU= X-SBRS: 5.1 X-MesageID: 38643897 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.81,224,1610427600"; d="scan'208";a="38643897" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Paul Durrant , Ian Jackson Subject: [PATCH 2/3] xen/dmop: Strip __XEN_TOOLS__ header guard from public API Date: Fri, 5 Mar 2021 12:49:48 +0000 Message-ID: <20210305124949.6719-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20210305124949.6719-1-andrew.cooper3@citrix.com> References: <20210305124949.6719-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Exactly as with c/s f40e1c52e4, this is inappropriate for a stable library. That change actually broke the build with: include/xendevicemodel.h:52:5: error: unknown type name 'ioservid_t' ioservid_t *id); ^ as libxendevicemodel.h now uses a type it can't see a typedef for. However, nothing noticed because the header.chk logic is also broken (fixed subsequently). Strip the guard from the public header, and remove compensation from devicemodel's private.h Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu CC: Paul Durrant CC: Ian Jackson For 4.15. This is a build fix, even if current staging can't spot the breakage. These two issues highlight that libxendevcemodel.h has never been checked since its introduction, because the checking logic only saw an empty file. --- tools/libs/devicemodel/private.h | 2 -- xen/include/public/hvm/dm_op.h | 5 ----- 2 files changed, 7 deletions(-) diff --git a/tools/libs/devicemodel/private.h b/tools/libs/devicemodel/private.h index c4a225f8af..c24f3396bb 100644 --- a/tools/libs/devicemodel/private.h +++ b/tools/libs/devicemodel/private.h @@ -1,8 +1,6 @@ #ifndef XENDEVICEMODEL_PRIVATE_H #define XENDEVICEMODEL_PRIVATE_H -#define __XEN_TOOLS__ 1 - #include #include #include diff --git a/xen/include/public/hvm/dm_op.h b/xen/include/public/hvm/dm_op.h index ef7fbc0d3d..fa3f083fed 100644 --- a/xen/include/public/hvm/dm_op.h +++ b/xen/include/public/hvm/dm_op.h @@ -25,9 +25,6 @@ #define __XEN_PUBLIC_HVM_DM_OP_H__ #include "../xen.h" - -#if defined(__XEN__) || defined(__XEN_TOOLS__) - #include "../event_channel.h" #ifndef uint64_aligned_t @@ -491,8 +488,6 @@ struct xen_dm_op { } u; }; -#endif /* __XEN__ || __XEN_TOOLS__ */ - struct xen_dm_op_buf { XEN_GUEST_HANDLE(void) h; xen_ulong_t size; From patchwork Fri Mar 5 12:49:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 12118415 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40A65C433E0 for ; Fri, 5 Mar 2021 12:50:31 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0130760233 for ; Fri, 5 Mar 2021 12:50:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0130760233 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.93667.176703 (Exim 4.92) (envelope-from ) id 1lI9uQ-0002xa-9q; Fri, 05 Mar 2021 12:50:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 93667.176703; Fri, 05 Mar 2021 12:50:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lI9uQ-0002xS-61; Fri, 05 Mar 2021 12:50:22 +0000 Received: by outflank-mailman (input) for mailman id 93667; Fri, 05 Mar 2021 12:50:21 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lI9uP-0002x5-Ek for xen-devel@lists.xenproject.org; Fri, 05 Mar 2021 12:50:21 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 3a65fd52-4119-400a-9090-9e60c8b83d25; Fri, 05 Mar 2021 12:50:20 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3a65fd52-4119-400a-9090-9e60c8b83d25 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1614948620; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FKWKNNS8zeB+e6A5j+ecHtMlcXfb4/SSo+PatHCy8Ts=; b=e/ZbU0K6q2abucZcny24+9xwuwuE3jMFx5mzCqve7cmZp4cbeGNRMR8B bV5V2L+sdB/rxUH7WQVEB5Io1Kd5Iart5UNWXzQMYnFnFEvPxgzMk6vlk s2fzTfNSTwhgB0qa+DviLzPOx5UAsIzykapY88ZV+TwhGEzwEAKxPsKqp Q=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: gDfgj/tGi2uTIKC6wNER95ZO5fbcuwAD+5NsNnMb1Hu6XNHraemPv/vpZpaGWHCmhkiRoUCIP8 VjyuD5K7uRXHbZDv5ih+QawLOGlNOg4kExZc68kpWngwZaUYYmXB7bGXj3If4tBvcm19DWkcDw JX+G7K7ZUJIRaSK8SU/ka2Hj8cj2fHIh7+G+3mgOei9wbq5wIoi6gZxg/XsMge1paVG33+LtJg yAuBIAOCj3TePSa/SDuUzLPmFeODaeaTn8BW8S14fdOkc2/8sOnGbgtpE8IcZQU1j9c2nMq40V +ro= X-SBRS: 5.1 X-MesageID: 38547171 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.81,224,1610427600"; d="scan'208";a="38547171" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Juergen Gross , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Subject: [PATCH 3/3] tools/libs: Fix headers.chk logic Date: Fri, 5 Mar 2021 12:49:49 +0000 Message-ID: <20210305124949.6719-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20210305124949.6719-1-andrew.cooper3@citrix.com> References: <20210305124949.6719-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 c/s 4664034cd dropped the $(LIBHEADERSGLOB) dependency for the headers.chk rule, without replacing it. As headers.chk uses $^, a typical build looks like: andrewcoop@andrewcoop:/local/xen.git$ make -C tools/libs/devicemodel/ make: Entering directory '/local/xen.git/tools/libs/devicemodel' for i in ; do \ gcc -x c -ansi -Wall -Werror -I/local/xen.git/tools/libs/devicemodel/../../../tools/include \ -S -o /dev/null $i || exit 1; \ echo $i; \ done >headers.chk.new mv headers.chk.new headers.chk i.e. with an empty for loop, and checking only the $(AUTOINCS). Reinsert a $(LIBHEADERS) dependency. Fixes: 4664034cd ("tools/libs: move official headers to common directory") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross --- CC: Juergen Gross CC: Roger Pau Monné CC: Wei Liu --- tools/libs/libs.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index a68cec244c..2d973ccb95 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -76,7 +76,7 @@ else .PHONY: headers.chk endif -headers.chk: $(AUTOINCS) +headers.chk: $(LIBHEADERS) $(AUTOINCS) headers.lst: FORCE @{ set -e; $(foreach h,$(LIBHEADERS),echo $(h);) } > $@.tmp