Received: from eggs.gnu.org ([140.186.70.92]:43742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5c7w-0003LO-0q for qemu-devel@nongnu.org; Mon, 19 Sep 2011 07:35:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5c7u-0003e5-Qk for qemu-devel@nongnu.org; Mon, 19 Sep 2011 07:35:07 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: Date: Mon, 19 Sep 2011 13:35:03 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <14529F4D-D8AC-4097-8DF8-5F13EDCCC77F@suse.de> References: <1315989802-18753-1-git-send-email-agraf@suse.de> <1315989802-18753-25-git-send-email-agraf@suse.de> Subject: Re: [Qemu-devel] [PATCH 24/58] PPC: E500: Add PV spinning code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Scott Wood , Yoder Stuart-B08248 , qemu-ppc@nongnu.org, qemu-devel Developers , Aurelien Jarno On 17.09.2011, at 19:40, Blue Swirl wrote: > On Sat, Sep 17, 2011 at 5:15 PM, Alexander Graf wrote: >>=20 >> Am 17.09.2011 um 18:58 schrieb Blue Swirl : >>=20 >>> On Wed, Sep 14, 2011 at 8:42 AM, Alexander Graf = wrote: >>>> CPUs that are not the boot CPU need to run in spinning code to = check if they >>>> should run off to execute and if so where to jump to. This usually = happens >>>> by leaving secondary CPUs looping and checking if some variable in = memory >>>> changed. >>>>=20 >>>> In an environment like Qemu however we can be more clever. We can = just export >>>> the spin table the primary CPU modifies as MMIO region that would = event based >>>> wake up the respective secondary CPUs. That saves us quite some = cycles while >>>> the secondary CPUs are not up yet. >>>>=20 >>>> So this patch adds a PV device that simply exports the spinning = table into the >>>> guest and thus allows the primary CPU to wake up secondary ones. >>>=20 >>> On Sparc32, there is no need for a PV device. The CPU is woken up = from >>> halted state with an IPI. Maybe you could use this approach? >>=20 >> The way it's done here is defined by u-boot and now also nailed down = in the ePAPR architecture spec. While alternatives might be more = appealing, this is how guests work today :). >=20 > OK. I hoped that there were no implementations yet. The header (btw > missing) should point to the spec. IIUC the spec that includes these bits is not finalized yet. It is = however in use on all u-boot versions for e500 that I'm aware of and the = method Linux uses to bring up secondary CPUs. Stuart / Scott, do you have any pointers to documentation where the = spinning is explained? Alex