qemu-devel
[Top][All Lists]
Advanced

[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.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]