From nobody Thu May 2 11:08:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1626168048; cv=none; d=zohomail.com; s=zohoarc; b=jfdRTqIwH145SmDjQf9DHZocq5aLy9LBGAuZYw9NuiLs0mFnCyTCJBhT5nxttsPFV216fQq17wn9ZuyOpd75jKS2+h8arMpzBqvZqsUkxDf6f5T1UFtimPGTH4YJbB394WCzxI3qRwNhggsu0zr2N5ntehtLsse7tWoIut0bBIA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626168048; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=4Od6Pp7OPQpJU9KVHYnFK3cfHd/Ra2FO/b82se4czDI=; b=AFxcyw2IWchMScm96zxl3ie23b7dHclKYd7+EYiPt0EjTVKgD+iFjYLCfbdGj6DvS/sSKvDaHUQ+FKAK+O9dwhe3BWbHKb/8xpYySNFGmx6GMHcpTalJgnk6Dw18+biSStEoW8KdlGODCK/fAw3xVzZQiox6JgoUZCIx72+PQTw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1626168048726452.5846966479063; Tue, 13 Jul 2021 02:20:48 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.155219.286572 (Exim 4.92) (envelope-from ) id 1m3EaX-0001Ny-3v; Tue, 13 Jul 2021 09:20:25 +0000 Received: by outflank-mailman (output) from mailman id 155219.286572; Tue, 13 Jul 2021 09:20:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m3EaX-0001Nr-13; Tue, 13 Jul 2021 09:20:25 +0000 Received: by outflank-mailman (input) for mailman id 155219; Tue, 13 Jul 2021 09:20:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m3EaV-0001Nl-Tn for xen-devel@lists.xenproject.org; Tue, 13 Jul 2021 09:20:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m3EaU-0001ki-LP; Tue, 13 Jul 2021 09:20:22 +0000 Received: from 54-240-197-235.amazon.com ([54.240.197.235] helo=ufe34d9ed68d054.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3EaU-00010t-CH; Tue, 13 Jul 2021 09:20:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:Cc:To:From; bh=4Od6Pp7OPQpJU9KVHYnFK3cfHd/Ra2FO/b82se4czDI=; b=UJuCeKN/zRu+A1Lh51BJkR0udY 6W7AtHxa66Iso05z7vd4S0bR4oZnrU18bciqNQAcx+LXxZPUf9OuefPMbofyHZS2LP+HfXbEGpbax 60/YZ7Yscos6S5rok7RDJlhfPekx5grab3EnYnySCXtVaSj1ODsSUwItNeCJS8ACNxUM=; From: Julien Grall To: xen-devel@lists.xenproject.org Cc: julien@xen.org, Julien Grall , Ian Jackson , Wei Liu , Juergen Gross , Andrew Cooper Subject: [PATCH] stubdom: foreignmemory: Fix build after 0dbb4be739c5 Date: Tue, 13 Jul 2021 10:20:19 +0100 Message-Id: <20210713092019.7379-1-julien@xen.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xen.org) X-ZM-MESSAGEID: 1626168049355100001 From: Julien Grall Commit 0dbb4be739c5 add the inclusion of xenctrl.h from private.h and wreck the build in an interesting way: In file included from xen/stubdom/include/xen/domctl.h:39:0, from xen/tools/include/xenctrl.h:36, from private.h:4, from minios.c:29: xen/include/public/memory.h:407:5: error: expected specifier-qualifier-list= before =E2=80=98XEN_GUEST_HANDLE_64=E2=80=99 XEN_GUEST_HANDLE_64(const_uint8) buffer; ^~~~~~~~~~~~~~~~~~~ This is happening because xenctrl.h defines __XEN_TOOLS__ and therefore the public headers will start to expose the non-stable ABI. However, xen.h has already been included by a mini-OS header before hand. So there is a mismatch in the way the headers are included. For now solve it in a very simple (and gross) way by including xenctrl.h before the mini-os headers. Fixes: 0dbb4be739c5 ("tools/libs/foreignmemory: Fix PAGE_SIZE redefinition = error") Signed-off-by: Julien Grall --- Cc: Andrew Cooper I couldn't find a better way with would not result to revert the patch (and break build on some system) or involve a longer rework of the headers. --- tools/libs/foreignmemory/minios.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/libs/foreignmemory/minios.c b/tools/libs/foreignmemory/m= inios.c index c5453736d598..d7b3f0e1c823 100644 --- a/tools/libs/foreignmemory/minios.c +++ b/tools/libs/foreignmemory/minios.c @@ -17,6 +17,14 @@ * Copyright 2007-2008 Samuel Thibault . */ =20 +/* + * xenctlr.h currently defines __XEN_TOOLS__ which affects what is + * exposed by Xen headers. As the define needs to be set consistently, + * we want to include xenctrl.h before the mini-os headers (they include + * public headers). + */ +#include + #include #include #include --=20 2.17.1