Patchwork [qom-cpu,v4,12/18] cpu: Change default for CPUClass::get_paging_enabled()

login
register
mail settings
Submitter Andreas Färber
Date June 9, 2013, 4:10 p.m.
Message ID <1370794247-28267-13-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/250058/
State New
Headers show

Comments

Andreas Färber - June 9, 2013, 4:10 p.m.
qemu_get_guest_memory_mapping() uses cpu_paging_enabled() to determine
whether to use cpu_get_memory_mapping() to return mappings or whether to
fall back to a simple identity map.

Since by default CPUClass::get_memory_mapping() is not implemented,
change the default to false to use the identity map by default.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 qom/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Jens Freimann - June 11, 2013, 9 a.m.
On Sun, Jun 09, 2013 at 06:10:41PM +0200, Andreas Färber wrote:
> qemu_get_guest_memory_mapping() uses cpu_paging_enabled() to determine
> whether to use cpu_get_memory_mapping() to return mappings or whether to
> fall back to a simple identity map.
> 
> Since by default CPUClass::get_memory_mapping() is not implemented,
> change the default to false to use the identity map by default.
> 
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com> 

> ---
>  qom/cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qom/cpu.c b/qom/cpu.c
> index b25fbc9..dba4a11 100644
> --- a/qom/cpu.c
> +++ b/qom/cpu.c
> @@ -59,7 +59,7 @@ bool cpu_paging_enabled(const CPUState *cpu)
>  
>  static bool cpu_common_get_paging_enabled(const CPUState *cpu)
>  {
> -    return true;
> +    return false;
>  }
>  
>  void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
> -- 
> 1.8.1.4
> 
>
Luiz Capitulino - June 11, 2013, 3:01 p.m.
On Sun,  9 Jun 2013 18:10:41 +0200
Andreas Färber <afaerber@suse.de> wrote:

> qemu_get_guest_memory_mapping() uses cpu_paging_enabled() to determine
> whether to use cpu_get_memory_mapping() to return mappings or whether to
> fall back to a simple identity map.
> 
> Since by default CPUClass::get_memory_mapping() is not implemented,
> change the default to false to use the identity map by default.
> 
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>

> ---
>  qom/cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qom/cpu.c b/qom/cpu.c
> index b25fbc9..dba4a11 100644
> --- a/qom/cpu.c
> +++ b/qom/cpu.c
> @@ -59,7 +59,7 @@ bool cpu_paging_enabled(const CPUState *cpu)
>  
>  static bool cpu_common_get_paging_enabled(const CPUState *cpu)
>  {
> -    return true;
> +    return false;
>  }
>  
>  void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,

Patch

diff --git a/qom/cpu.c b/qom/cpu.c
index b25fbc9..dba4a11 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -59,7 +59,7 @@  bool cpu_paging_enabled(const CPUState *cpu)
 
 static bool cpu_common_get_paging_enabled(const CPUState *cpu)
 {
-    return true;
+    return false;
 }
 
 void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,