From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Venkat Rao Bagalkote <venkat88@linux.ibm.com>,
linux-kernel@vger.kernel.org, chleroy@kernel.org,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
David Hildenbrand <david@kernel.org>,
linux-mm@kvack.org, kvm@vger.kernel.org
Subject: Re: [PATCH 1/2] KVM: PPC: BOOK4S HV: Fix memslot rollback in H_SVM_INIT_START
Date: Tue, 1 Dec 2026 14:35:17 +0000 [thread overview]
Message-ID: <aw7bEDUZw7gdRUbc@gremlin> (raw)
In-Reply-To: <7510ddb55a34e8a669eb7c2624d652264701bfba.1794537345.git.ritesh.list@gmail.com>
On Fri, Nov 13, 2026 at 08:21:13AM +0530, Ritesh Harjani (IBM) wrote:
> If registering a memslot with the ultravisor fails,
> kvmppc_h_svm_init_start() is supposed to undo the memslots it has
> already registered. The loop walks them with "m", however it wrongly
> passes "memslot" instead (which failed to get registered).
>
> Fix the loop by passing "m" instead, the memslot which was registered
> successfully, for rollback from the beginning.
>
> Fixes: 2027a24a75ce ("KVM: PPC: Book3S HV: Disable page merging in H_SVM_INIT_START")
> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
You need some PPC guys to take a look but FWIW looks OK to me so:
Acked-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> arch/powerpc/kvm/book3s_hv_uvmem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kvm/book3s_hv_uvmem.c b/arch/powerpc/kvm/book3s_hv_uvmem.c
> index 463aef870c4e..190f64d992d8 100644
> --- a/arch/powerpc/kvm/book3s_hv_uvmem.c
> +++ b/arch/powerpc/kvm/book3s_hv_uvmem.c
> @@ -497,7 +497,7 @@ unsigned long kvmppc_h_svm_init_start(struct kvm *kvm)
> kvm_for_each_memslot(m, bkt, slots) {
> if (m == memslot)
> break;
> - __kvmppc_uvmem_memslot_delete(kvm, memslot);
> + __kvmppc_uvmem_memslot_delete(kvm, m);
> }
> }
>
> --
> 2.39.5
>
--
Cheers, Lorenzo
prev parent reply other threads:[~2026-12-01 14:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 2:51 [PATCH 1/2] KVM: PPC: BOOK4S HV: Fix memslot rollback in H_SVM_INIT_START Ritesh Harjani (IBM)
2026-11-13 2:51 ` [PATCH 2/2] KVM: PPC: BOOK3S HV: Use ksm_disable() for secure guests Ritesh Harjani (IBM)
2026-12-01 14:37 ` Lorenzo Stoakes (ARM)
2026-12-01 14:35 ` Lorenzo Stoakes (ARM) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aw7bEDUZw7gdRUbc@gremlin \
--to=ljs@kernel.org \
--cc=chleroy@kernel.org \
--cc=david@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=sshegde@linux.ibm.com \
--cc=venkat88@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.