From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDEEN-0002py-B7 for qemu-devel@nongnu.org; Wed, 15 Jun 2016 13:03:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDEE9-0000fb-EU for qemu-devel@nongnu.org; Wed, 15 Jun 2016 13:03:54 -0400 Received: from 7.mo6.mail-out.ovh.net ([46.105.59.196]:48416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDEE9-0000fN-2g for qemu-devel@nongnu.org; Wed, 15 Jun 2016 13:03:41 -0400 Received: from player738.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo6.mail-out.ovh.net (Postfix) with ESMTP id 10596FFA91D for ; Wed, 15 Jun 2016 19:03:40 +0200 (CEST) References: <1464694565-16784-1-git-send-email-clg@kaod.org> <574D9F0F.7060904@redhat.com> <574D9FBB.60100@kaod.org> <574DA17D.5070505@redhat.com> <575EDE86.6080201@kaod.org> <575EE3B7.5080209@redhat.com> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <57618A66.3070604@kaod.org> Date: Wed, 15 Jun 2016 19:03:34 +0200 MIME-Version: 1.0 In-Reply-To: <575EE3B7.5080209@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] m25p80: fix test on blk_pread() return value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Peter Crosthwaite , Kevin Wolf , Max Reitz , qemu-block@nongnu.org, qemu-devel@nongnu.org Hello Eric, On 06/13/2016 06:47 PM, Eric Blake wrote: > On 06/13/2016 10:25 AM, C=C3=A9dric Le Goater wrote: >=20 >> >> It seems that commit 243e6f69c129 ("m25p80: Switch to byte-based block= access")=20 >> is bringing another issue : >> >> qemu-system-arm: /home/legoater/work/qemu/qemu-ast2400-mainline.git/bl= ock/io.c:1252: bdrv_aligned_pwritev: Assertion `!qiov || bytes =3D=3D qio= v->size' failed. >> Aborted (core dumped) >=20 > Can you provide a more complete stack dump, and/or a recipe on how to > repeat the assertion? Here you are, it is a bit long ... =20 You need to get a few files : * an OpenBMC kernel :=20 wget https://openpower.xyz/job/openbmc-build/distro=3Dubuntu,target=3Dpa= lmetto/lastSuccessfulBuild/artifact/images/palmetto/cuImage * an OpenBMC rootfs :=20 wget https://openpower.xyz/job/openbmc-build/distro=3Dubuntu,target=3Dpa= lmetto/lastSuccessfulBuild/artifact/images/palmetto/obmc-phosphor-image-p= almetto.cpio.gz * an OpenBMC flash image containing the above (with which we should boot = someday) :=20 wget https://openpower.xyz/job/openbmc-build/distro=3Dubuntu,target=3Dpa= lmetto/lastSuccessfulBuild/artifact/images/palmetto/flash-palmetto * an OpenPower flash image for the host :=20 wget https://openpower.xyz/job/openpower-op-build/distro=3Dubuntu,target= =3Dpalmetto/lastSuccessfulBuild/artifact/images/palmetto.pnor Clone this qemu branch which adds to the ast24000 SOC its SPI/SMC control= lers: https://github.com/legoater/qemu/commits/aspeed-ssi The extra commits bring : ast2400: add SMC controllers (FMC and SPI) ast2400: add SPI flash slave object ast2400: create SPI flash slaves hw/arm/ast2400.c | 31 +++ hw/arm/palmetto-bmc.c | 3 + hw/ssi/Makefile.objs | 1 + hw/ssi/aspeed_smc.c | 451 +++++++++++++++++++++++++++++++++++++= +++++++ include/hw/arm/ast2400.h | 3 + include/hw/ssi/aspeed_smc.h | 105 +++++++++++ 6 files changed, 594 insertions(+) create mode 100644 hw/ssi/aspeed_smc.c create mode 100644 include/hw/ssi/aspeed_smc.h and these, but we don't really care : m25p80: fix test on blk_pread() return value ssi: change ssi_slave_init to be a realize ops Compile with arm-softmmu, should be enough, and run with : qemu-system-arm -m 256 -M palmetto-bmc -kernel ./cuImage -initrd ./obmc= -phosphor-image-palmetto.cpio.gz -mtdblock ./flash-palmetto -mtdblock ./p= almetto.pnor -snapshot -nographic -nodefaults -monitor stdio -serial pty = -S When booted, log with root/OpenBmc and run : dd if=3D/dev/zero of=3D/dev/mtd0 you should get : (qemu) qemu-system-arm: .../block/io.c:1243: bdrv_aligned_pwritev: Asser= tion `!qiov || bytes =3D=3D qiov->size' failed. Aborted (core dumped) If there are some messages like : qemu-system-arm: aspeed_smc_flash_read: flash not in usermode This is because a userspace tool is trying to access the host flash image (./palmetto.pnor) but the support for linear addressing mode is not in the branch yet. you can ignore them. If you have read up to here, that probably means you might try the above :) I wish I had a simpler way, but no ... we need to work on=20 some unit test I guess. Thanks, C.