On 13.09.2022 16:50, Roger Pau Monné wrote: > On Mon, Dec 13, 2021 at 04:12:55PM +0100, Jan Beulich wrote: >> show_hvm_stack() requires interrupts to be enabled to avoids triggering >> the consistency check in check_lock() for the p2m lock. To do so in >> spurious_interrupt() requires adding reentrancy protection / handling >> there. > > There's also an ASSERT(!in_irq()) in _percpu_write_lock() that will > trigger when trying to acquire the p2m lock from spurious_interrupt() > context, as p2m_lock() -> mm_write_lock() -> _mm_write_lock -> > percpu_write_lock().
s/will/may/ since spurious_interrupt() doesn't itself use irq_enter(), but yes - we could nest inside a lower priority interrupt. I'll make local_irq_enable() depend on !in_irq(). Jan