So you want to know the internal implementation details. You can't, it's all proprietary IPR. And why would you?
To me, it again seems you have some massive misunderstanding you are trying to work around.
"But there is no easy way to check when other interrupts get re-enabled". Wat? This makes no sense at all. Nothing is being disabled, and hence, nothing needs re-enabling.
It's all utterly trivial: higher priority interrupts interrupt the lower priority ones. Lower priority interrupts, if they happen during execution of high-priority ISR, are pending and automatically get executed after higher priority interrupts return. It doesn't matter how this is internally implemented, because it just works. You don't need to manage this by yourself at all.
If you want to dynamically demote the ISR priority, i.e., do something important quickly, then continue processing at lower priority, letting other mid-urgency ISRs inbetween, just trig a lower-priority software interrupt. This is what I do all the time:
NVIC_SetPriority(SPI_IRQn, 2); // quite high priority
NVIC_SetPriority(PROCESSING_IRQn, 10); // quite low priority
NVIC_SetPriority(OTHER_IRQn, 5);
void spi_handler()
{
// read data, do some quick processing, check error conditions, whatever
NVIC->STIR = PROCESSING_IRQn; // trigger processing_handler()
}
void processing_handler()
{
// do whatever slow here, as long it finishes before next triggering
}
void other_handler()
{
// spi_handler interrupts this; processing_handler does not
}
This also makes code portable and easy to understand, because the processing function is again just a regular function, so you can just... call it! Or let the NVIC "call" it.
There is also this "sub-priority" thing but IMHO, it's more like fine-tuning thing, I have never came up with any use for it in any actual project, so I just always
NVIC_SetPriorityGrouping(0);
so the priority is just one simple number; lower number simply always pre-empts higher number. KISS.
Internal implementation is surely quite complex compared to old simple CPUs, but that exactly makes using it easier.