diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a4732a73725b3b75fd6c09f33afa440a1e27a33e..d9dca1dafb8214725b0fa0f404e4b317a6cc40a9 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6711,14 +6711,6 @@ static bool x86_cpu_get_paging_enabled(const CPUState *cs) return cpu->env.cr[0] & CR0_PG_MASK; } -#endif /* !CONFIG_USER_ONLY */ - -static void x86_cpu_set_pc(CPUState *cs, vaddr value) -{ - X86CPU *cpu = X86_CPU(cs); - - cpu->env.eip = value; -} /* At present, we check the vm is *LARGE* or not, i.e. whether * the memory size is more than 4T or not. @@ -6736,6 +6728,14 @@ void x86_cpu_adjuest_by_ram_size(ram_addr_t ram_size, X86CPU *cpu) cpu->fill_mtrr_mask = true; } } +#endif /* !CONFIG_USER_ONLY */ + +static void x86_cpu_set_pc(CPUState *cs, vaddr value) +{ + X86CPU *cpu = X86_CPU(cs); + + cpu->env.eip = value; +} int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request) { diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 6f777fd6ca42f5363e0c82e8da0a3ceb481d6086..d9296a9abcac4c1d5607b990c66b51ee58e3792c 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1842,10 +1842,12 @@ struct X86CPU { extern const VMStateDescription vmstate_x86_cpu; #endif +#ifndef CONFIG_USER_ONLY #define DEFAULT_VM_CPU_PHYS_BITS 42 #define LARGE_VM_CPU_PHYS_BITS 46 void x86_cpu_adjuest_by_ram_size(ram_addr_t ram_size, X86CPU *cpu); +#endif int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request);