[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:38:36 +0200 |
On Thu, 31 Aug 2017 16:30:59 +0200
David Hildenbrand <address@hidden> wrote:
> On 31.08.2017 16:29, Cornelia Huck wrote:
> > 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.
> >
>
> Adding patches right now to move everything out of cpu.h that lies under
> the "/* outside of target/s390x/ */" section. :)
>
Ah, you really care about your patch count, don't you? :)
(I think it's a good idea.)
- Re: [Qemu-devel] [PATCH v1 01/11] exec, dump: don't include exec/exec-all.h explicitly, (continued)
- 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