unicorn/qemu/target-i386
Paolo Bonzini 1fed54da89
target-i386: mask NMIs on entry to SMM
QEMU is not blocking NMIs on entry to SMM. Implementing this has to
cover a few corner cases, because:

- NMIs can then be enabled by an IRET instruction and there
is no mechanism to _set_ the "NMIs masked" flag on exit from SMM:
"A special case can occur if an SMI handler nests inside an NMI handler
and then another NMI occurs. [...] When the processor enters SMM while
executing an NMI handler, the processor saves the SMRAM state save map
but does not save the attribute to keep NMI interrupts disabled.

- However, there is some hidden state, because "If NMIs were blocked
before the SMI occurred [and no IRET is executed while in SMM], they
are blocked after execution of RSM." This is represented by the new
HF2_SMM_INSIDE_NMI_MASK bit. If it is zero, NMIs are _unblocked_
on exit from RSM.

Backports commit 9982f74bad70479939491b69522da047a3be5a0d from qemu
2018-02-13 12:29:31 -05:00
..
arch_memory_mapping.c Switch non-CPU callers from ld/st*_phys to address_space_ld/st* 2018-02-12 19:27:02 -05:00
bpt_helper.c target-i386: Make check_hw_breakpoints static 2018-02-11 12:28:08 -05:00
cc_helper_template.h This code should now build the x86_x64-softmmu part 2. 2017-01-19 22:50:28 +11:00
cc_helper.c This code should now build the x86_x64-softmmu part 2. 2017-01-19 22:50:28 +11:00
cpu-qom.h target-i386: Require APIC ID to be explicitly set before CPU realize 2018-02-12 15:52:53 -05:00
cpu.c target-i386: Remove AMD feature flag aliases from CPU model table 2018-02-12 20:55:52 -05:00
cpu.h target-i386: mask NMIs on entry to SMM 2018-02-13 12:29:31 -05:00
excp_helper.c import 2015-08-21 15:04:50 +08:00
fpu_helper.c cleanup after msvc port 2017-01-22 21:27:17 +08:00
helper.c target-i386: Use correct memory attributes for memory accesses 2018-02-13 11:54:12 -05:00
helper.h target-i386: Use correct memory attributes for ioport accesses 2018-02-13 12:27:43 -05:00
int_helper.c This code should now build the x86_x64-softmmu part 2. 2017-01-19 22:50:28 +11:00
Makefile.objs target-i386: Move breakpoint related functions to new file 2018-02-11 12:25:24 -05:00
mem_helper.c no more spinlock 2017-01-20 14:57:33 +08:00
misc_helper.c target-i386: Use correct memory attributes for ioport accesses 2018-02-13 12:27:43 -05:00
ops_sse_header.h import 2015-08-21 15:04:50 +08:00
ops_sse.h i386: fix signed int overflow in #923 & #924 2017-12-16 10:28:45 +08:00
seg_helper.c target-i386: Use correct memory attributes for memory accesses 2018-02-13 11:54:12 -05:00
shift_helper_template.h This code should now build the x86_x64-softmmu part 2. 2017-01-19 22:50:28 +11:00
smm_helper.c target-i386: mask NMIs on entry to SMM 2018-02-13 12:29:31 -05:00
svm_helper.c target-i386: Use correct memory attributes for memory accesses 2018-02-13 11:54:12 -05:00
svm.h Automated leading tab to spaces conversion. 2017-01-21 12:28:22 +11:00
TODO import 2015-08-21 15:04:50 +08:00
topology.h platform.h move #3 2017-01-21 00:13:21 +11:00
translate.c target-i386: Use correct memory attributes for ioport accesses 2018-02-13 12:27:43 -05:00
unicorn.c target-i386: make xmm_regs 512-bit wide 2018-02-12 12:38:43 -05:00
unicorn.h New feature: registers can be bulk saved/restored in an opaque blob 2016-08-20 04:14:07 -07:00