On Thu, 31 Aug 2017 15:11:28 +0200 David Hildenbrand <da...@redhat.com> wrote:
> >> +S390CPU *s390_cpu_addr2state(uint16_t cpu_addr) > >> +{ > >> + S390CcwMachineState *ms = S390_CCW_MACHINE(qdev_get_machine()); > >> + > >> + if (cpu_addr >= max_cpus) { > >> + return NULL; > >> + } > >> + > >> + /* Fast lookup via CPU ID */ > >> + return ms->cpus[cpu_addr]; > >> +} > > > > I wonder whether that function should rather go into a file in > > target/s390x/ instead, since it is also used there and its prototype is > > in cpu.h ? > > I thought about the same thing, but as it works directly on the machine, > like ri_allowed() and friends. So I decided to keep it here for now. > > I'll think about moving the definition also into > include/hw/s390x/s390-virtio-ccw.h It would be a bit nicer.