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

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


  • To: Juergen Gross <jgross@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 13 Jul 2021 10:35:43 +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=vxT5CkU7iAcdzNi84SrgQZamLR7X08gqED74PP0+ZAI=; b=KneSavR30sTmHtpRdpgv0LwXtDcYklYoxpWCdo7nWkE6VEc7NU/u/NeNN9kNxO1odSqZDRT0g7Pkkx45IkoZkz/ZiaanZSol44MOWmLVGYWt+SHFQtK79i+7WgKdpGQdpHXcUquAgfYlwslgAwxHF1/phNGYkxL8YYMWlIR0DUCXtZoYg71QXONkMTmkxrHxZdtlZhxx83Ppl0NHNFe+zR8hcSFE2QasyaXCemu4wzzeZdKsdxD3LJAEcENQwnE9HKwSZliLD01YRaHPnywTxqG69/s0fMux1OsCCwzd4F7zy50ct0kU8gE2wdAdyaKhcnharSLeQs8GySOpewaEvA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KVn/U5/k53a2+UykKWuYd5PoLH0rBTynUA0vnD6ueF8oyJ6T5PueOqHsk0+z327hqi4zPYTK6JU1kXkjPJDYXlCfWO4GAZEITryCKT1GgnRolEMzXzlOgk3Ipy3iRlieCKKWpP6neCUqXUSWoCOP7pDhFFepNUI+8r0S8BQjqQfwjMVoP8Y3Q2IjMiRToa1JMtx6g/6sR4PKSqzaYbWSGasLJ7G5Uiu5k/n/q07jCAStDgQ86P97nFQCa/RGYmo1InsJeOb83C4twj8UBPyrHMw4r06HMIAb2v+RsVnHsjUbAC5EhCbQTZ3LdX11rD/svMY5+809tro6IHnJxJYx2Q==
  • Authentication-results: esa2.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>
  • Delivery-date: Tue, 13 Jul 2021 09:35:58 +0000
  • Ironport-hdrordr: A9a23:JnpiRa++mY2wrK7kp0Zuk+Etdb1zdoMgy1knxilNoENuHfBwxv rDoB1E73LJYVYqOU3Jmbi7Scy9qADnhOFICO4qTMuftWjdyRaVxeRZg7cKrAeQYxEWmtQtsp uINpIOcuEYbmIK/foSgjPIaurIqePvmMvD5Za8vgVQpENRGsVdBm9Ce3em+yZNNW977PQCZf ihD4Z81kGdkSN9VLXEOpBJZZmPm/T70LbdJTIWDR8u7weDyRuu9b7BChCdmjMTSSlGz7sO+X XM11WR3NTtj9iLjjvnk0PD5ZVfn9XsjvNFGcy3k8AQbhHhkByhaohNU6CL+Bo1vOaswlA3l8 SkmWZtA+1Dr1fqOk2lqxrk3AftlBw07WX59FOeiXz/5eTkWTMTEaN69MJkWyqcz3BlkMB30a pN0W7cnYFQFwn8kCP04MWNfw12l3CzvWEpnYco/j1iuLMlGf1sRLEkjQZo+M9qJlO/1GlnKp ghMCjk3ocUTbvABEqp+VWGqbeXLwcO9hTveDlLhiXa6UkRoJlD9Tpt+CUopAZIyHsMcegw2w 36CNUeqFhvdL5cUUsvPpZKfSOIYla9Ny4kdljieGjaKA==
  • Ironport-sdr: 7te/4Q1QP8lyw9wzH1vl0HTyahtxdjkT107rxeb05OLAbMJuGGgYuUG5NwpO7/kMPGUwtJIDta 6EHMQA6NRfbN5myc1r0igayK6pl28vsm15KWM5ThQVzrBt1hK2sorR7sVRDCYCC/RuLicNqro2 CrAyWDUgs2PIUN/sBu+Zkv9mDlKhqiNTKNIzr/ZJqi6jrdcbVxrnoSXxEahQ9ng5ITAthOEhHA x2T8cwUXKBme8afoXcnsy2yIfkoxfq5pM/n9w2q1ABHeeYa3GqwxgG34hxDwP9L2/rcYDCmu43 rBw=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13/07/2021 10:27, Juergen Gross wrote:
> On 13.07.21 11: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.
>
> Just adding a "#define __XEN_TOOLS__" before the #include statements
> doesn't work?

Not really, no.

libxenforeignmem has nothing at all to do with any Xen unstable
interfaces.  Including xenctrl.h in the first place was wrong, because
it is an unstable library.  By extension, the use of XC_PAGE_SIZE is
also wrong.

This all needs reverting/reworking to avoid making the stable libraries
depend on unstable ones, but in the short term we also need to unbreak
the CI.

~Andrew




 


Rackspace

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