From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRYSA-0007Fe-Nn for qemu-devel@nongnu.org; Thu, 16 Jul 2009 17:25:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRYS4-0007Em-Tp for qemu-devel@nongnu.org; Thu, 16 Jul 2009 17:25:21 -0400 Received: from [199.232.76.173] (port=49048 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRYS4-0007Ec-KY for qemu-devel@nongnu.org; Thu, 16 Jul 2009 17:25:16 -0400 Received: from mail-qy0-f174.google.com ([209.85.221.174]:52430) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRYS4-0006nV-DR for qemu-devel@nongnu.org; Thu, 16 Jul 2009 17:25:16 -0400 Received: by qyk4 with SMTP id 4so432279qyk.4 for ; Thu, 16 Jul 2009 14:25:15 -0700 (PDT) Message-ID: <4A5F9AB8.5060206@codemonkey.ws> Date: Thu, 16 Jul 2009 16:25:12 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] introduce on_vcpu References: <1247590068-565-1-git-send-email-glommer@redhat.com> <4A5F997A.5070508@codemonkey.ws> <20090716212943.GA4019@poweredge.glommer> In-Reply-To: <20090716212943.GA4019@poweredge.glommer> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: Jan Kiszka , aliguori@us.ibm.com, qemu-devel@nongnu.org Glauber Costa wrote: > Yes. Purpose of using curren_env was just to make it look more like qemu-kvm > But I do understand that we'll have to change it anyway for this code to > have any actual value, so I'm fine with using cpu_single_env. > Yeah, if qemu-kvm is introduce another global current CPUState variable, then the qemu-kvm code has to change :-) Since qemu-kvm keeps a thread id in CPUState, it would make more sense to check whether gettid() == env->thread_id, no? >>> + func(data); >>> + return; >>> + } >>> + assert(1); >>> >>> >> Wouldn't assert(env == current_env) or abort() make more sense? >> > abort() is fine. I can change it if you prefer. > Please do. Regards, Anthony Liguori