Thank you for fixing this bug! On my end I can confirm that this bug is fixed.
Incorrect "Blocking by NMI" bit when handling NMI VM-exit
Thanks for the fix. I tested the commit https://github.com/bochs-emu/Bochs/commit/bd51ec5f8353b108646d997e671f39b59647aea0 on GitHub and it works.
Hi Stanislav, I tried the fix you provided. It passes my experiment (i.e. experiment 13). I think your guest is correct. When virtual NMI is enabled, during VMENTER: NMI should be unblocked Virutal NMI blocking depends on the guest.interruptibility_state & BX_VMX_INTERRUPTS_BLOCKED_NMI_BLOCKED bit in VMCS. The relevant quote on Intel SDM is The blocking of non-maskable interrupts (NMIs) is determined as follows: If the “virtual NMIs” VM-execution control is 0, NMIs are blocked if and only if bit...
Hi Stanislav, Thanks for the prompt reply. Technically, I think NMI handling and VMCALL are implemented correctly in VMX (bochs/cpu/vmx.cc). However, NMI-blocking is not implemented / has imperfections in its implementation. I agree that this NMI-blocking problem has low priority because most VMMs are not affected. I am developing a new VMM, so Bochs will help my development if it implements NMI blocking correctly. However, I am also able to find alternative ways to help me develop the VMM. So I...
Bochs does not handle NMI blocking correctly when running virtual machines (VMX)