xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Shawn Anastasio <shawn@anastas.io>, xen-devel@lists.xenproject.org
Cc: tpearson@raptorengineering.com,
	George Dunlap <george.dunlap@citrix.com>,
	Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH 0/3] Initial support for Power
Date: Wed, 7 Jun 2023 19:07:48 +0100	[thread overview]
Message-ID: <c1e75aaf-407d-6163-b382-b0c984e9db4c@citrix.com> (raw)
In-Reply-To: <cover.1686148363.git.shawn@anastas.io>

On 07/06/2023 4:06 pm, Shawn Anastasio wrote:
> Hello all,
>
> This patch series adds support for building a minimal image
> (head.o-only) for Power ISA 2.07B+ (POWER8+) systems. The first patch
> boots to an infinite loop and the second adds early serial console
> support on pseries VMs, with bare metal support planned next.
>
> Since Xen previously had support for a much older version of the ISA in
> version 3.2.3, we were able to carry over some headers and support
> routines from that version. Unlike that initial port though, this effort
> focuses solely on POWER8+ CPUs that are capable of running in Little
> Endian mode.
>
> With an appropriate powerpc64le-linux-gnu cross-toolchain, the minimal
> image can be built with:
>
> $ make XEN_TARGET_ARCH=ppc64 -C xen openpower_defconfig
> $ make XEN_TARGET_ARCH=ppc64 SUBSYSTEMS=xen -C xen TARGET=ppc64/head.o
>
> The resulting head.o can then be booted in a standard QEMU/pseries VM:
>
> $ qemu-system-ppc64 -M pseries-5.2 -m 256M -kernel xen/ppc64/head.o \
> 	-vga none -serial mon:stdio -nographic
>
> Thanks,
> Shawn
>
> Shawn Anastasio (3):
>   xen: Add files needed for minimal Power build
>   xen/ppc: Implement early serial printk on PaPR/pseries
>   maintainers: Add PPC64 maintainer

Oh wow - this is a surprise, but certainly a good one.

We've recently done just a similar exercise with RISCV64, starting with
getting cross-compilation and a basic smoke test into our CI.

We use gitlab CI, and one example is
https://gitlab.com/xen-project/xen/-/pipelines/889871648  (search for
riscv64 in amongst all the x86 and ARM).

The configuration is all in tree, in the automation/ directory. 
Relevant files to copy/tweak are:

automation/build/archlinux/current-riscv64.dockerfile (x86 cross compile
container)
automation/scripts/qemu-smoke-riscv64.sh (smoke test script)
automation/gitlab-ci/{build,test}.yaml (wire the jobs up)

The smoke test looks on stdout for "All set up" which can be any string
put out via earlyprintk.

If you look around in the Xen tree at bb62c25e3e5c and take the makefile
override's in particular, you should be able to get `make -C xen build`
work without any magic TARGET= overrides, and without most of the
headers you've added in patch 1.  The trick is to have a head.S which
doesn't include any files (except the config.h it gets implicitly).

We're still trying to do some re-arranging to the common / arch split to
remove unnecessary boilerplate.  Having a set of PPC headers too will
make it easier to spot the rough edges in the current boundary.



Looking to the future, where could XenProject get some real hardware to
put into our CI systems?  We'd want to do that in due course.

I see you've nominated yourself as maintainer, which is of course fine. 
How much time do you have to put towards this?  It is some part of a
full time job, or just your own free time?

Do you have any suggested reading for those of us who are invariably
going to need to learn some of the CPU/platform/architecture details,
but aren't really PPC-literate right now?

Thanks, and welcome.

~Andrew


  parent reply	other threads:[~2023-06-07 18:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 15:06 [PATCH 0/3] Initial support for Power Shawn Anastasio
2023-06-07 15:06 ` [PATCH 1/3] xen: Add files needed for minimal Power build Shawn Anastasio
2023-06-09  9:15   ` Jan Beulich
2023-06-09 15:34     ` Shawn Anastasio
2023-06-07 15:06 ` [PATCH 2/3] xen/ppc: Implement early serial printk on PaPR/pseries Shawn Anastasio
2023-06-09  9:22   ` Jan Beulich
2023-06-09  9:29     ` Andrew Cooper
2023-06-09  9:38       ` Jan Beulich
2023-06-09  9:43         ` Julien Grall
2023-06-09  9:43         ` Andrew Cooper
2023-06-09  9:46           ` Julien Grall
2023-06-09  9:54             ` Andrew Cooper
2023-06-09 10:12               ` Julien Grall
2023-06-09 15:01                 ` Shawn Anastasio
2023-06-09 16:07                   ` Julien Grall
2023-06-09 16:20                     ` Shawn Anastasio
2023-06-12 15:19                     ` George Dunlap
2023-06-12 15:31                       ` Julien Grall
2023-06-13 14:59                       ` Shawn Anastasio
2023-06-09 15:36     ` Shawn Anastasio
2023-06-07 15:06 ` [PATCH 3/3] maintainers: Add PPC64 maintainer Shawn Anastasio
2023-06-09  9:04   ` Jan Beulich
2023-06-09 15:40     ` Shawn Anastasio
2023-06-07 18:07 ` Andrew Cooper [this message]
2023-06-07 19:01   ` [PATCH 0/3] Initial support for Power Shawn Anastasio
2023-06-07 19:30     ` Andrew Cooper
2023-06-08 15:19       ` Shawn Anastasio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c1e75aaf-407d-6163-b382-b0c984e9db4c@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=shawn@anastas.io \
    --cc=sstabellini@kernel.org \
    --cc=tpearson@raptorengineering.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).