@balaton
I don't know the internal details because I don't have access to the kernel source code. I can only try to explain to you how the code is working now:
https://github.com/afxgroup/clib2/blob ... /library/profile/profil.cOn line 110 you have:
IPM->SetInterruptVector(1, &CounterInt);
That is enabling that interrupt (CounterInt is an Interrupt) and that should call CounterIntFn function.
But while on a real pegasos2 that function is called, on qemu is never called. So I suppose that interrupt is never enabled
If you tell me how, I could try to "grep" something useful for you.