From: David Hildenbrand <david@redhat.com>
To: Collin Walling <walling@linux.ibm.com>,
qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Cc: thuth@redhat.com, wangyanan55@huawei.com, philmd@linaro.org,
marcel.apfelbaum@gmail.com, eduardo@habkost.net,
armbru@redhat.com, Jiri Denemark <jdenemar@redhat.com>
Subject: Re: [PATCH v1] target/s390x: filter deprecated features based on model expansion type
Date: Thu, 11 Jul 2024 23:10:14 +0200 [thread overview]
Message-ID: <3d93bd6b-7ca2-44e0-839b-a504a76b79a0@redhat.com> (raw)
In-Reply-To: <20240711203254.49018-1-walling@linux.ibm.com>
On 11.07.24 22:32, Collin Walling wrote:
> It is beneficial to provide an interface to retrieve *all* deprecated
> features in one go. Management applications will need this information
> to determine which features need to be disabled regardless of the
> host-model's capabilities.
>
> To remedy this, deprecated features are only filtered during a static
> expansion. All deperecated features are reported on a full expansion.
>
> Suggested-by: Jiri Denemark <jdenemar@redhat.com>
> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> ---
> target/s390x/cpu_models_sysemu.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/target/s390x/cpu_models_sysemu.c b/target/s390x/cpu_models_sysemu.c
> index 977fbc6522..76d15f2e4d 100644
> --- a/target/s390x/cpu_models_sysemu.c
> +++ b/target/s390x/cpu_models_sysemu.c
> @@ -211,7 +211,15 @@ static void cpu_info_from_model(CpuModelInfo *info, const S390CPUModel *model,
> bitmap_zero(bitmap, S390_FEAT_MAX);
> s390_get_deprecated_features(bitmap);
>
> - bitmap_and(bitmap, bitmap, model->def->full_feat, S390_FEAT_MAX);
> + /*
> + * For static model expansion, filter out deprecated features that are
> + * not a subset of the model's feature set. Otherwise, report the entire
> + * deprecated features list.
> + */
> + if (delta_changes) {
> + bitmap_and(bitmap, bitmap, model->def->full_feat, S390_FEAT_MAX);
> + }
> +
This would likely be the only interface where we expose "more" features
than a CPU model actually understands? I guess it wouldn't be that bad
because disabling unsupported features will just work, even if the CPU
model is not aware of them.
So no strong opinion.
Just noting that libvirt cannot really rely on that information because
the behavior would change between QEMU versions? Maybe not an issue.
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2024-07-11 21:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 20:32 [PATCH v1] target/s390x: filter deprecated features based on model expansion type Collin Walling
2024-07-11 21:10 ` David Hildenbrand [this message]
2024-07-15 16:04 ` Collin Walling
2024-07-12 5:23 ` Markus Armbruster
2024-07-15 16:52 ` Collin Walling
2024-07-16 6:11 ` Markus Armbruster
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=3d93bd6b-7ca2-44e0-839b-a504a76b79a0@redhat.com \
--to=david@redhat.com \
--cc=armbru@redhat.com \
--cc=eduardo@habkost.net \
--cc=jdenemar@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
--cc=walling@linux.ibm.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).