[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 03/11] s390x: store cpu states inside machine
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v1 03/11] s390x: store cpu states inside machine state |
Date: |
Thu, 31 Aug 2017 16:29:30 +0200 |
On Thu, 31 Aug 2017 15:11:28 +0200
David Hildenbrand <address@hidden> 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.
- [Qemu-devel] [PATCH v1 00/11] next round of s390x cleanups, David Hildenbrand, 2017/08/30
- Re: [Qemu-devel] [PATCH v1 03/11] s390x: store cpu states inside machine state, David Hildenbrand, 2017/08/31
- Re: [Qemu-devel] [PATCH v1 03/11] s390x: store cpu states inside machine state, Thomas Huth, 2017/08/31
- Re: [Qemu-devel] [PATCH v1 03/11] s390x: store cpu states inside machine state, David Hildenbrand, 2017/08/31
- Re: [Qemu-devel] [PATCH v1 03/11] s390x: store cpu states inside machine state, Thomas Huth, 2017/08/31
[Qemu-devel] [PATCH v1 04/11] s390x: get rid of s390-virtio.c, David Hildenbrand, 2017/08/30