From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49092 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUctk-0003Jb-8g for qemu-devel@nongnu.org; Fri, 02 Jul 2010 05:51:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUcth-0003Ti-S5 for qemu-devel@nongnu.org; Fri, 02 Jul 2010 05:51:03 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:38542) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUcth-0003Tc-Po for qemu-devel@nongnu.org; Fri, 02 Jul 2010 05:51:01 -0400 Received: by gyf2 with SMTP id 2so790785gyf.4 for ; Fri, 02 Jul 2010 02:51:01 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4C2DB681.7060402@redhat.com> Date: Fri, 02 Jul 2010 11:50:57 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <5692464.1280361277887491249.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> <1502374723.1280691277888172604.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 07/01/2010 09:42 PM, Blue Swirl wrote: > I still maintain that 'env' may not be unpoisoned until the name is > less likely to invite accidents. The *global* env is still unavailable (i.e. no difference WRT poisoning), by virtue of being defined in exec.h which is not available unless -DNEED_CPU_H is defined. So: | before | after ------------+---------------------------------+-------------------------- NEED_CPU_H | env not poisoned, global env | same | available iff exec.h included | ------------+---------------------------------+-------------------------- !NEED_CPU_H | env poisoned; CPUState | env not poisoned; | not available, so exec.h cannot | exec.h requires cpu.h | be included | so it cannot be included Paolo