From: sashiko-bot@kernel.org
To: "Bibo Mao" <maobibo@loongson.cn>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v2] LoongArch: KVM: Add hypercall crash support
Date: Fri, 16 Oct 2026 03:57:28 +0000 [thread overview]
Message-ID: <sashiko-outbox-173719@kernel.org> (raw)
In-Reply-To: <20261016034245.3002859-1-maobibo@loongson.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] kvm: new guest-visible KVM_FEATURE_CRASH capability is silently enabled by default
--
commit 6d0e897e0c46a79eb02651baa4b7271884b07abb
Author: Bibo Mao <maobibo@loongson.cn>
LoongArch: KVM: Add hypercall crash support
This commit adds hypercall crash support (KVM_HCALL_CRASH) to LoongArch KVM
to provide a more direct, low-level crash notification method. It allows the
VMM to capture CPU crash context during exception entry even if the CPU
hardware context or kernel stack is corrupted.
> diff --git a/arch/loongarch/kvm/vm.c b/arch/loongarch/kvm/vm.c
> index 6dabb227a7321..9bf4b3bb8f25a 100644
> --- a/arch/loongarch/kvm/vm.c
> +++ b/arch/loongarch/kvm/vm.c
[ ... ]
> @@ -49,8 +49,9 @@ static void kvm_vm_init_features(struct kvm *kvm)
> kvm->arch.kvm_features |= BIT(KVM_LOONGARCH_VM_FEAT_PMU);
>
> /* Enable all PV features by default */
> - kvm->arch.pv_features |= BIT(KVM_FEATURE_IPI);
> + kvm->arch.pv_features |= BIT(KVM_FEATURE_IPI) | BIT(KVM_FEATURE_CRASH);
> kvm->arch.kvm_features |= BIT(KVM_LOONGARCH_VM_FEAT_PV_IPI);
> + kvm->arch.kvm_features |= BIT(KVM_LOONGARCH_VM_FEAT_CRASH);
[Severity: High]
Does unconditionally setting BIT(KVM_FEATURE_CRASH) and
BIT(KVM_LOONGARCH_VM_FEAT_CRASH) here break live migration and backward
compatibility?
If a VM is migrated to a newer kernel with this patch, an older VMM unaware
of the capability will not explicitly disable it. If the guest discovers
and triggers the new KVM_HCALL_CRASH hypercall, the older VMM will receive
an unexpected KVM_EXIT_SYSTEM_EVENT and will likely terminate the VM.
Should new guest-visible capabilities be left off by default and require
explicit VMM opt-in through capability negotiation?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261016034245.3002859-1-maobibo@loongson.cn?part=1
next prev parent reply other threads:[~2026-10-16 3:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 3:42 [PATCH v2] LoongArch: KVM: Add hypercall crash support Bibo Mao
2026-10-16 3:57 ` sashiko-bot [this message]
2026-10-16 4:15 ` Bibo Mao
2026-10-16 4:32 ` Huacai Chen
2026-10-16 6:24 ` Bibo Mao
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=sashiko-outbox-173719@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=maobibo@loongson.cn \
--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.