[PATCH v6 0/7] KVM: arm64: nv: Implement nested stage-2 reverse map

Wei-Lin Chang weilin.chang at arm.com
Wed Sep 16 03:08:28 PDT 2026


On Wed, Sep 16, 2026 at 08:04:53AM +0100, Marc Zyngier wrote:
> On Wed, 16 Sep 2026 05:58:03 +0100,
> Itaru Kitayama <itaru.kitayama at fujitsu.com> wrote:
> > 
> > Hi Wei-Lin,
> > 
> > On Tue, Sep 15, 2026 at 04:42:58PM +0100, Wei-Lin Chang wrote:
> > > Hi,
> > > 
> > > This is v6 of optimizing the shadow s2 mmu unmapping during MMU
> > > notifiers.
> > > 
> > > This version fixes a few issues, and adds Marc's space optimization
> > > for kvm_guest_s2_mapping [1]. Please see the changelog for the details.
> > > 
> > > Tested by booting L3, and running in-kernel targetted tests described
> > > in [2]. v5 got some tested-by's from Itaru and Wang (thanks), I didn't
> > > carry them over since some bugs fixed in v6 are non-obvious. Some
> > > retest would be much appreciated!
> > > 
> > > Series based on v7.3-rc3 + Marc's nested mmu lifecycle fixes [3].
> > 
> > Observed on QEMU (accel tcg) only, but I saw:
> > 
> > [ 1812.052752] BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1630
> > [ 1812.052896] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 596, name: shadow_stage2
> > 
> > The kernel is built on top of Marc's fix and your version six series, but
> > the fix for debugfs will be posted later?
> > 
> > Your hello_nested and shadow_stage2 ran without an issue.
> > 
> > Tested-by: Itaru Kitayama <itaru.kitayama at fujitsu.com>
> 
> So you have established that there is a critical locking bug, make
> sure you don't communicate any information to help narrow where that
> bug is, and yet give your Tested-by: tag?
> 
> What is the point? I'm baffled.
> 
> Can you at least provide an indication of what you did to get there as
> well as the full backtrace?

It is certainly the known shadow ptdump sleeping-in-atomic problem [1]
reported by Itaru, and not a problem of the reverse map series.

I have the fix for that, will send it shortly.

Thanks,
Wei-Lin Chang

[1]: https://lore.kernel.org/kvmarm/aiuF0KSvvv-ZozI1@sm-arm-grace07/

> 
> 	M.
> 
> -- 
> Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list