Re: [RFC PATCH 9/9] hw/mips/itu: Pass SAAR using QOM link property

2023-02-13 Thread Jiaxun Yang
> 2023年2月3日 11:36,Philippe Mathieu-Daudé 写道: > > QOM objects shouldn't access each other internals fields > except using the QOM API. > > mips_cps_realize() instantiates a TYPE_MIPS_ITU object, and > directly sets the 'saar' pointer: > > if (saar_present) { > s->itu.saar =

[RFC PATCH 9/9] hw/mips/itu: Pass SAAR using QOM link property

2023-02-03 Thread Philippe Mathieu-Daudé
QOM objects shouldn't access each other internals fields except using the QOM API. mips_cps_realize() instantiates a TYPE_MIPS_ITU object, and directly sets the 'saar' pointer: if (saar_present) { s->itu.saar = >CP0_SAAR; } In order to avoid that, pass the MIPS_CPU object via a QOM