KVM: PPC: Book3E: KVM HV host module doesn't work anymore
Paolo Bonzini
pbonzini at redhat.com
Tue Dec 24 02:37:38 AEDT 2024
On Mon, Dec 23, 2024 at 3:41 PM Christian Zigotzky <chzigotzky at xenosoft.de> wrote:
> Bisecting: a merge base must be tested
> [e9001a382fa2c256229adc68d55212028b01d515] Merge tag
> 'kvmarm-fixes-6.12-3' of
> git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
>
> The host system doesn't boot.
> Unfortunately, there isn't a guest kernel boot log via serial log.
No big deal since the boot hang was fixed via rebase.
> git checkout -b bisection-rebase
> b467ab82a9fde4b46c0cd2c299220857afb0e0d4
> git rebase v6.12
>
> The host kernel boots but the guest kernel doesn't boot so KVM HV
> doesn't work.
As expected, so that's good.
> git bisect start
> git bisect bad bisection-rebase
> git bisect good v6.12
>
> [skipping bisection process]
>
> `edebc0a1b7ab5ff19b4f5cd011c93196fc34b3e4 is the first bad commit
Ok, that means that the culprit is commit 419cfb983ca93 (the above
is the rebased hash). Thank you very much, your work was really
helpful!
Can you test this simple patch?
--------------- 8< ----------------
From: Paolo Bonzini <pbonzini at redhat.com>
Subject: [PATCH] KVM: allow NULL writable argument to __kvm_faultin_pfn
kvm_follow_pfn() is able to work with NULL in the .map_writable field
of the homonymous struct. But __kvm_faultin_pfn() rejects the combo
despite KVM for e500 trying to use it. Indeed .map_writable is not
particularly useful if the flags include FOLL_WRITE and readonly
guest memory is not supported, so add support to __kvm_faultin_pfn()
for this case.
Fixes: 1c7b627e9306 ("KVM: Add kvm_faultin_pfn() to specifically service guest page faults")
Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index de2c11dae231..5177e56fdbd5 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2975,10 +2975,11 @@ kvm_pfn_t __kvm_faultin_pfn(const struct kvm_memory_slot *slot, gfn_t gfn,
.refcounted_page = refcounted_page,
};
- if (WARN_ON_ONCE(!writable || !refcounted_page))
+ if (WARN_ON_ONCE(!refcounted_page))
return KVM_PFN_ERR_FAULT;
- *writable = false;
+ if (writable)
+ *writable = false;
*refcounted_page = NULL;
return kvm_follow_pfn(&kfp);
Thanks,
Paolo
> commit edebc0a1b7ab5ff19b4f5cd011c93196fc34b3e4
> Author: Sean Christopherson seanjc at google.com
> Date: Thu Oct 10 11:23:56 2024 -0700
>
> KVM: PPC: e500: Use __kvm_faultin_pfn() to handle page faults
>
> Convert PPC e500 to use __kvm_faultin_pfn()+kvm_release_faultin_page(),
> and continue the inexorable march towards the demise of
> kvm_pfn_to_refcounted_page().
>
> Signed-off-by: Sean Christopherson <seanjc at google.com>
> Tested-by: Dmitry Osipenko <dmitry.osipenko at collabora.com>
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
> Message-ID: <20241010182427.1434605-55-seanjc at google.com>
>
> arch/powerpc/kvm/e500_mmu_host.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)`
>
> Cheers,
> Christian
>
> --
> Sent with BrassMonkey 33.4.0 (https://github.com/wicknix/brass-monkey/releases/tag/33.4.0)
>
More information about the Linuxppc-dev
mailing list