mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
cpu: Turn cpu_get_memory_mapping() into a CPUState hook
Change error reporting from return value to Error argument. Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> [AF: Fixed cpu_get_memory_mapping() documentation] Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
6d4d3ae77d
commit
a23bbfda75
8 changed files with 44 additions and 16 deletions
|
|
@ -183,13 +183,14 @@ int qemu_get_guest_memory_mapping(MemoryMappingList *list)
|
|||
CPUArchState *env, *first_paging_enabled_cpu;
|
||||
RAMBlock *block;
|
||||
ram_addr_t offset, length;
|
||||
int ret;
|
||||
|
||||
first_paging_enabled_cpu = find_paging_enabled_cpu(first_cpu);
|
||||
if (first_paging_enabled_cpu) {
|
||||
for (env = first_paging_enabled_cpu; env != NULL; env = env->next_cpu) {
|
||||
ret = cpu_get_memory_mapping(list, env);
|
||||
if (ret < 0) {
|
||||
Error *err = NULL;
|
||||
cpu_get_memory_mapping(ENV_GET_CPU(env), list, &err);
|
||||
if (err) {
|
||||
error_free(err);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue