From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C631FB6F07 for ; Sun, 4 Jul 2010 08:42:43 +1000 (EST) Subject: Re: [PATCH 27/27] KVM: PPC: Add Documentation about PV interface From: Benjamin Herrenschmidt To: Alexander Graf In-Reply-To: References: <1277980982-12433-1-git-send-email-agraf@suse.de> <1277980982-12433-28-git-send-email-agraf@suse.de> Content-Type: text/plain; charset="UTF-8" Date: Sun, 04 Jul 2010 08:42:36 +1000 Message-ID: <1278196956.4200.390.camel@pasglop> Mime-Version: 1.0 Cc: kvm-ppc@vger.kernel.org, linuxppc-dev , KVM list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 2010-07-02 at 20:41 +0200, Alexander Graf wrote: > The u64s are 64-bit aligned, should they always be? > > That's obvious, isn't it? And the ABI only specifies u64s to be 32 bit > aligned, no? At least that's what ld and std specify. No, the PowerPC ABI specifies u64's to be 64-bit aligned, even for 32-bit binaries. Ben. > > > >> +The "ld" and "std" instructions are transormed to "lwz" and "stw" > instructions > >> +respectively on 32 bit systems with an added offset of 4 to > accomodate for big > >> +endianness. > > > > Will this add never overflow? Is there anything that checks for it? > > It basically means that to access dar, we either do > > ld rX, DAR(0) > > or > > lwz rX, DAR+4(0) > > > > > >> +mtmsrd rX, 0 b > >> +mtmsr b > > > > mtmsr rX > > Nod.