Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v6 1/5] KVM: PPC: selftests: add support for powerpc
Date: Mon, 05 Oct 2026 04:01:26 +0000	[thread overview]
Message-ID: <20261005040126.820CE1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <45909dd7ddefdfa688271322561b64109af1d116.1791014923.git.ritesh.list@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] selftests: build failure due to undeclared memory allocation functions
--

commit 504c1ed58b27eced07a127f9dbb77eee82c18970
Author: Nicholas Piggin <npiggin@gmail.com>
Subject: KVM: PPC: selftests: add support for powerpc

This commit implements KVM selftests support for powerpc (Book3S-64).
However, it introduces build failures because of calls to undeclared
memory allocation functions.

Link: https://lore.kernel.org/linuxppc-dev/cover.1781093720.git.ritesh.list@gmail.com/

> diff --git a/tools/testing/selftests/kvm/lib/powerpc/processor.c b/tools/testing/selftests/kvm/lib/powerpc/processor.c
> new file mode 100644
> index 0000000000000..301455024571e
> --- /dev/null
> +++ b/tools/testing/selftests/kvm/lib/powerpc/processor.c
> @@ -0,0 +1,512 @@
> [ ... ]
> +void virt_arch_pgd_alloc(struct kvm_vm *vm)
> +{
> [ ... ]
> +	pgd_pages = (1UL << (RADIX_PGD_INDEX_SIZE + 3)) >> vm->page_shift;
> +	if (!pgd_pages)
> +		pgd_pages = 1;
> +	pgtb = vm_alloc_page_table_pages(vm, pgd_pages);

[Severity: Low]
Is the definition of vm_alloc_page_table_pages missing? This causes
the module to fail compiling and linking because the function is
undefined.

> +	vm->mmu.pgd = pgtb;
> [ ... ]
> +static gpa_t __vm_alloc_pt(struct kvm_vm *vm, u64 pt_shift)
> +{
> +	gpa_t pt;
> +
> +	if (pt_shift >= vm->page_shift) {
> +		size_t pt_pages = 1ULL << (pt_shift - vm->page_shift);
> +
> +		pt = vm_alloc_page_table_pages(vm, pt_pages);

[Severity: Low]
Does this code also rely on the undefined vm_alloc_page_table_pages
function?

> +	} else {
> [ ... ]
> +void kvm_arch_vm_post_create(struct kvm_vm *vm, unsigned int nr_vcpus)
> +{
> +	size_t excp_size = __interrupts_end - __interrupts_start;
> +	size_t excp_pages = (excp_size + vm->page_size - 1) / vm->page_size;
> +	gpa_t excp_paddr;
> +	void *mem;
> +
> +	/*
> +	 * Guest interrupts are taken in real-mode, i.e. the vectors must live
> +	 * at gPA 0.  Use the innermost allocator to override the minimum GPA
> +	 * that MEM_REGION_DATA would otherwise impose.
> +	 */
> +	excp_paddr = ____vm_phy_pages_alloc(vm, excp_pages, 0,
> +					    vm->memslots[MEM_REGION_DATA],
> +					    vm_arch_has_protected_memory(vm),
> +					    false);

[Severity: Low]
Could this call to an undeclared function ____vm_phy_pages_alloc be a
mistake? This call passes 6 arguments, which differs from the standard
5 arguments.

> +
> +	TEST_ASSERT(excp_paddr == 0,

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1791014923.git.ritesh.list@gmail.com?part=1

  reply	other threads:[~2026-10-05  4:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05  3:47 [PATCH v6 0/5] KVM: selftests: add powerpc support Ritesh Harjani (IBM)
2026-10-05  3:47 ` [PATCH v6 1/5] KVM: PPC: selftests: add support for powerpc Ritesh Harjani (IBM)
2026-10-05  4:01   ` sashiko-bot [this message]
2026-10-05  3:47 ` [PATCH v6 2/5] KVM: selftests: Move memslot_perf_test off the 256M ELF load address Ritesh Harjani (IBM)
2026-10-05  3:47 ` [PATCH v6 3/5] KVM: PPC: selftests: Add helper for checking if running nested Ritesh Harjani (IBM)
2026-10-05  3:47 ` [PATCH v6 4/5] KVM: PPC: selftests: Skip idle-page check when running nested on pseries LPAR Ritesh Harjani (IBM)
2026-10-05  3:47 ` [PATCH v6 5/5] KVM: selftests: Don't limit LE dirty-bitmap bitops to s390x Ritesh Harjani (IBM)

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=20261005040126.820CE1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=ritesh.list@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox