From: Collin Walling <walling@linux.ibm.com>
To: qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Cc: thuth@redhat.com, david@redhat.com, wangyanan55@huawei.com,
philmd@linaro.org, marcel.apfelbaum@gmail.com,
eduardo@habkost.net, armbru@redhat.com,
Collin Walling <walling@linux.ibm.com>
Subject: [PATCH v2 0/3] query-cpu-model-expansion: add disable-deprecated-feats arg
Date: Tue, 23 Apr 2024 17:06:52 -0400 [thread overview]
Message-ID: <20240423210655.66656-1-walling@linux.ibm.com> (raw)
The current implementation of query-cpu-model-expansion is lacking a way to
conditionally retrieve CPU models with properties (i.e. features) that are
flagged as deprecated set to disabled. To remedy this, a new optional boolean
"disable-deprecated-feats" argument has been added to the query.
Here is a sample QMP command that includes this new argument:
{ "execute": "query-cpu-model-expansion", "arguments": { "type": "full", "model": { "name": "host" }, "disable-deprecated-features": true}}
This patchset adds full support for this argument on s390x. A simple interface is
designed that contains an array of feature bits that are flagged for deprecation.
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);
}
}
For architectures that support model expansion but do not support the new arg,
an error message will print to stdio if this option is present.
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.
This feature may alleviate this issue by allowing for a query of a CPU model
with deprecated features listed in the props response paired with false. The
caller of this query may use this information to explicitly disable these
features for the guest's CPU model, ensuring a safe migration to the next
generation if desired.
I have developed a way for libvirt to make use of this functionality, but I
will hold back review on those patches until a QEMU interface is agreed upon.
Collin L. Walling (3):
cpu-models: add "disable-deprecated-feats" option to cpu model
expansion
target/s390x: add support for "disable-deprecated-feats" expansion
option
target/s390x: flag te and cte as deprecated
qapi/machine-target.json | 7 ++++++-
target/arm/arm-qmp-cmds.c | 7 +++++++
target/i386/cpu-sysemu.c | 7 +++++++
target/s390x/cpu_features.c | 17 +++++++++++++++++
target/s390x/cpu_features.h | 1 +
target/s390x/cpu_models_sysemu.c | 17 ++++++++++++++---
6 files changed, 52 insertions(+), 4 deletions(-)
--
2.43.0
next reply other threads:[~2024-04-23 21:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 21:06 Collin Walling [this message]
2024-04-23 21:06 ` [PATCH v2 1/3] cpu-models: add "disable-deprecated-feats" option to cpu model expansion Collin Walling
2024-04-24 6:19 ` Markus Armbruster
2024-04-24 17:46 ` Collin Walling
2024-04-25 6:31 ` Markus Armbruster
2024-04-25 17:35 ` Collin Walling
2024-04-26 8:18 ` Markus Armbruster
2024-04-24 8:20 ` Daniel P. Berrangé
2024-04-24 17:51 ` Collin Walling
2024-04-24 19:12 ` Collin Walling
2024-04-25 13:35 ` Daniel P. Berrangé
2024-04-25 16:58 ` Collin Walling
2024-04-23 21:06 ` [PATCH v2 2/3] target/s390x: add support for "disable-deprecated-feats" expansion option Collin Walling
2024-04-24 7:24 ` David Hildenbrand
2024-04-24 18:33 ` Collin Walling
2024-04-25 8:10 ` David Hildenbrand
2024-04-25 16:56 ` Collin Walling
2024-04-23 21:06 ` [PATCH v2 3/3] target/s390x: flag te and cte as deprecated Collin Walling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240423210655.66656-1-walling@linux.ibm.com \
--to=walling@linux.ibm.com \
--cc=armbru@redhat.com \
--cc=david@redhat.com \
--cc=eduardo@habkost.net \
--cc=marcel.apfelbaum@gmail.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
--cc=wangyanan55@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).