[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>, Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 13 Jul 2021 13:39:17 +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=Ef84o/OeHu6OqZFNBEnEMx42HBtfd51MIH4pilvhb/U=; b=a7olgLiWBKO0rVWkQfvFvmIaD4OGn6KOWcAz1o9objAopYeH2fkNITaBc0XLditi2D7I2yUfOI2YAa8nVuuA08TUXJRIzoqrYOxRgfDTEYPbwWBCM1sfbLx18AESIw45lQ5RnAMcti0fcFl0suP9VQer/U2KoshCTHTl8q0JKTu15LdWl71/A+PnEG91YDwEmvUUaNY9VzC0+A+kbeoSuf54U4NB4zKw/tpPtPh2sd+KzHx4MOHy7WSqwXePyXCRyjYL8V+apX0kT7n+9PO8qdPeKCbmPKup+d60+BCqtrlBpD6kGNm+9q4DE3LUAYPlh5/wvu8xlpVXDkY5IcXFCg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cwXQhKTSeng+RDwwvNt/3+eZr3+HzQGbvlZnYj9gxJ/XuDk1ds6XN28FJc2hO8eHW7BkSSQmlHoksNZRqf4XYh1HSyY+u8rV+tTocHGqKy45Acre6/PVTvwCMpg76eM4nL80jI79piwMOwYlXbNSbRb/gLqJJC56KCrRqnmbNaeZgPn1U1xHGhZWrhv0YRvDyN9OQFyl+yqH+X2UqMUHAGWOC3Dc0yUAm32HHocf+b9qSe3/OYZo1nuXJ1yKPWNl2r4TEvC0X8MAt4OKmi6Dj1g4X88kuidb8v2edUM3B/aDezDqyXspKxILshGsUcWufbbSayKga9i9XErAlaj8xQ==
  • Authentication-results: esa3.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 12:39:48 +0000
  • Ironport-hdrordr: A9a23:AS8xy6+8Qz7uX1FLaq9uk+AiI+orL9Y04lQ7vn2ZKSY5TiVXra CTdZUgpHvJYVMqMk3I9uruBEDtex3hHP1OkOws1NWZLWrbUQKTRekP0WKL+Vbd8kbFh4xgPM lbEpSXCLfLfCVHZcSR2njFLz73quP3j5xBho3lvglQpRkBUdAG0+/gYDzraXGfQmN9dPwEPa vZ3OVrjRy6d08aa8yqb0N1JdQq97Xw5evbiQdtPW9e1DWz
  • Ironport-sdr: glGuvsySL4quMF26omlxfjiCcSBG1K4lre3CWoDU+iz7b+FK87Qzd4tQgW9FM/WIXfnQM7uf3U g84KJ6rRgrQzxmU5sIUkK5vvFun3XGoIBgz5zO5a0iXvZoDJ/18jj+EiL4IE1wXDoigG5LdkUX 6SJUUHlKIokudA5pXiXxqBH0s9APj1Bw0/bA7w0+PRT39SFF77dzTvMT1RkZ09ZGPaoGUu+t2s B55K5cxFSqOtQrU6S44tgXVQoJI40m2HuV/srbndpGey/Gaj3npkXBjy74lirQkb3/mia5N1hV yko=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13/07/2021 12:53, Julien Grall wrote:
> Hi Andrew,
>
> On 13/07/2021 12:23, Andrew Cooper wrote:
>> On 13/07/2021 12:21, Julien Grall wrote:
>>> Hi Andrew,
>>>
>>> On 13/07/2021 10:35, Andrew Cooper wrote:
>>>> 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.
>>>
>>> Well... Previously we were using PAGE_SIZE which is just plain wrong
>>> on Arm.
>>>
>>> At the moment, we don't have a way to query the page granularity of
>>> the hypervisor. But we know it can't change because of the way the
>>> current ABI was designed. Hence why using XC_PAGE_SIZE is the best of
>>> option we had until we go to ABIv2.
>>
>> Still doesn't mean that XC_PAGE_SIZE was ok to use.
>
> Note that I wrote "best of the option". The series has been sitting
> for ages with no-one answering... You could have provided your option
> back then if you thought it wasn't a good use...

On a series I wasn't even CC'd on?

And noone had even bothered to compile test?

>
>>
>> Sounds like the constant needs moving into the Xen public headers, and
>> the inclusions of xenctrl.h into stable libraries needs reverting.
>
> This could work. Are you planning to work on it?

No.  I don't have enough time to do my own work thanks to all the CI
breakage and regressions being committed.

This needs fixing, or the original series reverting for 4.16 because the
current form (with or without this emergency build fix) isn't acceptable
to release with.

~Andrew




 


Rackspace

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