[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 05/12] arm/virt: Register most properties as class propert
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 05/12] arm/virt: Register most properties as class properties |
Date: |
Wed, 11 Nov 2020 20:03:30 +0000 |
On Wed, 11 Nov 2020 at 18:39, Eduardo Habkost <ehabkost@redhat.com> wrote:
>
> Class properties make QOM introspection simpler and easier, as
> they don't require an object to be instantiated.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: qemu-arm@nongnu.org
> Cc: qemu-devel@nongnu.org
> ---
> hw/arm/virt.c | 76 +++++++++++++++++++++++++++------------------------
> 1 file changed, 41 insertions(+), 35 deletions(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 27dbeb549e..53fcaf5e4f 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -2484,6 +2484,47 @@ static void virt_machine_class_init(ObjectClass *oc,
> void *data)
> NULL, NULL);
> object_class_property_set_description(oc, "acpi",
> "Enable ACPI");
> + object_class_property_add_bool(oc, "secure", virt_get_secure,
> + virt_set_secure);
> + object_class_property_set_description(oc, "secure",
> + "Set on/off to
> enable/disable the ARM "
> + "Security Extensions
> (TrustZone)");
Indent seems to be off here.
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
(Side note: a 37-character function name seems a bit unwieldy.)
thanks
-- PMM