OSDN Git Service

cpu: Introduce CPU model deprecation API
authorRobert Hoo <robert.hu@linux.intel.com>
Tue, 22 Sep 2020 07:14:14 +0000 (15:14 +0800)
committerEduardo Habkost <ehabkost@redhat.com>
Wed, 14 Oct 2020 19:28:54 +0000 (15:28 -0400)
commit61ad65d0f01d928b259effb57e2a356f3e3dac03
treef541471b8d9ef792ec0b5a2e57aeaef5320c6ae2
parent31c707fb4d693068d3f0ab8aa7a1e07ddce5cdca
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>
hw/core/machine.c
include/hw/core/cpu.h
qapi/machine-target.json
target/i386/cpu.c