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

Re: [PATCH v6 1/8] xen: reuse x86 EFI stub functions for Arm


  • To: Wei Chen <Wei.Chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 1 Jul 2022 12:07:05 +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=QE/ZsfTp4HR94aaoC2vqzmvLdkoUqNUorD1fOt6N8tA=; b=ln1onDQl/HbqjWVSEL/nsWVVmfC2Uj7sEbmVRaxioDcFaD2HIaeHl/gz5h/Al5oVbxcbBl/PxgUjHmOu0IQ+h24DpLzU+MhbWFZoQfnK8KgPWa9RKIfJOhzEtQFtTMJvQtg0SqzAyZvxQzmEpcPYTy2RwjX2FXx6cNohmugWQ+3xy52n76eCPVu3/F87dT0MNwk92gtrF6RBW8xsO+qbO7TKK4JRTdY59b3JkLkecy21dzbkdxxKw/Xacj7cgPjL3DoFPZYZpMS9svJUkEhV7nd505MLq4Pd4IOWqS9Mi0NX4jVRdaECu6zTPdpDRP9z3qqJqvOPKSFYV9UaH9NkBA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g+NTs4GQfia4NC7fvGHrAysuI8mLIy6a+pYS8V05LlRLlwqFFy30NSJMDsDMWsw7zpTTemqsplYNDBlKI1fB3o9iKG9hKGMqD4ydyKkXSjYezyxb+1BATQwA23p8AZHIUcMSrcd80LomUlPZtGF0dGQ/R1sq42OZd1fRBuxQsQeDVHekIq/gmr1ZWM4ganPji+8RNywBbi9u2vZ4XyPODkFgqPOFjlot+Nslrt2n2NCTsg4mjYOU6VCeAMEH6/mJQxy9p7K5T7V1dOrHVFHwYQiVy1PxOrSSI4Z8P0qNHcRAG6DZqrVna5+zTKTxOFRXrO9Tw+G7KcdUpGQWOrKnOw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: nd <nd@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jiamei Xie <Jiamei.Xie@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Fri, 01 Jul 2022 10:07:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.07.2022 08:10, Wei Chen wrote:
> Hi Jan,
> 
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: 2022年7月1日 13:54
>> To: Wei Chen <Wei.Chen@xxxxxxx>
>> Cc: nd <nd@xxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>; Bertrand
>> Marquis <Bertrand.Marquis@xxxxxxx>; Volodymyr Babchuk
>> <Volodymyr_Babchuk@xxxxxxxx>; Andrew Cooper <andrew.cooper3@xxxxxxxxxx>;
>> Roger Pau Monné <roger.pau@xxxxxxxxxx>; Wei Liu <wl@xxxxxxx>; Jiamei Xie
>> <Jiamei.Xie@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx; Julien Grall
>> <julien@xxxxxxx>
>> Subject: Re: [PATCH v6 1/8] xen: reuse x86 EFI stub functions for Arm
>>
>>>>>>> this way.
>>>>>
>>>>> I have taken a look into this warning:
>>>>> This is because the "-fshort-wchar" flag causes GCC to generate
>>>>> code that is not binary compatible with code generated without
>>>>> that flag. Why this warning hasn't been triggered in Arm64 is
>>>>> because we don't use any wchar in Arm64 codes.
>>>>
>>>> I don't think that's quite right - you actually say below that we
>>>> do use it there when interacting with UEFI. There's no warning
>>>> there solely because the information isn't embedded in the object
>>>> files there, from all I can tell.
>>>>
>>>
>>> Maybe I should describe it this way: Arm64 does not use wchar type
>>> directly in any code for parameters, variables and return values.
>>> So Arm64 object files are exactly the same with "-fshort-wchar" and
>>> without "-fshort-wchar".
>>>
>>> Although Xen's EFI code interacts with UEFI firmware, similar to RPC
>>> function calls, these code also do not explicitly use wchar.
>>
>> How does it not? There are ample string literals as well as enough
>> uses of CHAR16 (the UEFI "abstraction" of wchar_t).
>>
> 
> But I don't think CHAR16 will be affected by -fshort-wchar, because we
> have specified CHAR16 as unsigned short type in typedef.

Oh, I didn't recall that anomaly. Yes, then only string literals are
affected. Albeit I'd hope gnu-efi would at some point switch to using
wchar_t as the underlying type, as long as the compiler provides it.

Jan



 


Rackspace

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