As a learner of qemu, I am a little bit confused about the qemu device model.
How the device model gets run and when the device interrupt is raised to CPU?
In the cpu_exec loop or before it? 
 
Thanks