[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/62] memory: do not look at current_machine->accel
From: |
Paolo Bonzini |
Subject: |
[PULL 12/62] memory: do not look at current_machine->accel |
Date: |
Mon, 16 Dec 2019 17:27:56 +0100 |
"info mtree -f" prints the wrong accelerator name if used with for example
"-machine accel=kvm:tcg". The right thing to do is to fetch the name
from the AccelClass, which will also work nicely once
current_machine->accel stops existing.
Tested-by: Thomas Huth <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
memory.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/memory.c b/memory.c
index 06484c2..6d79cf1 100644
--- a/memory.c
+++ b/memory.c
@@ -2979,7 +2979,6 @@ struct FlatViewInfo {
bool dispatch_tree;
bool owner;
AccelClass *ac;
- const char *ac_name;
};
static void mtree_print_flatview(gpointer key, gpointer value,
@@ -3049,7 +3048,7 @@ static void mtree_print_flatview(gpointer key, gpointer
value,
if (fvi->ac->has_memory(current_machine, as,
int128_get64(range->addr.start),
MR_SIZE(range->addr.size) + 1)) {
- qemu_printf(" %s", fvi->ac_name);
+ qemu_printf(" %s", fvi->ac->name);
}
}
}
@@ -3097,8 +3096,6 @@ void mtree_info(bool flatview, bool dispatch_tree, bool
owner)
if (ac->has_memory) {
fvi.ac = ac;
- fvi.ac_name = current_machine->accel ? current_machine->accel :
- object_class_get_name(OBJECT_CLASS(ac));
}
/* Gather all FVs in one table */
--
1.8.3.1
- [PULL 01/62] kvm: Reallocate dirty_bmap when we change a slot, (continued)
- [PULL 01/62] kvm: Reallocate dirty_bmap when we change a slot, Paolo Bonzini, 2019/12/16
- [PULL 02/62] migration-test: Create cmd_soure and cmd_target, Paolo Bonzini, 2019/12/16
- [PULL 03/62] migration-test: Move hide_stderr to common commandline, Paolo Bonzini, 2019/12/16
- [PULL 04/62] migration-test: Move -machine to common commandline, Paolo Bonzini, 2019/12/16
- [PULL 05/62] migration-test: Move memory size to common commandline, Paolo Bonzini, 2019/12/16
- [PULL 06/62] migration-test: Move shmem handling to common commandline, Paolo Bonzini, 2019/12/16
- [PULL 07/62] migration-test: Move -name handling to common commandline, Paolo Bonzini, 2019/12/16
- [PULL 09/62] migration-test: Move -incomming handling to common commandline, Paolo Bonzini, 2019/12/16
- [PULL 08/62] migration-test: Move -serial handling to common commandline, Paolo Bonzini, 2019/12/16
- [PULL 10/62] migration-test: Rename cmd_src/dst to arch_source/arch_target, Paolo Bonzini, 2019/12/16
- [PULL 12/62] memory: do not look at current_machine->accel,
Paolo Bonzini <=
- [PULL 11/62] migration-test: Use a struct for test_migrate_start parameters, Paolo Bonzini, 2019/12/16
- [PULL 13/62] vl: move icount configuration earlier, Paolo Bonzini, 2019/12/16
- [PULL 15/62] vl: extract accelerator option processing to a separate function, Paolo Bonzini, 2019/12/16
- [PULL 14/62] tcg: move qemu_tcg_configure to accel/tcg/tcg-all.c, Paolo Bonzini, 2019/12/16
- [PULL 17/62] accel: compile accel/accel.c just once, Paolo Bonzini, 2019/12/16
- [PULL 16/62] vl: merge -accel processing into configure_accelerators, Paolo Bonzini, 2019/12/16
- [PULL 18/62] vl: introduce object_parse_property_opt, Paolo Bonzini, 2019/12/16
- [PULL 20/62] vl: warn for unavailable accelerators, clarify messages, Paolo Bonzini, 2019/12/16
- [PULL 21/62] qom: introduce object_register_sugar_prop, Paolo Bonzini, 2019/12/16
- [PULL 22/62] qom: add object_new_with_class, Paolo Bonzini, 2019/12/16