[PATCH v2 4/5] powerpc: kvm: drop 32-bit book3s

A. Wilcox AWilcox at Wilcox-Tech.com
Sat Dec 21 18:13:12 PST 2024


On Dec 21, 2024, at 3:42 PM, Arnd Bergmann <arnd at kernel.org> wrote:
> 
> From: Arnd Bergmann <arnd at arndb.de>
> 
> Support for KVM on 32-bit Book III-s implementations was added in 2010
> and supports PowerMac, CHRP, and embedded platforms using the Freescale G4
> (mpc74xx), e300 (mpc83xx) and e600 (mpc86xx) CPUs from 2003 to 2009.
> 
> Earlier 603/604/750 machines might work but would be even more limited
> by their available memory.
> 
> The only likely users of KVM on any of these were the final Apple
> PowerMac/PowerBook/iBook G4 models with 2GB of RAM that were at the high
> end 20 years ago but are just as obsolete as their x86-32 counterparts.
> The code has been orphaned since 2023.
> 
> There is still a need to support 32-bit guests in order to better
> debug problems on ppc32 kernels. This should work in theory on both
> 64-bit booke and on 64-bit book3s hosts, but it would be good to
> confirm that this is still the case before the known working option
> gets removed.


I can confirm that running 6.12.5 on a P9 host, trying to boot a 6.6
32-bit kernel gave me:

Detected RAM kernel at 400000 (1330c8c bytes) 
       Welcome to Open Firmware

  Copyright (c) 2004, 2017 IBM Corporation All rights reserved.
  This program and the accompanying materials are made available
  under the terms of the BSD License available at
  http://www.opensource.org/licenses/bsd-license.php

Booting from memory...
 
( 380 ) Data Segment Exception [ -bfc00000 ]


    R0 .. R7           R8 .. R15         R16 .. R23         R24 .. R31
00000000014a1124   0000000000000000   000000000135b4ac   0000000000000000   
000000000dc70f30   ffffffffc0000000   000000000dc70fa4   000000000173600c   
0000000000000000   000000000e477010   0000000000000000   0000000000400000   
ffffffff0141be4c   000000000149ab74   00000000ffffffff   0000000000000008   
00000000c0014b6c   0000000020000402   0000000040400000   00000000016f2000   
ffffffff40400000   0000000000000000   0000000000000000   000000000dc70f60   
0000000000000000   0000000000000000   000000000e73d490   000000000149f000   
0000000000000000   000000000e756118   000000000dc70fa0   ffffffff40400000   

    CR / XER           LR / CTR          SRR0 / SRR1        DAR / DSISR
        80000402   00000000014a1124   00000000014a1128   ffffffff0141be4c   
0000000020040000   0000000000000000   8000000000003000           00000000   


2 > 

Which is the same thing that happens if you boot a 32-bit Linux kernel
on a physical 64-bit Power machine.  This is probably because KVM is
so much more accurate than TCG for Power emulation :)

That said, I would like to keep the support alive for more than just
ppc32 kernel testing.  There are plenty of Power Macs with enough
memory to run some environments within KVM.  Adélie’s new release
boots a full XFCE desktop in under 300 MB RAM, so even a 1 GB machine
has enough memory to run AmigaOS, Mac OS 9, or another XFCE in KVM.

I have found a few bugs in testing newer kernels, and one of them
affects all targets lower than Power7, which means 32-bit and 64-bit BE.
I am preparing to send those patches in.  I will continue shaking out
any remaining bugs on my 32-bit host.  I hope that these patches can
be useful, and possibly stimulate more interest so 32-bit support can
be maintained again.

In fairness, I do agree that there is very little value in keeping 32-bit
MIPS or RISC-V support since the chips that support it are so limited.
32-bit Power however serves actual purposes.  32-bit x86 could be useful
to make sure “KVM on 32-bit in general” is easier to keep going,
but if it is causing maintenance issues then I suppose it can go.

Sincerely,
-Anna


More information about the kvm-riscv mailing list