Skip to content

Commit

Permalink
target-i386: Add NMI interception to SVM
Browse files Browse the repository at this point in the history
Check for SVM interception prior to injecting an NMI. Tested via the
Jailhouse hypervisor.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Message-Id: <c65877e9a011ee4962931287e59f502c482b8d0b.1522769774.git.jan.kiszka@web.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
jan-kiszka authored and bonzini committed Jun 28, 2018
1 parent fc051ae commit 02f7fd2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions target/i386/seg_helper.c
Expand Up @@ -1337,6 +1337,7 @@ bool x86_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
ret = true;
} else if ((interrupt_request & CPU_INTERRUPT_NMI) &&
!(env->hflags2 & HF2_NMI_MASK)) {
cpu_svm_check_intercept_param(env, SVM_EXIT_NMI, 0, 0);
cs->interrupt_request &= ~CPU_INTERRUPT_NMI;
env->hflags2 |= HF2_NMI_MASK;
do_interrupt_x86_hardirq(env, EXCP02_NMI, 1);
Expand Down

0 comments on commit 02f7fd2

Please sign in to comment.