All, back in 2016 Andrew added code to x86'es variant to avoid interleaving of output. The same issue ought to exist on Arm. The lock acquired, or more importantly the turning off of IRQs while doing so, is now getting in the way of having PVH Dom0's state dumped the 2nd time. For register state I did find a sufficiently simple (yet not pretty) workaround. For the stack, where I can't reasonably avoid using p2m functions, this is going to be more difficult.
Since I expect Arm to want to also have interleave protection at some point, and since Arm also acquires the p2m lock while accessing Dom0's stacks, I wonder whether anyone has any clever idea on how to avoid the (valid) triggering of check_lock()'s assertion without intrusive changes. (As to intrusive changes - acquiring the p2m lock up front in recursive mode, plus silencing check_lock() for nested acquires of a lock that's already being held by a CPU was my initial idea.) Thanks, Jan
