[PATCH v2 00/11] hw/ppc/spapr: Remove deprecated pseries-3.0 -> pseries-4.2 machines

Philippe Mathieu-Daudé posted 11 patches 3 weeks, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251021084346.73671-1-philmd@linaro.org
Maintainers: Nicholas Piggin <npiggin@gmail.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Chinmay Rath <rathc@linux.ibm.com>, Paolo Bonzini <pbonzini@redhat.com>
include/hw/ppc/spapr.h     |  16 --
include/hw/ppc/spapr_irq.h |   1 -
target/ppc/kvm_ppc.h       |  12 --
hw/ppc/spapr.c             | 299 ++++++++-----------------------------
hw/ppc/spapr_caps.c        |  12 +-
hw/ppc/spapr_events.c      |  20 +--
hw/ppc/spapr_hcall.c       |   5 -
hw/ppc/spapr_irq.c         |  36 +----
hw/ppc/spapr_pci.c         |  32 +---
hw/ppc/spapr_vio.c         |   9 --
target/ppc/kvm.c           |  11 --
11 files changed, 77 insertions(+), 376 deletions(-)
[PATCH v2 00/11] hw/ppc/spapr: Remove deprecated pseries-3.0 -> pseries-4.2 machines
Posted by Philippe Mathieu-Daudé 3 weeks, 3 days ago
v2: Rebased on https://lore.kernel.org/qemu-devel/20251009184057.19973-1-harshpb@linux.ibm.com/

Remove the deprecated pseries-3.0 up to pseries-4.2 machines,
which are older than 6 years. Remove resulting dead code.

Harsh Prateek Bora (5):
  ppc/spapr: remove deprecated machine pseries-3.0
  ppc/spapr: remove deprecated machine pseries-3.1
  ppc/spapr: remove deprecated machine pseries-4.0
  ppc/spapr: remove deprecated machine pseries-4.1
  ppc/spapr: remove deprecated machine pseries-4.2

Philippe Mathieu-Daudé (6):
  hw/ppc/spapr: Remove SpaprMachineClass::nr_xirqs field
  hw/ppc/spapr: Inline spapr_dtb_needed()
  hw/ppc/spapr: Inline few SPAPR_IRQ_* uses
  target/ppc/kvm: Remove kvmppc_get_host_serial() as unused
  target/ppc/kvm: Remove kvmppc_get_host_model() as unused
  hw/ppc/spapr: Remove SpaprMachineClass::phb_placement callback

 include/hw/ppc/spapr.h     |  16 --
 include/hw/ppc/spapr_irq.h |   1 -
 target/ppc/kvm_ppc.h       |  12 --
 hw/ppc/spapr.c             | 299 ++++++++-----------------------------
 hw/ppc/spapr_caps.c        |  12 +-
 hw/ppc/spapr_events.c      |  20 +--
 hw/ppc/spapr_hcall.c       |   5 -
 hw/ppc/spapr_irq.c         |  36 +----
 hw/ppc/spapr_pci.c         |  32 +---
 hw/ppc/spapr_vio.c         |   9 --
 target/ppc/kvm.c           |  11 --
 11 files changed, 77 insertions(+), 376 deletions(-)

-- 
2.51.0


Re: [PATCH v2 00/11] hw/ppc/spapr: Remove deprecated pseries-3.0 -> pseries-4.2 machines
Posted by Michal Suchánek 3 weeks, 3 days ago
Hello,

I noticed removal of old pSeries revisions.

FTR to boot Linux 3.0 I need pSeries-2.7 (already removed earlier).

The thing that broke booting linux 3.0 for me is
357d1e3bc7d2d80e5271bc4f3ac8537e30dc8046 spapr: Improved placement of
PCI host bridges in guest memory map

I do not use Linux 3.0 anymore which is the reason I did not notice this
breakage due to old platform revision removal.

At the same time quemu is sometimes touted as a way to run old OS
revisions. That does not work very well for pSeries.

Thanks

Michal

