All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Yonggang Luo <luoyonggang@gmail.com>
Cc: qemu-devel@nongnu.org,
	"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daude" <philmd@mailo.com>
Subject: Re: [PATCH 2/5] target-info: add target_mask_selected()
Date: Fri, 6 Nov 2026 15:45:01 +0000	[thread overview]
Message-ID: <au31_UZnVUErwhKi@redhat.com> (raw)
In-Reply-To: <20261105190346.1539-3-luoyonggang@gmail.com>

On Fri, Nov 06, 2026 at 03:03:43AM +0800, Yonggang Luo wrote:
> Return the QEMU_ARCH_* mask of the selected target. System mode
> returns QEMU_ARCH_ALL until a target is selected. User mode returns
> that target's bit. Tools return 0.

I was wondering if it was better to have system mode return
0 or QEMU_ARCH_ALL, when no target is selected.

I guess QEMU_ARCH_ALL (or a mask of all arches that are
built-in to the bniary) is a better approach, as it expresses
that the system's current state is capable of targetting
any of the include arches, while '0' conceptually represents
the "no arch specific features" scenario for tools.

> 
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  include/qemu/target-info-init.h | 15 ++++++++++-----
>  include/qemu/target-info.h      |  9 +++++++++
>  stubs/meson.build               |  1 +
>  stubs/target-mask-selected.c    | 13 +++++++++++++
>  target-info-def.c               |  3 +++
>  target-info-qom.c               | 10 ++++++++++
>  6 files changed, 46 insertions(+), 5 deletions(-)
>  create mode 100644 stubs/target-mask-selected.c

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

this patch looks applicable independently of this
series.


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



  reply	other threads:[~2026-11-06 15:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 19:03 [PATCH 0/5] qom: prepare a TypeBucket for same-name target variants Yonggang Luo
2026-11-05 19:03 ` [PATCH 1/5] qom: store registration targets on TypeImpl Yonggang Luo
2026-11-05 19:03 ` [PATCH 2/5] target-info: add target_mask_selected() Yonggang Luo
2026-11-06 15:45   ` Daniel P. Berrangé [this message]
2026-11-06 16:17     ` Yonggang Luo
2026-11-06 17:44   ` Pierrick Bouvier
2026-11-06 17:46     ` Yonggang Luo
2026-11-06 17:47       ` Pierrick Bouvier
2026-11-06 19:52         ` Yonggang Luo
2026-11-06 20:19           ` Pierrick Bouvier
2026-11-05 19:03 ` [PATCH 3/5] qom: add target_mask_filter() Yonggang Luo
2026-11-05 19:03 ` [PATCH 4/5] qom: filter type lookup with TypeBucket Yonggang Luo
2026-11-05 19:03 ` [PATCH 5/5] qom: add type_register_targets() Yonggang Luo
2026-11-12 13:53 ` [PATCH 0/5] qom: prepare a TypeBucket for same-name target variants Daniel P. Berrangé

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=au31_UZnVUErwhKi@redhat.com \
    --to=berrange@redhat.com \
    --cc=luoyonggang@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@mailo.com \
    --cc=philmd@oss.qualcomm.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.