qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philippe.mathieu.daude@gmail.com>
To: Damien Hedde <damien.hedde@greensocs.com>, qemu-devel@nongnu.org
Cc: "Eduardo Habkost" <eduardo@habkost.net>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH 1/5] qdev: add uc_requires_machine_allowance flag
Date: Thu, 31 Mar 2022 12:21:57 +0200	[thread overview]
Message-ID: <bdaeed93-34dc-673f-426a-89845ddf4992@gmail.com> (raw)
In-Reply-To: <20220330161215.235231-2-damien.hedde@greensocs.com>

On 30/3/22 18:12, Damien Hedde wrote:
> This flag will be used in device_add to check if
> the device needs special allowance from the machine
> model.
> 
> It will replace the current check based only on the
> device being a TYPE_SYB_BUS_DEVICE.
> 
> Signed-off-by: Damien Hedde <damien.hedde@greensocs.com>
> ---
>   include/hw/qdev-core.h | 6 ++++++
>   hw/core/qdev.c         | 1 +
>   hw/core/sysbus.c       | 1 +
>   3 files changed, 8 insertions(+)
> 
> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
> index 92c3d65208..f5a05ced39 100644
> --- a/include/hw/qdev-core.h
> +++ b/include/hw/qdev-core.h
> @@ -123,6 +123,12 @@ struct DeviceClass {
>        */
>       bool user_creatable;
>       bool hotpluggable;
> +    /*
> +     * Some devices (eg: sysbus devices) are only user-creatable if
> +     * the machine allowed it. user_creatable need still to be set to
> +     * true, this is an additional constraint.
> +     */
> +    bool uc_requires_machine_allowance;

Why not name it user_creatable_requires_machine_allowance? Also I'd put
it just after user_creatable.


  reply	other threads:[~2022-03-31 10:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30 16:12 [PATCH 0/5] Generalize the sysbus device machine allowance Damien Hedde
2022-03-30 16:12 ` [PATCH 1/5] qdev: add uc_requires_machine_allowance flag Damien Hedde
2022-03-31 10:21   ` Philippe Mathieu-Daudé [this message]
2022-03-31 10:48     ` Damien Hedde
2022-03-30 16:12 ` [PATCH 2/5] machine: update machine allowed list related functions/fields Damien Hedde
2022-03-31 10:20   ` Philippe Mathieu-Daudé
2022-03-30 16:12 ` [PATCH 3/5] qdev-monitor: use the newly uc_requires_machine_allowance Damien Hedde
2022-03-30 16:12 ` [PATCH 4/5] rename machine_class_allow_dynamic_sysbus_dev Damien Hedde
2022-03-31 10:19   ` Philippe Mathieu-Daudé
2022-03-30 16:12 ` [PATCH 5/5] machine: remove temporary inline functions Damien Hedde
2022-03-31 10:19   ` Philippe Mathieu-Daudé

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=bdaeed93-34dc-673f-426a-89845ddf4992@gmail.com \
    --to=philippe.mathieu.daude@gmail.com \
    --cc=berrange@redhat.com \
    --cc=damien.hedde@greensocs.com \
    --cc=eduardo@habkost.net \
    --cc=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --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).