On Tue, Oct 21, 2025 at 10:43:34AM +0200, Philippe Mathieu-Daudé wrote:
> v2: Rebased on https://lore.kernel.org/qemu-devel/20251009184057.19973-1-harshpb@linux.ibm.com/
> 
> Remove the deprecated pseries-3.0 up to pseries-4.2 machines,
> which are older than 6 years. Remove resulting dead code.
> 
> Harsh Prateek Bora (5):
>   ppc/spapr: remove deprecated machine pseries-3.0
>   ppc/spapr: remove deprecated machine pseries-3.1
>   ppc/spapr: remove deprecated machine pseries-4.0
>   ppc/spapr: remove deprecated machine pseries-4.1
>   ppc/spapr: remove deprecated machine pseries-4.2
> 
> Philippe Mathieu-Daudé (6):
>   hw/ppc/spapr: Remove SpaprMachineClass::nr_xirqs field
>   hw/ppc/spapr: Inline spapr_dtb_needed()
>   hw/ppc/spapr: Inline few SPAPR_IRQ_* uses
>   target/ppc/kvm: Remove kvmppc_get_host_serial() as unused
>   target/ppc/kvm: Remove kvmppc_get_host_model() as unused
>   hw/ppc/spapr: Remove SpaprMachineClass::phb_placement callback
> 
>  include/hw/ppc/spapr.h     |  16 --
>  include/hw/ppc/spapr_irq.h |   1 -
>  target/ppc/kvm_ppc.h       |  12 --
>  hw/ppc/spapr.c             | 299 ++++++++-----------------------------
>  hw/ppc/spapr_caps.c        |  12 +-
>  hw/ppc/spapr_events.c      |  20 +--
>  hw/ppc/spapr_hcall.c       |   5 -
>  hw/ppc/spapr_irq.c         |  36 +----
>  hw/ppc/spapr_pci.c         |  32 +---
>  hw/ppc/spapr_vio.c         |   9 --
>  target/ppc/kvm.c           |  11 --
>  11 files changed, 77 insertions(+), 376 deletions(-)
> 
> -- 
> 2.51.0
> 
> 
Re: [PATCH v2 00/11] hw/ppc/spapr: Remove deprecated pseries-3.0 -> pseries-4.2 machines
Posted by Shivaprasad G Bhat 2 weeks, 1 day ago
Hi Michal,


On 10/21/25 4:37 PM, Michal Suchánek wrote:
> Hello,
>
> I noticed removal of old pSeries revisions.
>
> FTR to boot Linux 3.0 I need pSeries-2.7 (already removed earlier).
>
> The thing that broke booting linux 3.0 for me is
> 357d1e3bc7d2d80e5271bc4f3ac8537e30dc8046 spapr: Improved placement of
> PCI host bridges in guest memory map
>
> I do not use Linux 3.0 anymore which is the reason I did not notice this
> breakage due to old platform revision removal.

I tried booting linux kernel 3.13.0-170-generic from ubuntu 14.04.6 LTS 
with the oldest supported machine pseries-5.0 as of now.

It worked fine.


qemu-system-ppc64 -machine pseries-5.0 -accel tcg -nographic -m size=12G 
-cpu power8 -smp 1 -drive 
file=/root/images/ubuntu16.04.qcow2,format=qcow2,if=none,id=drive-virtio-disk0 
-device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0 -serial 
mon:stdio -kernel /root/images/vmlinux-3.13.0-170-generic -initrd 
/root/images/initrd.img-3.13.0-170-generic -append 
"BOOT_IMAGE=/boot/vmlinux-4.4.0-142-generic 
root=UUID=94fba90c-dbb0-4f8d-bc3e-acd5f2e54749 ro vt.handoff=7"


shiva@ubuntu:~$ uname -a
Linux ubuntu 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:44:25 UTC 
2019 ppc64le ppc64le ppc64le GNU/Linux
shiva@ubuntu:~$ cat /proc/cpuinfo
processor    : 0
cpu        : POWER8 (architected), altivec supported
clock        : 1000.000000MHz
revision    : 2.0 (pvr 004d 0200)

timebase    : 512000000
platform    : pSeries
model        : IBM pSeries (emulated by qemu)
machine        : CHRP IBM pSeries (emulated by qemu)


Hope that helps.


Thanks,

Shivaprasad



