summaryrefslogtreecommitdiffstats
path: root/include/hw/core
diff options
context:
space:
mode:
authorRobert Hoo2020-09-22 09:14:14 +0200
committerEduardo Habkost2020-10-14 21:28:54 +0200
commit61ad65d0f01d928b259effb57e2a356f3e3dac03 (patch)
treef541471b8d9ef792ec0b5a2e57aeaef5320c6ae2 /include/hw/core
parentkvm: Correct documentation of kvm_irqchip_*() (diff)
downloadqemu-61ad65d0f01d928b259effb57e2a356f3e3dac03.tar.gz
qemu-61ad65d0f01d928b259effb57e2a356f3e3dac03.tar.xz
qemu-61ad65d0f01d928b259effb57e2a356f3e3dac03.zip
cpu: Introduce CPU model deprecation API
Implement the ability of marking some versions deprecated. When that CPU model is chosen, print a warning. The warning message can be customized, e.g. suggesting an alternative CPU model to be used instead. The deprecation message will be printed by x86_cpu_list_entry(), e.g. '-cpu help'. QMP command 'query-cpu-definitions' will return a bool value indicating the deprecation status. Signed-off-by: Robert Hoo <robert.hu@linux.intel.com> Message-Id: <1600758855-80046-1-git-send-email-robert.hu@linux.intel.com> [ehabkost: reword commit message] [ehabkost: Handle NULL cpu_type] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/hw/core')
-rw-r--r--include/hw/core/cpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 4879f25026..9c3a45ad7b 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -155,6 +155,8 @@ struct TranslationBlock;
* @disas_set_info: Setup architecture specific components of disassembly info
* @adjust_watchpoint_address: Perform a target-specific adjustment to an
* address before attempting to match it against watchpoints.
+ * @deprecation_note: If this CPUClass is deprecated, this field provides
+ * related information.
*
* Represents a CPU family or model.
*/
@@ -221,6 +223,7 @@ struct CPUClass {
vaddr (*adjust_watchpoint_address)(CPUState *cpu, vaddr addr, int len);
void (*tcg_initialize)(void);
+ const char *deprecation_note;
/* Keep non-pointer data at the end to minimize holes. */
int gdb_num_core_regs;
bool gdb_stop_before_watchpoint;