From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alYJ1-0002rS-67 for qemu-devel@nongnu.org; Thu, 31 Mar 2016 04:50:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alYJ0-0004nj-CB for qemu-devel@nongnu.org; Thu, 31 Mar 2016 04:50:19 -0400 References: <1459357980-29330-1-git-send-email-lvivier@redhat.com> <20160331102945.5a31dbe5@voom.fritz.box> <56FCC99C.2030809@suse.de> <56FCCC6A.7000002@redhat.com> <56FCCEA3.5030705@suse.de> From: Thomas Huth Message-ID: <56FCE4C5.1040706@redhat.com> Date: Thu, 31 Mar 2016 10:50:13 +0200 MIME-Version: 1.0 In-Reply-To: <56FCCEA3.5030705@suse.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] target-ppc: Multiple/String Word alignment exception List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , Laurent Vivier , David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On 31.03.2016 09:15, Alexander Graf wrote: >=20 > On 31.03.16 09:06, Laurent Vivier wrote: >> >> On 31/03/2016 08:54, Alexander Graf wrote: >>> >>> On 31.03.16 01:29, David Gibson wrote: >>>> On Wed, 30 Mar 2016 19:13:00 +0200 >>>> Laurent Vivier wrote: >>>> >>>>> If the processor is in little-endian mode, an alignment interrupt m= ust >>>>> occur for the following instructions: lmw, stmw, lswi, lswx, stswi = or stswx. >>>>> >>>>> This is what happens with KVM, so change TCG to do the same. >>>>> >>>>> As the instruction can be emulated by the kernel, enable the change >>>>> only in softmmu mode. >>>>> >>>>> Signed-off-by: Laurent Vivier >>>> >>>> I guess this makes sense given the existing hardware behaviour, even >>>> though it seems a bit perverse to me to make the emulator strictly l= ess >>>> functional. >>>> >>>> Alex, what do you think? >>> >>> In general we only implement strict checks if it breaks guests not to >>> have them. Are you aware of any such case? Well, the new "emulator" test for kvm-unit-tests only works right if this is done correctly ;-) > That's basically what David was trying to say with POWER9. How do you > know that POWER9 still requires strong alignment checks for indexed LE > instructions? If it doesn't, we'd have to add a case in TCG to not the > the checks again. These multiply very quickly :). I'd agree with you in case something is not properly defined in the ISA or marked as implementation specific. But in this case, this behavior is properly documented in the PowerISA spec. IMHO, if something is documented in the ISA, we should follow that behavior in QEMU, too, i.e. add the alignment checks here. And if POWER9 is different, there must be a new version of the PowerISA for this one day ... i.e. we have to make adaptions for that anyway. Thomas