Re: [PATCH v3] KVM: arm64: nv: Keep the shadow S2 MMUs at fixed addresses
Marc Zyngier <[email protected]> Fri, 07 Aug 2026 16:43:47 +0100
| Newsgroups | dev.linux.lists.kvmarm,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 07 Aug 2026 02:13:17 +0100, Karl Mehltretter <[email protected]> wrote: > > On Thu, Aug 06, 2026 at 10:54:03PM +0100, Wei-Lin Chang wrote: > > > > Hey sorry for nitpicking once more, I actually like v2 more, as this > > version splits the error handling to two places. Marc's implementation > > [1] is also good, but that requires a twist in kvm_arch_flush_shadow_all(). > > So I'd personally go with v2 (+my suggestions for it :)), but also fine if > > others have other opinions. > > > > I also think the comment in kvm_vcpu_init_nested() is worth adjusting > > slightly, too. > > > > No worries, thanks for taking another look. > > I was following the guidance in include/linux/cleanup.h: > > the expectation is that usage of "goto" and cleanup helpers is never > mixed in the same function. > > But maybe keeping goto is better. I'll wait a bit for others > to comment. The version I proposed in response to your first version had no goto, and trivial error handling. Can we *please* stop the bike shedding and settle on the simplest possible fix? Or *any* fix at all? > > For the comment, I propose replacing the current text with: > > /* > * If allocating an MMU object fails, keep the VNCR page alive so > * that userspace can retry vCPU initialisation without affecting > * the VM. > */ > > Is that the adjustment you had in mind? I don't think we need to change any comment. If anything, it should be deleted altogether. This is a security fix, not a literary exercise. M. -- Jazz isn't dead. It just smells funny.