Re: [Kernel 6.12.17] [PowerPC e5500] KVM HV compilation error
From: Paolo Bonzini
Date: Wed Mar 05 2025 - 09:58:58 EST
On Wed, Mar 5, 2025 at 3:19 PM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Mar 05, 2025 at 03:14:13PM +0100, Christian Zigotzky wrote:
> > Hi All,
> >
> > The stable long-term kernel 6.12.17 cannot compile with KVM HV support for e5500 PowerPC machines anymore.
> >
> > Bug report: https://github.com/chzigotzky/kernels/issues/6
> >
> > Kernel config: https://github.com/chzigotzky/kernels/blob/6_12/configs/x5000_defconfig
> >
> > Error messages:
> >
> > arch/powerpc/kvm/e500_mmu_host.c: In function 'kvmppc_e500_shadow_map':
> > arch/powerpc/kvm/e500_mmu_host.c:447:9: error: implicit declaration of function '__kvm_faultin_pfn' [-Werror=implicit-function-declaration]
> > pfn = __kvm_faultin_pfn(slot, gfn, FOLL_WRITE, NULL, &page);
> > ^~~~~~~~~~~~~~~~~
> > CC kernel/notifier.o
> > arch/powerpc/kvm/e500_mmu_host.c:500:2: error: implicit declaration of function 'kvm_release_faultin_page'; did you mean 'kvm_read_guest_page'? [-Werror=implicit-function-declaration]
> > kvm_release_faultin_page(kvm, page, !!ret, writable);
> >
> > After that, I compiled it without KVM HV support.
> >
> > Kernel config: https://github.com/chzigotzky/kernels/blob/6_12/configs/e5500_defconfig
> >
> > Please check the error messages.
>
> Odd, what commit caused this problem?
48fe216d7db6b651972c1c1d8e3180cd699971b0
> Any hint as to what commit is missing to fix it?
A big-ass 90 patch series. __kvm_faultin_pfn and
kvm_release_faultin_page were introduced in 6.13, as part of a big
revamp of how KVM does page faults on all architectures.
Just revert all this crap and apply the version that I've just sent
(https://lore.kernel.org/stable/20250305144938.212918-1-pbonzini@xxxxxxxxxx/):
commit 48fe216d7db6b651972c1c1d8e3180cd699971b0
KVM: e500: always restore irqs
commit 833f69be62ac366b5c23b4a6434389e470dd5c7f
KVM: PPC: e500: Use __kvm_faultin_pfn() to handle page faults
Message-ID: <20241010182427.1434605-55-seanjc@xxxxxxxxxx>
Stable-dep-of: 87ecfdbc699c ("KVM: e500: always restore irqs")
commit f2623aec7fdc2675667042c85f87502c9139c098
KVM: PPC: e500: Mark "struct page" pfn accessed before dropping mmu_lock
Message-ID: <20241010182427.1434605-54-seanjc@xxxxxxxxxx>
Stable-dep-of: 87ecfdbc699c ("KVM: e500: always restore irqs")
commit dec857329fb9a66a5bce4f9db14c97ef64725a32
KVM: PPC: e500: Mark "struct page" dirty in kvmppc_e500_shadow_map()
Message-ID: <20241010182427.1434605-53-seanjc@xxxxxxxxxx>
Stable-dep-of: 87ecfdbc699c ("KVM: e500: always restore irqs")
And this, ladies and gentlemen, is why I always include the apparently
silly Message-ID trailer. Don't you just love how someone, whether
script or human, cherry picked patches 53-55 without even wondering
what was in the 52 before. I'm not sure if it'd be worse for it to be
a human or a script... because if it's a script, surely the same level
of sophistication could have been put into figuring out whether the
thing even COMPILES.
Sasha, this wins the prize for most ridiculous automatic backport
ever. Please stop playing maintainer if you can't be bothered to read
the commit messages for random stuff that you apply.
Paolo