diff options
Diffstat (limited to 'target-i386/arch_memory_mapping.c')
-rw-r--r-- | target-i386/arch_memory_mapping.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/target-i386/arch_memory_mapping.c b/target-i386/arch_memory_mapping.c index c5a10ec9bd..2566a040a6 100644 --- a/target-i386/arch_memory_mapping.c +++ b/target-i386/arch_memory_mapping.c @@ -239,11 +239,15 @@ static void walk_pml4e(MemoryMappingList *list, } #endif -int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env) +void x86_cpu_get_memory_mapping(CPUState *cs, MemoryMappingList *list, + Error **errp) { - if (!cpu_paging_enabled(ENV_GET_CPU(env))) { + X86CPU *cpu = X86_CPU(cs); + CPUX86State *env = &cpu->env; + + if (!cpu_paging_enabled(cs)) { /* paging is disabled */ - return 0; + return; } if (env->cr[4] & CR4_PAE_MASK) { @@ -269,7 +273,5 @@ int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env) pse = !!(env->cr[4] & CR4_PSE_MASK); walk_pde2(list, pde_addr, env->a20_mask, pse); } - - return 0; } |