qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 0/5] hw/ppc: Set QDev properties using QDev API (part 2/3)


From: Mark Cave-Ayland
Subject: Re: [PATCH 0/5] hw/ppc: Set QDev properties using QDev API (part 2/3)
Date: Mon, 6 Feb 2023 09:09:01 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 06/02/2023 08:00, Cédric Le Goater wrote:

On 2/3/23 22:16, Philippe Mathieu-Daudé wrote:
part 1 [*] cover:
--
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.

6/8 years ago, we converted models to QOM, supposedly because the qdev
interface was legacy and QOM was the new way. That's not true anymore ?

That is a good question, and something that we really should decide first before going ahead with these changes. My understanding is that architectures with newer machines (particularly ARM and PPC) use QOM APIs directly, however more recently Markus did some improvements to qdev which largely eliminated the gap between the two. Hence why these days the two are mostly interchangeable: the main difference is that qdev has a notion of a parent which can be useful during device modelling.

That said, I am ok with changes, even for the best practices. I would
like to know how to keep track. Do we have a model skeleton/reference ?

Agreed. I've added Peter on CC as I know he has had some thoughts on QOM vs. qdev, but certainly as a reviewer it would be great to know which way we should be heading in the future.


ATB,

Mark.



reply via email to

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