]> rtime.felk.cvut.cz Git - jailhouse.git/commit
x86: Implement AMD-V NMI handler and CPU reset
authorValentine Sinitsyn <valentine.sinitsyn@gmail.com>
Sun, 28 Sep 2014 12:33:08 +0000 (18:33 +0600)
committerJan Kiszka <jan.kiszka@siemens.com>
Sat, 1 Nov 2014 19:10:09 +0000 (20:10 +0100)
commitf2fdede7a4dccb411f01ad32121936de75003eaf
treee15cc9401a04df4b86a81c29ef55eb6ea7a4e1a5
parent68cfdf5670a1e0bc6ed9eef015d3880e119490a8
x86: Implement AMD-V NMI handler and CPU reset

NMIs originate from the hypervisor which uses them to manage cells. As a part
of this management task, the CPU can be reset. This is performed in vcpu_reset().

Jailhouse runs with GIF set, and it needs to be cleared shortly to let the CPU
to consume pending interrupt and allow further NMIs trigger VM exits. Otherwise,
current NMI would be delivered to the guest on the next VM entry.

NMI can trigger in host mode only if Jailhouse explicitly clears the GIF to
consume the pending interrupt. There is nothing to handle in this case, so
vcpu_nmi_handler() simply prints a message that the NMI was consumed.

Signed-off-by: Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/x86/svm.c