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

Re: [PATCH v5 3/4] xen/ppc: Implement early serial printk on pseries


  • To: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 26 Jul 2023 17:45:32 +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=ySz/SFnjsUPAdbt+mpclW9aPO7ASJpsNoKdb4AiohCM=; b=kRL57QaZ2euyeFts0sE1KlwdGybzcsSXciLXHDpdPRoPXckADDsTZwUvSUkjZeXpIOhGY0ZYEWFys08SO14QqppY1ZMrP6LnxY29/EItteUO9e2pDrRhP+ozv65JJASTsigj4CP3iBu+uX6qdjykb02CczZNAA+ba5bO/ntbHz418aDq2OgsRfcEJpUT6cGZ2ETuAp2Nvs8kZDedt2XkgmYyDwrh3SVk2rMegSg1D7f4fWfFD6LJ5SxjCLs/lAnGd3rly2UYrg9BoKt3VtyntsmSyhnr2ikuFXJ+vaL6WjVnggKDdZTdIyG8jLa8j/CHqOO9MmNIijS7i9gjZS8U2g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RuukAH57hSROk9eOL7yUvnAC8/kCLPq43spMkF82wRWRrqHbM6I/u25N4IQcPwoVDabMuLEwGJOCLzDTYsSJ4CW6xrJuWBJmxAPGGONZdnKoWmz3fPMJqlIqvE+WwnoQbzAkonRiK6FmSsqMy4pAYoRjIvLqqYDCXrQ5NeiZSMaNrrp4C7q+7d/soRVET385cHI3uTzpiZLBAX4wMpdRWoQ9uEdibBPX1Kchvlz2NrW9f6H7LIf8DSer73SD0wuNFgtXDitME8mbUnFNe0KnrZyMSsS+Cd5DObJj7jcAvB4LCOf5frn5ABJwiUxZFsqE8Vgra5EA87avQ/yUUW+EhQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 26 Jul 2023 15:45:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26.07.2023 17:42, Shawn Anastasio wrote:
> On 7/26/23 10:32 AM, Jan Beulich wrote:
>> On 24.07.2023 17:06, Shawn Anastasio wrote:
>>> On 7/24/23 7:40 AM, Jan Beulich wrote:
>>>> On 21.07.2023 19:02, Shawn Anastasio wrote:
>>>>> On typical Power VMs (e.g. QEMU's -M pseries), a variety of services
>>>>> including an early serial console are provided by Open Firmware.
>>>>> Implement the required interfaces to call into Open Firmware and write
>>>>> to the serial console.
>>>>>
>>>>> Since Open Firmware runs in 32-bit Big Endian mode and Xen runs in
>>>>> 64-bit Little Endian mode, a thunk is required to save/restore
>>>>> any potentially-clobbered registers as well as to perform the
>>>>> required endianness switch. Thankfully, linux already has such
>>>>> a routine, which was imported into ppc64/of-call.S.
>>>>>
>>>>> Support for bare metal (PowerNV) will be implemented in a future
>>>>> patch.
>>>>>
>>>>> Signed-off-by: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
>>>>
>>>> While I've committed the earlier two patches, I had to back out this
>>>> one. In my environment (gcc13) the build fails due an unresolved
>>>> reference to memset() out of boot-of.c (supposedly from of_call()).
>>>
>>> Does removing the `{ 0 }` initializer to `struct of_service s` on line
>>> 43 resolve this?
>>
>> Yes, that's what's causing the call (and removing, whether or not correct,
>> helps).
> 
> Thanks for confirming. Removing it should be fine since the code
> manually initializes all of the other fields of the struct. The only
> behavioral difference is that the members of `ofs_args` at indices >=
> nargs would be left uninitialized. This shouldn't be an issue though
> since we're guarding reads of the array on `nargs` and `nrets` and thus
> only read explicitly initialized values (and of course, firmware would
> do the same).
> 
> Naturally we can't avoid memset calls forever. I have lib/ building
> locally, but if we could get this series in without having to make those
> changes here that'd be great.

Are you suggesting I should put in this patch almost as is, with just
that initializer dropped?

Jan



 


Rackspace

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