diff options
author | Andreas Färber <afaerber@suse.de> | 2013-05-28 13:28:38 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-06-11 17:50:09 +0200 |
commit | 444d55907871f88276a654fc7fdc8c7db95f4b59 (patch) | |
tree | 10dde797d560c58dbd9a70405c0b38891fef5fc1 /target-i386/arch_memory_mapping.c | |
parent | c51a944b7505ba827adc897d5452d2b54dbf86bb (diff) |
cpu: Turn cpu_paging_enabled() into a CPUState hook
Relocate assignment of x86 get_arch_id to have all hooks in one place.
Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-i386/arch_memory_mapping.c')
-rw-r--r-- | target-i386/arch_memory_mapping.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/target-i386/arch_memory_mapping.c b/target-i386/arch_memory_mapping.c index 5096fbdf44..c5a10ec9bd 100644 --- a/target-i386/arch_memory_mapping.c +++ b/target-i386/arch_memory_mapping.c @@ -241,7 +241,7 @@ static void walk_pml4e(MemoryMappingList *list, int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env) { - if (!cpu_paging_enabled(env)) { + if (!cpu_paging_enabled(ENV_GET_CPU(env))) { /* paging is disabled */ return 0; } @@ -273,7 +273,3 @@ int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env) return 0; } -bool cpu_paging_enabled(CPUArchState *env) -{ - return env->cr[0] & CR0_PG_MASK; -} |