]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/ppc: pass const string to kvmppc_is_mem_backend_page_size_ok()
authorGreg Kurz <groug@kaod.org>
Tue, 6 Jun 2017 16:12:24 +0000 (18:12 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 24 Aug 2017 21:39:25 +0000 (16:39 -0500)
This function has three implementations. Two are stubs that do nothing
and the third one only passes the obj_path argument to:

Object *object_resolve_path(const char *path, bool *ambiguous);

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
(cherry picked from commit ec69355beffe138c0f97306e65410e5dbc605554)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target/ppc/kvm.c
target/ppc/kvm_ppc.h

index 9f1f132cef1cc41aeaffb0cfa6a08792003a6cd9..89f3586cc6e5eb28d99ef4f08a72779c2ad775bd 100644 (file)
@@ -415,7 +415,7 @@ static void kvm_fixup_page_sizes(PowerPCCPU *cpu)
     }
 }
 
-bool kvmppc_is_mem_backend_page_size_ok(char *obj_path)
+bool kvmppc_is_mem_backend_page_size_ok(const char *obj_path)
 {
     Object *mem_obj = object_resolve_path(obj_path, NULL);
     char *mempath = object_property_get_str(mem_obj, "mem-path", NULL);
@@ -436,7 +436,7 @@ static inline void kvm_fixup_page_sizes(PowerPCCPU *cpu)
 {
 }
 
-bool kvmppc_is_mem_backend_page_size_ok(char *obj_path)
+bool kvmppc_is_mem_backend_page_size_ok(const char *obj_path)
 {
     return true;
 }
index 8e9f42d0c6647d90a1f1d7ef28041df8fd26aee6..eec5cca883dbd7e44dd022298614db310234d359 100644 (file)
@@ -57,7 +57,7 @@ int kvmppc_enable_hwrng(void);
 int kvmppc_put_books_sregs(PowerPCCPU *cpu);
 PowerPCCPUClass *kvm_ppc_get_host_cpu_class(void);
 
-bool kvmppc_is_mem_backend_page_size_ok(char *obj_path);
+bool kvmppc_is_mem_backend_page_size_ok(const char *obj_path);
 
 #else
 
@@ -191,7 +191,7 @@ static inline uint64_t kvmppc_rma_size(uint64_t current_size,
     return ram_size;
 }
 
-static inline bool kvmppc_is_mem_backend_page_size_ok(char *obj_path)
+static inline bool kvmppc_is_mem_backend_page_size_ok(const char *obj_path)
 {
     return true;
 }