According to my understanding of interrupt handling mechanism in
QEMU, when some external interrupt comes, related device emulation code
(e.g. kbd_update_irq in pckbd.c ---> qemu_set_irq----> .... ) runs
in vcpu thread........ and io-thread when finds that some interrupt has
occured sends signal to vcpu thread to interrupt guest code
execution....
What I am not able to understand is if emulate device related
interrupt is raised in vcpu thread and particular architecture's
interrupt related registers are set here, why guest cannot process that
interrupt at this time? There looks to be some inconsistency in my
understanding.... Can someone help me understand this?