target/i386: display deprecation status in '-cpu help'

When the user queries CPU models via QMP there is a 'deprecated' flag
present, however, this is not done for the CLI '-cpu help' command.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2022-05-24 15:44:55 +01:00
parent 5258a7e2c0
commit 5dfa9e8689
1 changed files with 5 additions and 0 deletions

View File

@ -4837,6 +4837,11 @@ static void x86_cpu_list_entry(gpointer data, gpointer user_data)
desc = g_strdup_printf("%s", model_id);
}
if (cc->model && cc->model->cpudef->deprecation_note) {
g_autofree char *olddesc = desc;
desc = g_strdup_printf("%s (deprecated)", olddesc);
}
qemu_printf("x86 %-20s %s\n", name, desc);
}