qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC


From: BALATON Zoltan
Subject: Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC
Date: Sat, 6 Aug 2022 11:38:23 +0200 (CEST)

On Fri, 5 Aug 2022, BALATON Zoltan wrote:
On Fri, 5 Aug 2022, Peter Maydell wrote:
On Fri, 5 Aug 2022 at 17:50, BALATON Zoltan <balaton@eik.bme.hu> wrote:
This also
allows to get the cpu without a link with something like:

PPC4XX_MACHINE(current_machine /* or qdev_get_machine() */)->soc.cpu

...and now you have device code that's making assumptions about
the machine and SoC it's in.

Since these devices are strictly part of this SoC making this asumption should be OK. Making assumption about the machine may be a valid argument

I think this is my really last comment on this topic but I can't stop thinking about this. If we can't user parent or get the cpu any other way and we have to use a link property then we probably need a PPC4xxSocDevice abstract class that has the cpu link and all these devices derive from that. That way the boilerplate for the link property is confined to this SocDevice class and does not have to be repeated in every other SoC device. Unless QOM properties don't work that way and they would need to be aliased in which case it does not bring anything.

Regards,
BALATON Zoltan



reply via email to

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