aboutsummaryrefslogtreecommitdiff
path: root/target/i386/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/i386/helper.c')
-rw-r--r--target/i386/helper.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/target/i386/helper.c b/target/i386/helper.c
index c07b1b1..72b2e19 100644
--- a/target/i386/helper.c
+++ b/target/i386/helper.c
@@ -22,9 +22,11 @@
#include "cpu.h"
#include "exec/cputlb.h"
#include "exec/translation-block.h"
+#include "exec/target_page.h"
#include "system/runstate.h"
#ifndef CONFIG_USER_ONLY
#include "system/hw_accel.h"
+#include "system/memory.h"
#include "monitor/monitor.h"
#include "kvm/kvm_i386.h"
#endif
@@ -108,6 +110,7 @@ int cpu_x86_support_mca_broadcast(CPUX86State *env)
/* x86 mmu */
/* XXX: add PGE support */
+#ifndef CONFIG_USER_ONLY
void x86_cpu_set_a20(X86CPU *cpu, int a20_state)
{
CPUX86State *env = &cpu->env;
@@ -127,6 +130,7 @@ void x86_cpu_set_a20(X86CPU *cpu, int a20_state)
env->a20_mask = ~(1 << 20) | (a20_state << 20);
}
}
+#endif
void cpu_x86_update_cr0(CPUX86State *env, uint32_t new_cr0)
{
@@ -524,7 +528,7 @@ void cpu_x86_inject_mce(Monitor *mon, X86CPU *cpu, int bank,
static inline target_ulong get_memio_eip(CPUX86State *env)
{
#ifdef CONFIG_TCG
- uint64_t data[TARGET_INSN_START_WORDS];
+ uint64_t data[INSN_START_WORDS];
CPUState *cs = env_cpu(env);
if (!cpu_unwind_state_data(cs, cs->mem_io_pc, data)) {
@@ -617,6 +621,10 @@ void do_cpu_init(X86CPU *cpu)
void do_cpu_sipi(X86CPU *cpu)
{
+ CPUX86State *env = &cpu->env;
+ if (env->hflags & HF_SMM_MASK) {
+ return;
+ }
apic_sipi(cpu->apic_state);
}