[PATCH-for-10.0 09/12] hw/nvram/xlnx-efuse: Do not expose as user-creatable

Philippe Mathieu-Daudé posted 12 patches 10 months, 2 weeks ago
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, Alistair Francis <alistair@alistair23.me>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Samuel Tardieu <sam@rfc1149.net>, "Hervé Poussineau" <hpoussin@reactos.org>, Glenn Miles <milesg@linux.ibm.com>, Patrick Leis <venture@google.com>, Peter Maydell <peter.maydell@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Tyrone Ting <kfting@nuvoton.com>, Hao Wu <wuhaotsh@google.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, BALATON Zoltan <balaton@eik.bme.hu>, Bernhard Beschow <shentey@gmail.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Thomas Huth <thuth@redhat.com>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>
[PATCH-for-10.0 09/12] hw/nvram/xlnx-efuse: Do not expose as user-creatable
Posted by Philippe Mathieu-Daudé 10 months, 2 weeks ago
This device is part of SoC components thus can not
be created manually.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/nvram/xlnx-efuse.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/nvram/xlnx-efuse.c b/hw/nvram/xlnx-efuse.c
index 29e7dd539ec..176e88fcd17 100644
--- a/hw/nvram/xlnx-efuse.c
+++ b/hw/nvram/xlnx-efuse.c
@@ -280,6 +280,8 @@ static void efuse_class_init(ObjectClass *klass, void *data)
 
     dc->realize = efuse_realize;
     device_class_set_props(dc, efuse_properties);
+    /* Reason: Part of Xilinx SoC */
+    dc->user_creatable = false;
 }
 
 static const TypeInfo efuse_info = {
-- 
2.47.1


Re: [PATCH-for-10.0 09/12] hw/nvram/xlnx-efuse: Do not expose as user-creatable
Posted by Thomas Huth 10 months, 2 weeks ago
On 25/03/2025 23.43, Philippe Mathieu-Daudé wrote:
> This device is part of SoC components thus can not
> be created manually.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/nvram/xlnx-efuse.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/hw/nvram/xlnx-efuse.c b/hw/nvram/xlnx-efuse.c
> index 29e7dd539ec..176e88fcd17 100644
> --- a/hw/nvram/xlnx-efuse.c
> +++ b/hw/nvram/xlnx-efuse.c
> @@ -280,6 +280,8 @@ static void efuse_class_init(ObjectClass *klass, void *data)
>   
>       dc->realize = efuse_realize;
>       device_class_set_props(dc, efuse_properties);
> +    /* Reason: Part of Xilinx SoC */
> +    dc->user_creatable = false;
>   }
>   
>   static const TypeInfo efuse_info = {

Reviewed-by: Thomas Huth <thuth@redhat.com>