Hi, I am trying to inject NMIs to a guest running in QEMU by using cpu_interrupt(). I notice that QEMU slows down significantly when NMIs are being injected.
The injected NMIs per second is around 10. QEMU is pined to one core. A computation intensive application runs in the guest. When no NMIs are being injected, the physical CPU utilization is 100%; while NMIs are injected by calling cpu_interrupt(), the physical CPU utilization rate drops to around 30%. As far as I know from reading the code, cpu_interrupt() unchains the translation cache. So when the current TB is executed over, QEMU code is executed to handle the interrupt. I also notice that cpu_interrupt() is called very frequently normally. Why QEMU's performance drops so much when NMIs are being injected? Please CC me your reply. Thanks, Jiaqing