From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGyAW-0001e2-6v for qemu-devel@nongnu.org; Wed, 17 Jun 2009 12:39:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGyAR-0001VK-Bu for qemu-devel@nongnu.org; Wed, 17 Jun 2009 12:39:23 -0400 Received: from [199.232.76.173] (port=58411 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGyAR-0001Us-1B for qemu-devel@nongnu.org; Wed, 17 Jun 2009 12:39:19 -0400 Received: from gecko.sbs.de ([194.138.37.40]:16282) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MGyAQ-0001df-DK for qemu-devel@nongnu.org; Wed, 17 Jun 2009 12:39:18 -0400 Message-ID: <4A391C28.2010603@siemens.com> Date: Wed, 17 Jun 2009 18:39:04 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1243972429-7972-1-git-send-email-froydnj@codesourcery.com> <200906022256.24790.paul@codesourcery.com> <878wjsyoxk.fsf@brigitte.kvy.fi> <200906162025.54533.paul@codesourcery.com> In-Reply-To: <200906162025.54533.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] fix gdbstub support for multiple threads in usermode, v2 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org, ananaza@iki.fi Paul Brook wrote: > On Tuesday 16 June 2009, Antti P Miettinen wrote: >> Paul Brook writes: >>> Using threads for CPU emulation is just plain wrong. >>> >> Could you elaborate a bit? I've sort of assumed that to get reasonable >> performance out of emulating a parallel target on a parallel host, > > You have taken this comment out of context. > > Exposing multiple CPUs as threads to GDB is incorrect. Each CPU has its own > MMU (i.e. address space), so they should be exposed as processes, not threads. Exposing them as processes isn't fitting either. As stated by Daniel, we need a "multicore" model (or however we may call it) for gdb. Until someone "finds" the resources to work on this, qemu's current approach to expose VCPUs as threads is a pragmatic workaround that covers many use cases completely and even quite a few more when you deal with the restrictions properly. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux