From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzlOY-0008Ak-Em for qemu-devel@nongnu.org; Thu, 18 Jul 2013 06:25:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzlOX-000179-5g for qemu-devel@nongnu.org; Thu, 18 Jul 2013 06:25:10 -0400 Message-ID: <51E7C27F.2000408@suse.de> Date: Thu, 18 Jul 2013 12:25:03 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1371398269-6213-1-git-send-email-afaerber@suse.de> <1371398269-6213-20-git-send-email-afaerber@suse.de> <51E40D93.40806@redhat.com> <51E41341.4090103@suse.de> <51E41573.1000207@redhat.com> In-Reply-To: <51E41573.1000207@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu v2 19/29] cpu: Replace cpu_single_env with CPUState cpu_single_cpu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , Anthony Liguori , qemu-devel@nongnu.org, Alexander Graf , Blue Swirl , =?UTF-8?B?SGVydsOpIFBvdXNzaW5lYXU=?= , Paul Brook , Scott Wood , qemu-ppc , Aurelien Jarno , Richard Henderson Am 15.07.2013 17:29, schrieb Paolo Bonzini: > Il 15/07/2013 17:20, Andreas F=C3=A4rber ha scritto: >> 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 tha= t >> 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 i= t >> 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. >=20 > I'm not sure why it couldn't have stayed in cpu-all.h, but I must be > missing something. :) You're missing TARGET_WORDS_BIGENDIAN on line 39, target_ulong further down, CPUArchState in cpu_copy() and cpu_abort(), etc. By placing it in a header that does not have this baggage, some timer and intc devices in this series were able to drop their dependency on cpu.h in favor of qom/cpu.h and be built in common-obj-y rather than obj-= y. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg