From: sashiko-bot@kernel.org
To: "Amit Machhiwal" <amachhiw@linux.ibm.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v9 1/4] KVM: PPC: Introduce KVM_CAP_PPC_COMPAT_CAPS and wire up ioctl
Date: Sat, 08 Aug 2026 16:23:07 +0000 [thread overview]
Message-ID: <20260808162308.59A4F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260808161148.66673-2-amachhiw@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Premature advertisement of KVM_CAP_PPC_COMPAT_CAPS causes bisectability breakages.
--
--- Patch [1]: [PATCH v9 1/4] KVM: PPC: Introduce KVM_CAP_PPC_COMPAT_CAPS and wire up ioctl ---
commit 92bc8045e2354b233ee21f84717a2a67b2fadcac
Author: Amit Machhiwal <amachhiw@linux.ibm.com>
KVM: PPC: Introduce KVM_CAP_PPC_COMPAT_CAPS and wire up ioctl
This commit introduces a new capability, KVM_CAP_PPC_COMPAT_CAPS, and an
associated ioctl, KVM_PPC_GET_COMPAT_CAPS. It aims to allow userspace to
discover host processor compatibility modes for nested KVM guests.
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 00302399fc37b..2fe4ea0ca4ff1 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
[ ... ]
> @@ -697,6 +697,13 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
> }
> }
> break;
> +#if defined(CONFIG_KVM_BOOK3S_HV_POSSIBLE)
> + case KVM_CAP_PPC_COMPAT_CAPS:
> + r = 0;
> + if (hv_enabled && kvmhv_on_pseries())
> + r = 1;
> + break;
> +#endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */
[Severity: High]
Will advertising this capability here break bisectability?
If userspace probes for KVM_CAP_PPC_COMPAT_CAPS, it will be reported as
supported on pSeries. However, since the backend for get_compat_caps isn't
implemented in this commit, the newly added KVM_PPC_GET_COMPAT_CAPS ioctl
will always fail:
[ ... ]
> + /* Reserved fields must be zero */
> + r = -EINVAL;
> + if (host_caps.flags)
> + goto out;
> +
> + r = -ENOTTY;
> + if (!kvm->arch.kvm_ops->get_compat_caps)
> + goto out;
Could this unexpected -ENOTTY failure cause VM initialization in userspace
tools like QEMU to abort when checking this capability during a bisect?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260808161148.66673-1-amachhiw@linux.ibm.com?part=1
next prev parent reply other threads:[~2026-08-08 16:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-08 16:11 [PATCH v9 0/4] KVM: PPC: Expose CPU compatibility modes for nested guests Amit Machhiwal
2026-08-08 16:11 ` [PATCH v9 1/4] KVM: PPC: Introduce KVM_CAP_PPC_COMPAT_CAPS and wire up ioctl Amit Machhiwal
2026-08-08 16:23 ` sashiko-bot [this message]
2026-08-08 16:11 ` [PATCH v9 2/4] KVM: PPC: Book3S HV: Implement compat CPU capability retrieval for KVM on PowerVM Amit Machhiwal
2026-08-08 16:39 ` sashiko-bot
2026-08-08 16:11 ` [PATCH v9 3/4] KVM: PPC: Book3S HV: Add support for compat CPU capabilities for KVM on PowerNV Amit Machhiwal
2026-08-08 16:11 ` [PATCH v9 4/4] KVM: PPC: Document KVM_PPC_GET_COMPAT_CAPS ioctl Amit Machhiwal
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=20260808162308.59A4F1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amachhiw@linux.ibm.com \
--cc=kvm@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox