[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] stubdom: foreignmemory: Fix build after 0dbb4be739c5


  • To: Julien Grall <julien@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 13 Jul 2021 10:25:20 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e3aLAE0wN+Xi8yK1UzQV53NnMyHm/VmnS2oCnmkikec=; b=NaOWN+htbq1zitfkcHbElyUw6hAJ6lzSGcimBCECPi36KU4pDBIpDeE7SDY4mmOo99rOJhrl9jssejUcH58pmYXXturBpNf+SC1ixscePgrA3a2vpIqoq+UYhaS6oSKKdG9yJKDWJnTMVwiXp5wC871dQ20XRMuEKLwsgqSqM5w1E85fNrKrn4yP2gZ5af4JM+0+7spdve2CbUHjlA2cJK2afK4k6DiO9Og1FeYVC+w7uwZueXFjEqBkDGpxwiwQhN810BwF2uU+V1gxOjeVCSp4FYbutqwkvAqEF5yNu5KJMtoQ7SSEPa0aIbL/Ukf8rLPnNF0wv3BSP1IFV6smAg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YqQdmYMVefp7j/yxfKZMf7odEoHdix00krQpaElc20PyZJL/q1UXMspKh2BqeWbj0vium4aNqALkjmIrD1qjD3Ars+Bnt3sRsj7ZZq9eSgWhqa501SjQiiO4IsTQaqzkWpV+i5gh3DpK4HSjAtvFd9x334HyLH44A56TcRILfLd+IHTQgh6HwGrLuS1Uj7MKZfMU36jNYDLjG9O3mDczkh+cZkNDy7J4n7l4q906uUp4SahPVS1nv81QkrSTcE3Liy351+JDviaFSHZIA/omZxZHIcTxKFAGt7UwKetmIkF1pd+cAnuEN6k0DId57U21bJ/Dzh9q+yMrWKIU1mknUg==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Julien Grall <jgrall@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Tue, 13 Jul 2021 09:25:38 +0000
  • Ironport-hdrordr: A9a23:75tH6KhdOY3GFXYJygvSyBsQjHBQXiAji2hC6mlwRA09TyX5ra 2TdTogtSMc6QxhPE3I/OrrBEDuexzhHPJOj7X5Xo3SOTUO2lHYT72KhLGKq1Hd8kXFndK1vp 0QEZSWZueQMbB75/yKnTVREbwbsaW6GHbDv5ag859vJzsaFZ2J921Ce2Gm+tUdfng8OXI+fq DsgPZvln6bVlk8SN+0PXUBV/irnaywqHq3CSR2fiLO8WO1/EuV1II=
  • Ironport-sdr: HjiPkdvLwgT4D/3EbPRSu884Ndbq8I4lKdjz9FGA6SaVY1xcbT21iVZs+iYhTel4Wmq7IppyJA w322owHZ0jKP6fKPT5OKgOYvSQ0UgKHofckiRmPTEv5M0v759GcFlUx63I0La+I+6mgFvdLojr GTRBCm5O5gp9NaiYCnj0P49QLLaLrasCfKz4fxX4ZC74bBnlSNwdoc6Bax+YM2AHivY6i7/IAe Ck/6Lu5EAE7vr7+sdJ9NasLr+NlDToGSbYbiqVViR9plxavzpH9PqlsU7eicpXj5bUxOT/xRpY qdc=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13/07/2021 10:20, Julien Grall wrote:
> From: Julien Grall <jgrall@xxxxxxxxxx>
>
> 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 ‘XEN_GUEST_HANDLE_64’
>      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 <jgrall@xxxxxxxxxx>
>
> ---
>
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>
> 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/minios.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 <samuel.thibault@xxxxxxxxxxxxx>.
>   */
>  
> +/*
> + * xenctlr.h

xenctrl.h

Otherwise, Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

>  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 <xenctrl.h>
> +
>  #include <mini-os/types.h>
>  #include <mini-os/os.h>
>  #include <mini-os/mm.h>




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.