Re: [PATCH v2 3/5] powerpc: kvm: drop 32-bit booke

Crystal Wood
2025-01-07T00:53:15Z

On Sat, 2024-12-21 at 22:42 +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> KVM on PowerPC BookE was introduced in 2008 and supported IBM 44x,
> Freescale e500v2 (32-bit mpc85xx, QuorIQ P1/P2), e500mc (32bit QorIQ
> P2/P3/P4), e5500 (64-bit QorIQ P5/T1) and e6500 (64-bit QorIQ T2/T4).
>
> Support for 44x was dropped in 2014 as it was seeing very little use,
> but e500v2 and e500mc are still supported as most of the code is shared
> with the 64-bit e5500/e6500 implementation.
>
> The last of those 32-bit chips were introduced in 2010 but not widely
> adopted when the following 64-bit PowerPC and Arm variants ended up
> being more successful.
>
> The 64-bit e5500/e6500 are still known to be used with KVM, but I could
> not find any evidence of continued use of the 32-bit ones, so drop
> discontinue those in order to simplify the implementation.
> The changes are purely mechanical, dropping all #ifdef checks for
> CONFIG_64BIT, CONFIG_KVM_E500V2, CONFIG_KVM_E500MC, CONFIG_KVM_BOOKE_HV,
> CONFIG_PPC_85xx, CONFIG_PPC_FPU, CONFIG_SPE and CONFIG_SPE_POSSIBLE,
> which are all known on e5500/e6500.
>
> Support for 64-bit hosts remains unchanged, for both 32-bit and
> 64-bit guests.
>
> Link: https://lore.kernel.org/lkml/Z1B1phcpbiYWLgCD@google.com/
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/powerpc/include/asm/kvm_book3s_32.h | 36 --
> arch/powerpc/include/asm/kvm_booke.h | 4 -
> arch/powerpc/include/asm/kvm_booke_hv_asm.h | 2 -
> arch/powerpc/kernel/head_85xx.S | 14 -
> arch/powerpc/kernel/head_booke.h | 39 --
> arch/powerpc/kvm/Kconfig | 22 +-
> arch/powerpc/kvm/Makefile | 15 -
> arch/powerpc/kvm/book3s_32_mmu_host.c | 396 --------------

Why are book3s files removed by this patch?

> @@ -228,23 +176,16 @@ static inline void kvmppc_save_guest_altivec(struct kvm_vcpu *vcpu)
> static void kvmppc_vcpu_sync_debug(struct kvm_vcpu *vcpu)
> {
> /* Synchronize guest's desire to get debug interrupts into shadow MSR */
> -#ifndef CONFIG_KVM_BOOKE_HV
> vcpu->arch.shadow_msr &= ~MSR_DE;
> vcpu->arch.shadow_msr |= vcpu->arch.shared->msr & MSR_DE;
> -#endif

This is an ifndef... the contents should be removed.

-Crystal