qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] Introduce (x86) CPU model deprecation API


From: Robert Hoo
Subject: Re: [PATCH 1/2] Introduce (x86) CPU model deprecation API
Date: Thu, 04 Jun 2020 16:07:37 +0800

On Wed, 2020-06-03 at 09:11 -0500, Eric Blake wrote:
> On 6/3/20 6:47 AM, Robert Hoo wrote:
> > Complement versioned CPU model framework with the ability of
> > marking some
> > versions deprecated. When that CPU model is chosen, get some
> > warning. The
> > warning message is customized, e.g. telling in which future QEMU
> > version will
> > it be obsoleted.
> > The deprecation message will also appear by x86_cpu_list_entry(),
> > e.g. '-cpu
> > help'.
> > QMP 'query-cpu-definitions' will also return a bool value
> > indicating the
> > deprecation status.
> > 
> > Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
> > ---
> >   exec.c                   |  3 +++
> >   include/hw/core/cpu.h    |  1 +
> >   qapi/machine-target.json |  3 ++-
> >   target/i386/cpu.c        | 45
> > +++++++++++++++++++++++++++++++++++++++++++--
> >   4 files changed, 49 insertions(+), 3 deletions(-)
> > +++ b/qapi/machine-target.json
> > @@ -309,7 +309,8 @@
> >               'static': 'bool',
> >               '*unavailable-features': [ 'str' ],
> >               'typename': 'str',
> > -            '*alias-of' : 'str' },
> > +            '*alias-of' : 'str',
> > +            'deprecated' : 'bool' },
> 
> Missing documentation of the new member.  Should it be optional
> (present 
> only when true)?
Which document do you mean?
How to make it optional?
(Sorry, new to QMP)
> 
> > @@ -1638,6 +1639,11 @@ struct X86CPUModel {
> >        * This matters only for "-cpu help" and query-cpu-
> > definitions
> >        */
> >       bool is_alias;
> > +    /*
> > +     * If true, this is deprecated and obsoleted in the future.
> > +     * Trying to use deprecated CPU model shall be warned.
> 
> If true, this model is deprecated, and may be removed in the future. 
> Trying to use it now will cause a warning.
Thanks Eric:)
> 
> > +     */
> > +    bool deprecated;
> >   };
> >   
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]