[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH qom-cpu v2 19/29] cpu: Replace cpu_single_env with

From: Andreas Färber
Subject: Re: [Qemu-ppc] [PATCH qom-cpu v2 19/29] cpu: Replace cpu_single_env with CPUState cpu_single_cpu
Date: Mon, 15 Jul 2013 17:20:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7

Am 15.07.2013 16:56, schrieb Paolo Bonzini:
> Il 16/06/2013 17:57, Andreas Färber ha scritto:
>> Move it to qom/cpu.h.
> Hmm, why move it to qom/cpu.h?  Isn't it an implementation detail that
> there is a current CPU?

We have some ugly include chains - yes, it shouldn't be here forever.
Just like the qemu/log.h situation is pretty unsatisfactory (I wouldve
liked to place log_cpu_state() into qom/cpu.h but it depends in
qemu-common.h and even ignoring that didn't build for all targets
depending on include order inside cpu.h and of cpu.h).
What we need is (a) header(s) that allows use of CPUState type and that
doesn't use CPUArchState or other target-specifics. I believe the
benefits of getting rid of CPUArchState outweigh the choice of qom/cpu.h
here, which has been serving as a dumpbin for some now
CPUState-dependent functions living in exec.c or cpus.c, too, simply
because CPUState is guaranteed to be available there and to separate it
from anything that still needs to be seen through similar to cpu-qom.h
vs. cpu.h. If you have a spontaneous suggestion I'd be all ears.


SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

reply via email to

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