aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-11-13 11:50:03 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2019-12-17 19:32:24 +0100
commit53b62bec0144615a54c77f4fc5561501a6a2c844 (patch)
treef11e22265f86de82b58adcbc4383ccf3e120630b /memory.c
parent5d3b575da64ed3f45952218ab5d3bd9985f35941 (diff)
downloadqemu-53b62bec0144615a54c77f4fc5561501a6a2c844.zip
qemu-53b62bec0144615a54c77f4fc5561501a6a2c844.tar.gz
qemu-53b62bec0144615a54c77f4fc5561501a6a2c844.tar.bz2
memory: do not look at current_machine->accel
"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 <thuth@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/memory.c b/memory.c
index 0228cad..d7b9bb6 100644
--- a/memory.c
+++ b/memory.c
@@ -2991,7 +2991,6 @@ struct FlatViewInfo {
bool dispatch_tree;
bool owner;
AccelClass *ac;
- const char *ac_name;
};
static void mtree_print_flatview(gpointer key, gpointer value,
@@ -3061,7 +3060,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);
}
}
}
@@ -3109,8 +3108,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 */