Skip to contentSkip to conversation

ppc: Drop support for QEMU pseries

PATCH Superseded Shawn Anastasio 2 participants 5 messages Sep 5, 2023 – Sep 6, 2023

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#1 lore raw

PATCH 1/2 automation: Switch ppc64le tests to PowerNV machine type

In reply to Shawn Anastasio

Run ppc64le tests with the PowerNV machine type (bare metal) instead of the paravirtualized pseries machine. This requires a more modern version of QEMU than is present in debian bullseye's repository, so update the dockerfile to build QEMU from source.

---
 .../build/debian/bullseye-ppc64le.dockerfile  | 37 ++++++++++++++++++-
 automation/gitlab-ci/test.yaml                |  2 +-
 2 files changed, 36 insertions(+), 3 deletions(-)
automation/build/debian/bullseye-ppc64le.dockerfile +35 -2
index 8fad26e903..15827bbcf4 100644
@@ -1,4 +1,36 @@
+FROM debian:bullseye-slim AS builder
+
+ENV DEBIAN_FRONTEND=noninteractive
+ENV QEMU_TAG=stable-8.1
+ENV USER root
+
+# dependencies for qemu build
+RUN apt-get update && \
+    apt-get --quiet --yes install \
+        git \
+        build-essential \
+        python3-minimal \
+        python3-elementpath \
+        python3-pip \
+        ninja-build \
+        libglib2.0-dev \
+        libpixman-1-dev
+
+RUN mkdir /build
+WORKDIR /build
+
+# QEMU build from git
+RUN git clone --depth 1 --branch "${QEMU_TAG}" https://github.com/qemu/qemu && \
+    mkdir qemu/build && \
+    cd qemu/build && \
+    ../configure --target-list=ppc64-softmmu && \
+    ninja && \
+    ninja install
+
 FROM debian:bullseye-slim
+COPY --from=builder /usr/local/bin/qemu-system-ppc64 /usr/local/bin/qemu-system-ppc64
+COPY --from=builder /usr/local/share/qemu/skiboot.lid /usr/local/share/qemu/skiboot.lid
+
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
@@ -22,8 +54,9 @@ RUN apt-get update && \
         gcc-powerpc64le-linux-gnu \
         make \
         python3-minimal \
-        # for test phase
-        qemu-system-ppc \
+        # QEMU runtime dependencies
+        libglib2.0-0 \
+        libpixman-1-0 \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
automation/gitlab-ci/test.yaml +1 -1
index 9aa8deabea..9b26ccd907 100644
@@ -457,6 +457,6 @@ qemu-smoke-riscv64-gcc:
 qemu-smoke-ppc64le-pseries-gcc:
   extends: .qemu-ppc64le
   script:
-    - ./automation/scripts/qemu-smoke-ppc64le.sh pseries-5.2 2>&1 | tee ${LOGFILE}
+    - ./automation/scripts/qemu-smoke-ppc64le.sh powernv9 2>&1 | tee ${LOGFILE}
   needs:
     - debian-bullseye-gcc-ppc64le-debug
Signature · 1 line
2.30.2
#2 lore raw

PATCH 2/2 xen/ppc: Drop support for pseries/OpenFirmware

In reply to Shawn Anastasio

Since QEMU's PowerNV support has matured to the point where it is now suitable for development, drop support for booting on the paravirtualized pseries machine type and its associated interfaces.

---
 xen/arch/ppc/Makefile           |   1 -
 xen/arch/ppc/boot-of.c          | 113 --------------------------------
 xen/arch/ppc/include/asm/boot.h |  19 ------
 xen/arch/ppc/ppc64/Makefile     |   1 -
 xen/arch/ppc/ppc64/of-call.S    |  83 -----------------------
 xen/arch/ppc/setup.c            |  11 +---
 6 files changed, 3 insertions(+), 225 deletions(-)
 delete mode 100644 xen/arch/ppc/boot-of.c
 delete mode 100644 xen/arch/ppc/ppc64/of-call.S
xen/arch/ppc/Makefile +0 -1
index a059ac4c0a..b3205b8f7a 100644
@@ -1,6 +1,5 @@
 obj-$(CONFIG_PPC64) += ppc64/
 
-obj-y += boot-of.init.o
 obj-$(CONFIG_EARLY_PRINTK) += early_printk.init.o
 obj-y += mm-radix.o
 obj-y += opal.o
xen/arch/ppc/boot-of.c deleted +0 -113

113 lines not on this page · raw message

xen/arch/ppc/include/asm/boot.h +0 -19
index 296539cd9e..d62c3ff6e0 100644
@@ -4,25 +4,6 @@
 
 #include <xen/types.h>
 
-/*
- * OpenFirmware boot interfaces
- */
-
-enum {
-    OF_FAILURE = -1,
-    OF_SUCCESS = 0,
-};
-
-struct of_service {
-    __be32 ofs_service;
-    __be32 ofs_nargs;
-    __be32 ofs_nrets;
-    __be32 ofs_args[10];
-};
-
-int enter_of(struct of_service *args, unsigned long entry);
-void boot_of_init(unsigned long vec);
-
 /*
  * OPAL boot interfaces
  */
xen/arch/ppc/ppc64/Makefile +0 -1
index b9a91dc15f..5b88355bb2 100644
@@ -1,3 +1,2 @@
 obj-y += head.o
-obj-y += of-call.o
 obj-y += opal-calls.o
xen/arch/ppc/ppc64/of-call.S deleted +0 -83

83 lines not on this page · raw message

xen/arch/ppc/setup.c +3 -8
index 0106e9c9da..3fc7705d9b 100644
@@ -14,17 +14,12 @@ void __init noreturn start_xen(unsigned long r3, unsigned long r4,
 {
     if ( r5 )
     {
-        /* OpenFirmware boot protocol */
-        boot_of_init(r5);
+        /* Unsupported OpenFirmware boot protocol */
+        __builtin_trap();
     }
     else
     {
-        /*
-         * kexec boot protocol
-         *
-         * TODO: This currently assumes an OPAL/PowerNV system, but it's also
-         * possible to be kexec'd on an OF system.
-         */
+        /* kexec boot protocol */
         boot_opal_init((void *)r3);
     }
 
Signature · 1 line
2.30.2
#0 lore raw

cover ppc: Drop support for QEMU pseries

Hello all,

This small series drops support for the QEMU paravirtualized pseries machine type in favor of the bare metal PowerNV platform.

pseries was originally targeted for initial bringup since it has historically been much better supported by QEMU, but PowerNV support in QEMU has recently developed to the point where this is no longer a concern. Since I can think of very little practical use for running Xen under pseries, and supporting it requires non-trivial duplication of effort, drop support for it entirely.

This also requires a change to the ppc64le CI dockerfile to build a newer version of QEMU than is available in the bullseye repository.

Thanks,
Shawn

Shawn Anastasio (2):
automation: Switch ppc64le tests to PowerNV machine type xen/ppc: Drop support for pseries/OpenFirmware

 .../build/debian/bullseye-ppc64le.dockerfile  |  37 +++++-
 automation/gitlab-ci/test.yaml                |   2 +-
 xen/arch/ppc/Makefile                         |   1 -
 xen/arch/ppc/boot-of.c                        | 113 ------------------
 xen/arch/ppc/include/asm/boot.h               |  19 ---
 xen/arch/ppc/ppc64/Makefile                   |   1 -
 xen/arch/ppc/ppc64/of-call.S                  |  83 -------------
 xen/arch/ppc/setup.c                          |  11 +-
 8 files changed, 39 insertions(+), 228 deletions(-)
 delete mode 100644 xen/arch/ppc/boot-of.c
 delete mode 100644 xen/arch/ppc/ppc64/of-call.S

--
2.30.2

#3 lore raw

Re: [PATCH 2/2] xen/ppc: Drop support for pseries/OpenFirmware

In reply to Shawn Anastasio
Quoted 3 lines · Shawn Anastasio

Since QEMU's PowerNV support has matured to the point where it is now suitable for development, drop support for booting on the paravirtualized pseries machine type and its associated interfaces.

I think you want to mention that the pseries functionality was actually broken by the earlier change, both verbally and by means of a Fixes:
tag. The breakage actually may also want mentioning in patch 1 as well as the cover letter.

Quoted 11 lines
xen/arch/ppc/setup.c +2 -2
@@ -14,17 +14,12 @@ void __init noreturn start_xen(unsigned long r3, unsigned long r4,
 {
     if ( r5 )
     {
-        /* OpenFirmware boot protocol */
-        boot_of_init(r5);
+        /* Unsupported OpenFirmware boot protocol */
+        __builtin_trap();
     }

xen/arch/ppc/setup.c void __init noreturn start_xen(unsigned long r3, unsigned long r4, · line 23

Quoted 10 lines
xen/arch/ppc/setup.c +1 -6
     else
     {
-        /*
-         * kexec boot protocol
-         *
-         * TODO: This currently assumes an OPAL/PowerNV system, but it's also
-         * possible to be kexec'd on an OF system.
-         */
+        /* kexec boot protocol */
         boot_opal_init((void *)r3);

At least part of the comment may want retaining, as the code only handles the OPAL case?

Jan

#4 lore raw

Re: [PATCH 2/2] xen/ppc: Drop support for pseries/OpenFirmware

Quoted 10 lines · Jan Beulich
Quoted 3 lines · Shawn Anastasio

Since QEMU's PowerNV support has matured to the point where it is now suitable for development, drop support for booting on the paravirtualized pseries machine type and its associated interfaces.

I think you want to mention that the pseries functionality was actually broken by the earlier change, both verbally and by means of a Fixes:
tag. The breakage actually may also want mentioning in patch 1 as well as the cover letter.

Will do. I'll add mentions to the breakage in both patches and add a
Fixes: tag to this patch specifically.

Quoted 16 lines
Quoted 16 lines
xen/arch/ppc/setup.c +2 -5
@@ -14,17 +14,12 @@ void __init noreturn start_xen(unsigned long r3, unsigned long r4,
 {
     if ( r5 )
     {
-        /* OpenFirmware boot protocol */
-        boot_of_init(r5);
+        /* Unsupported OpenFirmware boot protocol */
+        __builtin_trap();
     }
     else
     {
-        /*
-         * kexec boot protocol
-         *
Quoted 9 lines

xen/arch/ppc/setup.c void __init noreturn start_xen(unsigned long r3, unsigned long r4, · line 23

Quoted 5 lines
xen/arch/ppc/setup.c +1 -3
-         * TODO: This currently assumes an OPAL/PowerNV system, but it's also
-         * possible to be kexec'd on an OF system.
-         */
+        /* kexec boot protocol */
         boot_opal_init((void *)r3);

At least part of the comment may want retaining, as the code only handles the OPAL case?

Since we're now explicitly only supporting Opal/PowerNV I don't think there's any need to point out that this code path doesn't properly handle the pseries+kexec case. boot_opal_init will gracefully fail under that circumstance anyway when it tries to find an /ibm,opal device tree node.

Quoted 1 line

Jan

Thanks,
Shawn