mbox series

[v3,0/2] query-cpu-model-expansion: report deprecated features

Message ID 20240424215633.48906-1-walling@linux.ibm.com
Headers show
Series query-cpu-model-expansion: report deprecated features | expand

Message

Collin Walling April 24, 2024, 9:56 p.m. UTC
Previous version here (different subject line): 
https://mail.gnu.org/archive/html/qemu-devel/2024-04/msg03200.html

Changelog

    v3
        - removed optional disable-deprecated-feats argument
        - added deprecated-props array to CpuModelInfo struct
        - amended cover letter language to reflect design

    v2 
        - removed "static-recommended" expansion type
        - implemented optional disable-deprecated-feats argument

---

The current implementation of query-cpu-model-expansion is lacking a way to retrieve
CPU models with properties (i.e. features) that are flagged as deprecated. To remedy
this, a list of deprecated-props has been appended to the CpuModelInfo struct, and
will currently be reported by a query-cpu-model-expansion.

Check patch #2 description for an example output.

A simple interface is designed that contains an array of feature bits that are flagged
as deprecated. This list may be easily populated with more features in the future.

    void s390_get_deprecated_features(S390FeatBitmap features)
    {
        static const int feats[] = {
             /* CSSKE is deprecated on newer generations */
             S390_FEAT_CONDITIONAL_SSKE,
             S390_FEAT_BPB,
             /* Deprecated on z16 */
             S390_FEAT_CONSTRAINT_TRANSACTIONAL_EXE,
             S390_FEAT_TRANSACTIONAL_EXE
        };
        int i;

        for (i = 0; i < ARRAY_SIZE(feats); i++) {
            set_bit(feats[i], features);
        }
    }

Use case example:

Newer s390 machines may signal the end-of-support for particular CPU features,
rendering guests operating with older CPU models incapable of running on
said machines. A manual effort to disable certain CPU features would be
required.

Reporting a list of deprecated features allows the user / management app to
take the next steps to ensure the guest is defined in a way that ensures
a migration in the future.

Collin L. Walling (2):
  target/s390x: report deprecated-props in cpu-model-expansion reply
  target/s390x: flag te and cte as deprecated

 qapi/machine-target.json         |  5 ++++-
 target/s390x/cpu_features.c      | 17 +++++++++++++++++
 target/s390x/cpu_features.h      |  1 +
 target/s390x/cpu_models_sysemu.c |  6 ++++++
 4 files changed, 28 insertions(+), 1 deletion(-)

Comments

Collin Walling April 24, 2024, 10:05 p.m. UTC | #1
On 4/24/24 17:56, Collin Walling wrote:

> 
> Check patch #2 description for an example output.
> 

I meant patch #1, sorry. Forgot I dropped a patch in this series.