From: sashiko-bot@kernel.org
To: "Karl Mehltretter" <kmehltretter@gmail.com>
Cc: "Oliver Upton" <oupton@kernel.org>,
"Marc Zyngier" <maz@kernel.org>,
kvm@vger.kernel.org, kvmarm@lists.linux.dev
Subject: Re: [PATCH v2 4/5] KVM: arm64: selftests: Pass guest code to vm_gic_create_with_vcpus()
Date: Wed, 19 Aug 2026 22:50:13 +0000 [thread overview]
Message-ID: <20260819225014.029011F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260819224229.82948-5-kmehltretter@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The `guest_fn` parameter restricts the guest entry point type to `void (*)(void)`, deviating from the selftests standard `void *`.
--
--- Patch [4]: [PATCH v2 4/5] KVM: arm64: selftests: Pass guest code to vm_gic_create_with_vcpus() ---
commit 6c09a6b348b8fbe5cd4e0cef1198db5d49812401
Author: Karl Mehltretter <kmehltretter@gmail.com>
KVM: arm64: selftests: Pass guest code to vm_gic_create_with_vcpus()
This commit adds a guest entry point parameter to vm_gic_create_with_vcpus()
and updates the existing call sites to pass guest_code. This allows tests
with different guest code to reuse the common VM and VGIC initialization
sequence.
> diff --git a/tools/testing/selftests/kvm/arm64/vgic_init.c b/tools/testing/selftests/kvm/arm64/vgic_init.c
> index 47e34b43afb29..91484fd4f7869 100644
> --- a/tools/testing/selftests/kvm/arm64/vgic_init.c
> +++ b/tools/testing/selftests/kvm/arm64/vgic_init.c
> @@ -73,12 +73,13 @@ static int run_vcpu(struct kvm_vcpu *vcpu)
>
> static struct vm_gic vm_gic_create_with_vcpus(u32 gic_dev_type,
> u32 nr_vcpus,
> + void (*guest_fn)(void),
[Severity: Low]
Does this unnecessarily restrict the guest entry point type?
The underlying kvm selftests API, such as vm_create_with_vcpus(), typically
uses a generic void pointer for the guest code. If a future test tries to
reuse this setup function and pass a parameterized guest code function, the
compiler might emit an incompatible pointer type warning.
Would it be better to change the type of guest_fn to void * to maintain API
consistency with the rest of the selftests framework?
> struct kvm_vcpu *vcpus[])
> {
> struct vm_gic v;
>
> v.gic_dev_type = gic_dev_type;
> - v.vm = vm_create_with_vcpus(nr_vcpus, guest_code, vcpus);
> + v.vm = vm_create_with_vcpus(nr_vcpus, guest_fn, vcpus);
> v.gic_fd = kvm_create_device(v.vm, gic_dev_type);
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260819224229.82948-1-kmehltretter@gmail.com?part=4
next prev parent reply other threads:[~2026-08-19 22:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 22:42 [PATCH v2 0/5] KVM: arm64: fix VGICv3 redistributor rollback Karl Mehltretter
2026-08-19 22:42 ` [PATCH v2 1/5] KVM: arm64: vgic-v3: Undo assignment on iodev registration failure Karl Mehltretter
2026-08-19 22:54 ` sashiko-bot
2026-08-19 22:42 ` [PATCH v2 2/5] KVM: arm64: vgic-v3: Reset assignments after failed region setup Karl Mehltretter
2026-08-19 22:58 ` sashiko-bot
2026-08-19 22:42 ` [PATCH v2 3/5] KVM: arm64: vgic-v3: Unregister redistributors before freeing regions Karl Mehltretter
2026-08-20 8:58 ` Marc Zyngier
2026-08-19 22:42 ` [PATCH v2 4/5] KVM: arm64: selftests: Pass guest code to vm_gic_create_with_vcpus() Karl Mehltretter
2026-08-19 22:50 ` sashiko-bot [this message]
2026-08-19 22:42 ` [PATCH v2 5/5] KVM: arm64: selftests: Test VGICv3 redistributor region retry Karl Mehltretter
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=20260819225014.029011F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kmehltretter@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--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 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.