Received: from [140.186.70.92] (port=59756 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTt5c-0003aD-5p for qemu-devel@nongnu.org; Wed, 30 Jun 2010 04:56:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTt5b-0005f9-2V for qemu-devel@nongnu.org; Wed, 30 Jun 2010 04:56:16 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:36230 helo=mx01.colomx.prod.int.phx2.redhat.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTt5a-0005f1-QY for qemu-devel@nongnu.org; Wed, 30 Jun 2010 04:56:15 -0400 Date: Wed, 30 Jun 2010 04:56:12 -0400 (EDT) From: Paolo Bonzini Message-ID: <1502374723.1280691277888172604.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> In-Reply-To: <5692464.1280361277887491249.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH 4/4] require #define NEED_GLOBAL_ENV for files that need the global register variable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Paul Brook , qemu-devel@nongnu.org >>> Wouldn't it be better to just put this in dyngen-exec.h ? >>> AFAICT there's a direct correlation between NEED_GLOBAL_ENV and #includ= e >>> "exec.h". >> >> True, see cover letter in 0/4. =C2=A0I was told to make each file reques= t >> explicitly the global variable though. =C2=A0So I'd have to leave the #i= fdef even >> if I moved it into dyngen-exec.h. > > Well, I only said I'd rename global 'env' to 'global_reg_env', not > something about each file requesting it. But NEED_GLOBAL_ENV wasn't so > bad idea in my opinion. It doesn't matter what's the name of the global. What matters is whether it's defined at all. For this reason it's bad to bury it in dyngen-exec.h which is included only indirectly. It's better to leave it in all */exec.h files as Paul explained---and I agree with him. I also gave reason why unpoisoning env globally is not a problem at all. For target-dependent files, they did not (and do not) poison anything, so my first patch series didn't change anything WRT current QEMU sources. exec.h always includes cpu.h, so there's no way exec.h can be included by mistake in a target-independent file. I can make exec.h error out if NEED_CPU_H is not defined, but I think it's a worthless complication. =20 So, can someone please apply patches 1 to 3 of this series so that we can move on? Paolo