Re: [PATCH v2 00/11] hw/ppc/spapr: Remove deprecated pseries-3.0 -> pseries-4.2 machines
Posted by Michal Suchánek 2 weeks, 1 day ago
On Wed, Oct 29, 2025 at 11:00:18PM +0530, Shivaprasad G Bhat wrote:
> Hi Michal,
> 
> On 10/21/25 4:37 PM, Michal Suchánek wrote:
> > Hello,
> > 
> > I noticed removal of old pSeries revisions.
> > 
> > FTR to boot Linux 3.0 I need pSeries-2.7 (already removed earlier).
> > 
> > The thing that broke booting linux 3.0 for me is
> > 357d1e3bc7d2d80e5271bc4f3ac8537e30dc8046 spapr: Improved placement of
> > PCI host bridges in guest memory map
> > 
> > I do not use Linux 3.0 anymore which is the reason I did not notice this
> > breakage due to old platform revision removal.
> 
> I tried booting linux kernel 3.13.0-170-generic from ubuntu 14.04.6 LTS with
> the oldest supported machine pseries-5.0 as of now.
> 
> It worked fine.
> 
> 
> qemu-system-ppc64 -machine pseries-5.0 -accel tcg -nographic -m size=12G
> -cpu power8 -smp 1 -drive file=/root/images/ubuntu16.04.qcow2,format=qcow2,if=none,id=drive-virtio-disk0
> -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0 -serial
> mon:stdio -kernel /root/images/vmlinux-3.13.0-170-generic -initrd
> /root/images/initrd.img-3.13.0-170-generic -append
> "BOOT_IMAGE=/boot/vmlinux-4.4.0-142-generic
> root=UUID=94fba90c-dbb0-4f8d-bc3e-acd5f2e54749 ro vt.handoff=7"
> 
> 
> shiva@ubuntu:~$ uname -a
> Linux ubuntu 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:44:25 UTC 2019
> ppc64le ppc64le ppc64le GNU/Linux
> shiva@ubuntu:~$ cat /proc/cpuinfo
> processor    : 0
> cpu        : POWER8 (architected), altivec supported
> clock        : 1000.000000MHz
> revision    : 2.0 (pvr 004d 0200)
> 
> timebase    : 512000000
> platform    : pSeries
> model        : IBM pSeries (emulated by qemu)
> machine        : CHRP IBM pSeries (emulated by qemu)
> 
> 
> Hope that helps.

How does that help?

Of course newer kernels do work.

However, distributions using Linux 3.0 don't anymore, at least that
particular Linux 3.0 build.

I am not particularly concerned, only noting that the qemu pSeries
emulation is not suitable for running very old distributions because
they are not compatible with newer qemu.

It can be a bug in the old kernel but it's not triggered by actual
hardware nor older qemu. Or it may bee a bug with that new qemu PCI bus
organization that is not triggered by newer kernel. I don't know and
since nobody cared enough to diagnose it so far we will probably never
know.

Thanks

Michal
Re: [PATCH v2 00/11] hw/ppc/spapr: Remove deprecated pseries-3.0 -> pseries-4.2 machines
Posted by Harsh Prateek Bora 3 weeks, 1 day ago

On 10/21/25 14:13, Philippe Mathieu-Daudé wrote:
> v2: Rebased on https://lore.kernel.org/qemu-devel/20251009184057.19973-1-harshpb@linux.ibm.com/
> 
> Remove the deprecated pseries-3.0 up to pseries-4.2 machines,
> which are older than 6 years. Remove resulting dead code.
> 
> Harsh Prateek Bora (5):
>    ppc/spapr: remove deprecated machine pseries-3.0
>    ppc/spapr: remove deprecated machine pseries-3.1
>    ppc/spapr: remove deprecated machine pseries-4.0
>    ppc/spapr: remove deprecated machine pseries-4.1
>    ppc/spapr: remove deprecated machine pseries-4.2
> 
> Philippe Mathieu-Daudé (6):
>    hw/ppc/spapr: Remove SpaprMachineClass::nr_xirqs field
>    hw/ppc/spapr: Inline spapr_dtb_needed()
>    hw/ppc/spapr: Inline few SPAPR_IRQ_* uses
>    target/ppc/kvm: Remove kvmppc_get_host_serial() as unused
>    target/ppc/kvm: Remove kvmppc_get_host_model() as unused
>    hw/ppc/spapr: Remove SpaprMachineClass::phb_placement callback

Queued and posted PR.
Additional cleanup suggestions on patch 2 can be taken up as a 
follow-up. Thanks.

regards,
Harsh