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

Re: [PATCH 2/3] xen/ppc: Implement early serial printk on PaPR/pseries


  • To: Shawn Anastasio <shawn@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 9 Jun 2023 11:22:21 +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=eSKU4UdbxaiRWFlrzwPHNShPPcIdaushNx1dN13n7rM=; b=cUHWcy9tVNgE4vr3T1Oix140NW+cuYjOxsqD/NAIjjQMBeXwr8OTUA7Zyk5wn0z3bMOGFp5KBI37E7+YqXpCb4G8ryeQo772qN9zieakdrfwpK6spqpbYSBhsPxoatiwqbkTpHULs6UbX2yHMdarKWaSY0Xhx8pDGLLqZGlH3nqCxrYSx559xyAqxmmnzTwS9xmzQo973LytfzPkbhdTnJO/nH7BHfDsDbxE4IpH5yM0Fyf6slaQdWdcN9P7wM+XzR9u2AjpUtAiIY3wlJdyL0bnA8Zp6ZFqGmxC148D/OTG1I9wwG07xXrGm1qgyI0wNIE9YOzIXHGbCN3N9jZ4Ow==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e1tkPXcFE7mOfPtvZw/i8s4zl3J4xESU6yzzVbuDCnGzll0KMUbob+JKFlMr66fe8TTUIt3SjC/uCn6CcXzJpyWjxINdsCp3o3fzOsiUrGIo1g2BZs0JCZWcF7bUDOqcXcWkrFyImOsIwCFVqq44StmEyLXT9IY9aKIbJRDtxi3WyW9pG8qYzB3HpzNB50A+LGmVh/+WoMeo0W98WXgRP0Y4BabdZr068CGKSeW98nybhHtQGHDx8NGgqzZHY2wQ7AvyZEYA2TWED6PosmkbJLhlFCWI0WRGPgOOtpSS/fm0gEalJpFUOlHUV5uxxPg9lvuw2KOKo6iz606rpTR7iQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: tpearson@xxxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Shawn Anastasio <shawnanastasio@xxxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 09 Jun 2023 09:23:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.06.2023 17:06, Shawn Anastasio wrote:
> On typical Power VMs (e.g. QEMU's -M pseries), a variety of services
> are provided by OpenFirmware, including an early serial console.
> Implement the required interfaces to call into OpenFirmware and write
> to the serial console.
> 
> Since OpenFirmware 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 head.S.
> 
> Support for bare metal (PowerNV) will be implemented in a future
> patch.
> 
> Signed-off-by: Shawn Anastasio <shawnanastasio@xxxxxxxxxxxxxxxxxxxxx>

Just a couple of nits:

>  xen/arch/ppc/Kconfig.debug               |   5 +
>  xen/arch/ppc/Makefile                    |   3 +-
>  xen/arch/ppc/boot_of.c                   | 122 +++++++++++++++++++++++
>  xen/arch/ppc/configs/openpower_defconfig |   1 +
>  xen/arch/ppc/early_printk.c              |  36 +++++++
>  xen/arch/ppc/include/asm/boot.h          |  31 ++++++
>  xen/arch/ppc/include/asm/bug.h           |   6 ++
>  xen/arch/ppc/include/asm/byteorder.h     |  74 ++++++++++++++
>  xen/arch/ppc/include/asm/cache.h         |   6 ++
>  xen/arch/ppc/include/asm/config.h        |   3 +
>  xen/arch/ppc/include/asm/early_printk.h  |  14 +++
>  xen/arch/ppc/include/asm/processor.h     |  54 +++++++++-
>  xen/arch/ppc/include/asm/string.h        |   6 ++
>  xen/arch/ppc/include/asm/types.h         |  64 ++++++++++++
>  xen/arch/ppc/ppc64/asm-offsets.c         |  55 ++++++++++
>  xen/arch/ppc/ppc64/head.S                |  59 +++++++++++
>  xen/arch/ppc/setup.c                     |  20 +++-
>  17 files changed, 555 insertions(+), 4 deletions(-)
>  create mode 100644 xen/arch/ppc/boot_of.c

Unless required, in new additions we tend to prefer dashes over
underscores. In filenames it is pretty rare that dashes really need
avoiding.

> --- a/xen/arch/ppc/Kconfig.debug
> +++ b/xen/arch/ppc/Kconfig.debug
> @@ -0,0 +1,5 @@
> +config EARLY_PRINTK
> +    bool "Enable early printk"
> +    default DEBUG
> +    help
> +      Enables early printk debug messages
> \ No newline at end of file

There are many examples of this throughout the patch, which you want to
take care of.

> --- /dev/null
> +++ b/xen/arch/ppc/boot_of.c
> @@ -0,0 +1,122 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */

By default we mean to use ...

> --- /dev/null
> +++ b/xen/arch/ppc/early_printk.c
> @@ -0,0 +1,36 @@
> +/* SPDX-License-Identifier: GPL-2.0 */

... the more modern form of this (GPL-2.0-only). Anything deviating from
that may want justifying in the description.

Jan



 


Rackspace

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