>>>> void icp_set_cppr(ICPState *ss, uint8_t cppr) >>>> @@ -262,7 +261,7 @@ void icp_set_cppr(ICPState *ss, uint8_t cppr) >>>> } >>>> } else { >>>> if (!XISR(ss)) { >>>> - icp_resend(ss); >>>> + icp_resend(XICS_INTERFACE(qdev_get_machine()), ss); >>> >>> Here you're assuming that the machine is the implementor of the xics >>> interface, which is kinda ugly. The ICP should have a pointer to the >>> xics interface, which will eventually replace the pointer to the >>> overall xics object it has now. >> >> yes. I will try improve that. I don't like those calls to >> qdev_get_machine()either. >> >> There are done in a couple of places though, under spapr_cpu_core >> to get XICS for instance. > > Right, but I'm happier with it there, in code that's definitely > associated with a particular machine, rather than in the xics code > which is at least somewhat reusable.
I fixed that with the backlink on the XICSFabric. C.