qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 00/19] hw: Set QDev properties using QDev API (part 1/3)


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 00/19] hw: Set QDev properties using QDev API (part 1/3)
Date: Fri, 3 Feb 2023 19:12:26 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

On 3/2/23 19:08, Philippe Mathieu-Daudé wrote:
QEMU provides the QOM API for core objects.
Devices are modelled on top of QOM as QDev objects.

There is no point in using the lower level QOM API with
QDev; it makes the code more complex and harder to review.

I first converted all the calls using errp=&error_abort or
&errp=NULL, then noticed the other uses weren't really
consistent.

A QDev property defined with the DEFINE_PROP_xxx() macros
is always available, thus can't fail. When using hot-plug
devices, we only need to check for optional properties
registered at runtime with the object_property_add_XXX()
API. Some are even always registered in device instance_init.

I have probably been overzealous, so I tagged the patches
not using errp=&error_abort|&error_fatal|NULL as RFC.

PPC and ARM conversions will follow as two different series.

  46 files changed, 155 insertions(+), 221 deletions(-)

Forgot to mention, this is based on
20230203163021.35754-1-philmd@linaro.org/">https://lore.kernel.org/qemu-devel/20230203163021.35754-1-philmd@linaro.org/
"hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'"

Based-on: <20230203163021.35754-1-philmd@linaro.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]