On 19.04.2022 17:01, David Vrabel wrote: > From: David Vrabel <[email protected]> > > Heap pages can only be safely allocated and freed with interuupts > enabled as they may require a TLB flush which will send IPIs. > > Enhance the assertions in alloc_xenheap_pages() and > alloc_domheap_pages() to check interrupts are enabled. For consistency > the same asserts are used when freeing heap pages. > > As an exception, during early boot when only 1 PCPU is online, > allocations are permitted with interrupts disabled.
This exception is tightly coupled with spin lock checking, i.e. the point in time when spin_debug_enable() is called. I think this wants making explicit at least in the code comment, but as a result I also wonder in how far the extended assertions are really worthwhile: Any violation would be detected in check_lock() anyway. Thoughts? Furthermore I'm concerned of Arm not using either SYS_STATE_smp_boot or spin_debug_enable(). Jan
