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

Re: [RFC PATCH] libacpi: Fix cross building x86 on arm


  • To: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 24 Aug 2022 15:05:03 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ie6dxQve/Zt2WSnieDcVoP0CEePnw5LG9pR8riFSqzE=; b=DuP1Kgm/BFJm3pdVvcP3/paSerap0i6ljCht9pwS8Y5ZvjrpCjE4KNyB/GlsQeJrsbLrUtoxqw0EYo8VO8LbtT1HyywAs8QcJ1OoiWeBYJU52KLa9Cm0ZmQOnoSlusDfZVt/BOOmsz5r0GT0CPDngwLcJPKuO2g/Ku69SeN2jwdNcUQ1++RKWEB5Adqdg0zcJJmL2iLaO0BEgcd/QT6fStbBYRaGL3HcPvJih2/pbvf0cxa30J1XxOiu/H130+vbK3RmejESEkxGi8zfnGlcg9Sk/IKv3gSdTVjeY2VGsGU93zmNWlrzqIh4oPjL7ODeaFoIoWaejmh8Lg5IXm4eAg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HdwtNxCFDtnFIuZST8uW/RQqwmoilrhc4aRJIU+hBpL8w2kcf+C6kOKfXIXMbxRrWqmfPwbj+XskAAlnwlpLXM3Emtg8zDEmutgvQjYpEyPjM4/wiBJL1L2pdYd2SsUnD7t6GuUskTAopPtICdn99r5AgmvKmQL/IjhCUYjDISpfQpATvADHCDGloYVrvXhldpw4HVtHYn6EjwNNqm3RzbhBKs2Efqi8lcCFGmAGY1ujsqHJ4yPiHlYb45QBpws7/vg1leKGULza6L2YVMJStVkSrOcfka5qNo4JBs8iqgkaQR23qQ7b5crkznqs/5JNGcnjNghvmmdniGob2XxlpA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 24 Aug 2022 13:05:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.08.2022 14:43, Bertrand Marquis wrote:
> 
> 
>> On 24 Aug 2022, at 08:37, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>
>> On 23.08.2022 17:56, Bertrand Marquis wrote:
>>>> On 23 Aug 2022, at 16:45, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>>> On 23.08.2022 17:09, Bertrand Marquis wrote:
>>>>> How about moving those to a xen-acpi.h header and include that one in 
>>>>> xen.h ?
>>>>
>>>> In principle okay, if there wasn't the need for HVM_MAX_VCPUS. With a
>>>> suitable comment it may be okay to live there. I'd be curious what
>>>> others think.
>>>
>>> The problem with this already exists in the current status as this is 
>>> defined in
>>> hvm_info_table.h which is never included from arch-x86/xen.h
>>
>> You're referring to it being necessary to explicitly include both headers.
>> That's not what I'm referring to, though: The tool imo shouldn't include
>> hvm_info_table.h, and hence the HVM_MAX_VCPUS would need to move as well.
> 
> Any suggestion where ?

Not really, no. That's why I said this is the one part where improvement
is more difficult. Otoh hvm_info_table.h is self-contained right now and
doesn't even produce potentially misleading struct layout for the one
struct it declares. So perhaps not too bad if left alone.

> The more I dig, the more I find that everything is including xen.h and going 
> round.
> Arch-x86_*.h headers are including arch-x86/xen.h including xen.h

Indeed, all quite odd.

>>> Including hvm_info_table.h from xen-acpi.h could create include path issues.
>>
>> Include path issues? Both are / would be public headers. But as said, I
>> don't think any new header introduced for the purpose at hand should
>> include _any_ other public header.
> 
> For now I can create a arch-x86/xen-acpi.h and move there the XEN_ACPI_*
> definitions and include that one instead in mk_dsdt.h.
> The change will be small and should not have much impact.
> 
> Modifying HVM_MAX_VCPUS is not per say needed and I think would not be
> enough to make the situation cleaner.
> 
>>
>>> But as those are used nowhere apart from mk_dsdt, I would probably skip the
>>> include of xen-acpi.h from xen.h.
>>
>> Hmm, yes, that's reasonable I guess as far as XEN_ACPI_* go. Of course
>> HVM_MAX_VCPUS is a different matter.
>>
>>> Any chance that those XEN_ACPI_ are needed by some external tools that
>>> could get broken by this modification ?
>>
>> Requiring them to include another header is, I think, a tolerable form
>> of breakage, the more that such breakage isn't very likely anyway.
> 
> Then if you are ok with it, I will just submit the xen-acpi.h creation patch 
> and fix
> mk_dsdt compilation for x86 on arm.
> 
> The rest would require more thinking and I do not think it should be done now.
> 
> Can you confirm you agree ?

Almost - I don't like xen-acpi.h as the name of the new header. Just
arch-x86/acpi.h would likely be too generic, so I'd like to suggest
arch-x86/hvm-acpi.h or arch-x86/guest-acpi.h. I have a slight
preference to the latter, because "hvm" also covers "pvh", yet PVH
Dom0 is dealt with entirely differently ACPI-wise. Plus "guest"
isn't misleading as to PV, because PV guests don't have ACPI anyway.

Jan



 


Rackspace

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