From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 774967803CE for ; Thu, 18 Apr 2024 17:41:01 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=+ccMaRKCbsRnnh8yEkHGkocSC3OINpiwDsO06dP9nCI=; c=relaxed/simple; d=groups.io; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References:Organization:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20240206; t=1713462060; v=1; b=kLcluWXdVa5dfd0gdTRoY7AcNS3zWWCrva8KmAnLVdlWYy958XCzh1ydvytCHtzKW1O4Z0B1 4w7Z8E4hT8abIxqOAyf2Jl332o1jOuiLRYJZOWyPIfSjCmle/ufIJtNzcmD1+oXZNNRlNnBaRIW tfHMsDnVwoJBxJWZpBhHF9IJuXg77WqAXY6Wt74/IZgZqCyZB2stXvelaZWf7YPxR7K1GS5ODFD +GtpPrMAY9WTOKNmHj397bFZ6URQbmzpXbJwEkr1AAezM0++ZDnRYWuEnXIcX6lj6d0yQMmnC+y AhEkZrqDUkFXYgdld/jN+BNJSrlXE29z9xW96ILmH1C4Q== X-Received: by 127.0.0.2 with SMTP id qWVTYY7687511x3EaQTU5OtL; Thu, 18 Apr 2024 10:41:00 -0700 X-Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mx.groups.io with SMTP id smtpd.web11.408.1713462058272760916 for ; Thu, 18 Apr 2024 10:40:58 -0700 X-Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VL4l02Jmqz6JB0K; Fri, 19 Apr 2024 01:38:52 +0800 (CST) X-Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 93BC7140D1A; Fri, 19 Apr 2024 01:40:55 +0800 (CST) X-Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 18 Apr 2024 18:40:55 +0100 Date: Thu, 18 Apr 2024 18:40:54 +0100 From: "Jonathan Cameron via groups.io" To: Jonathan Cameron via , CC: Jonathan Cameron , Richard Henderson , , Philippe =?ISO-8859-1?Q?Mathieu-Daud=E9?= , Idan Horowitz , , Subject: Re: [edk2-devel] [PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled Message-ID: <20240418183600.00000345@huawei.com> In-Reply-To: <20240418091555.00006666@Huawei.com> References: <20240301204110.656742-1-richard.henderson@linaro.org> <20240301204110.656742-6-richard.henderson@linaro.org> <20240416161111.0000607c@huawei.com> <0c878d25-3fbb-4f0b-bc9e-ca638f8c4f1e@linaro.org> <20240418091555.00006666@Huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. MIME-Version: 1.0 X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100005.china.huawei.com (7.191.160.25) To lhrpeml500005.china.huawei.com (7.191.163.240) Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 18 Apr 2024 10:40:58 -0700 Resent-From: jonathan.cameron@huawei.com Reply-To: devel@edk2.groups.io,jonathan.cameron@huawei.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: EwcF2kJ0UcApaHzVsDmp1kYSx7686176AA= Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=kLcluWXd; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io On Thu, 18 Apr 2024 09:15:55 +0100 Jonathan Cameron via wrote: > On Wed, 17 Apr 2024 13:07:35 -0700 > Richard Henderson wrote: >=20 > > On 4/16/24 08:11, Jonathan Cameron wrote: =20 > > > On Fri, 1 Mar 2024 10:41:09 -1000 > > > Richard Henderson wrote: > > > =20 > > >> If translation is disabled, the default memory type is Device, which > > >> requires alignment checking. This is more optimally done early via > > >> the MemOp given to the TCG memory operation. > > >> > > >> Reviewed-by: Philippe Mathieu-Daud=E9 > > >> Reported-by: Idan Horowitz > > >> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1204 > > >> Signed-off-by: Richard Henderson = =20 > > >=20 > > > Hi Richard. > > >=20 > > > I noticed some tests I was running stopped booting with master. > > > (it's a fun and complex stack of QEMU + kvm on QEMU for vCPU Hotplug = kernel work, > > > but this is the host booting) > > >=20 > > > EDK2 build from upstream as of somepoint last week. > > >=20 > > > Bisects to this patch. > > >=20 > > > qemu-system-aarch64 -M virt,gic-version=3D3,virtualization=3Dtrue -= m 4g,maxmem=3D8G,slots=3D8 -cpu cortex-a76 -smp cpus=3D4,threads=3D2,cluste= rs=3D2,sockets=3D1 \ > > > -kernel Image \ > > > -drive if=3Dnone,file=3Dfull.qcow2,format=3Dqcow2,id=3Dhd \ > > > -device ioh3420,id=3Droot_port1 -device virtio-blk-pci,drive=3Dhd \ > > > -netdev user,id=3Dmynet,hostfwd=3Dtcp::5555-:22 -device virtio-net-= pci,netdev=3Dmynet,id=3Dbob \ > > > -nographic -no-reboot -append 'earlycon root=3D/dev/vda2 fsck.mode= =3Dskip tp_printk' \ > > > -monitor telnet:127.0.0.1:1235,server,nowait -bios QEMU_EFI.fd \ > > > -object memory-backend-ram,size=3D4G,id=3Dmem0 \ > > > -numa node,nodeid=3D0,cpus=3D0-3,memdev=3Dmem0 > > >=20 > > > Symptoms: Nothing on console from edk2 which is built in debug mode s= o is normally very noisy. > > > No sign of anything much happening at all :( =20 > >=20 > > This isn't a fantastic bug report. > >=20 > > (1) If it doesn't boot efi, then none of the -kernel parameters are nec= essary. > > (2) I'd be surprised if the full.qcow2 drive parameters are necessary e= ither. > > But if they are, what contents? Is a new empty drive sufficient, = just > > enough to send the bios through the correct device initialization? > > (3) edk2 build from ... > > Well, this is partly edk2's fault, as the build documentation is a= wful. > > I spent an entire afternoon trying to figure it out and gave up. > >=20 > > I will say that the edk2 shipped with qemu does work, so... are you abs= olutely > > certain that it isn't a bug in edk2 since then? Firmware bugs are exac= tly what > > that patch is supposed to expose, as requested by issue #1204. > >=20 > > I'd say you should boot with "-d int" and see what kind of interrupts y= ou're getting very=20 > > early on. I suspect that you'll see data aborts with ESR xx/yy where t= he last 6 bits of=20 > > yy are 0x21 (alignment fault). =20 >=20 > Hi Richard, >=20 > Sorry for lack of details, I was aware it wasn't great and should have st= ated I planned > to come back with more details when I had time to debug. Snowed under so= for now I've > just dropped back to 8.2 and will get back to this perhaps next week. +CC EDK2 list and Gerd. Still not a thorough report but some breadcrumbs. May be something about my local build setup as the shipped EDK2 succeeds, but the one I'm building via uefi-tools/edk2-build.sh armvirtqemu64 (some aged instructions here that are more or less working still) https://people.kernel.org/jic23/ Indeed starts out with some alignment faults. Gerd, any ideas? Maybe I needs something subtly different in my edk2 build? I've not looked at this bit of the qemu infrastructure before - is there a document on how that image is built? As Richard observed, EDK2 isn't the simplest thing to build - I've been using uefitools for this for a long time, so maybe I missed some new requirement? Build machine is x86_64 ubuntu, gcc 12.2.0. I need to build it because of some necessary tweaks to debug a PCI enumeration issue in Linux. (these tests were without those tweaks) As Richard observed, most of the command line isn't needed. qemu-system-aarch64 -M virt,virtualization=3Dtrue, -m 4g -cpu cortex-a76 \ -bios QEMU_EFI.fd -d int Jonathan =20 >=20 > Jonathan >=20 > >=20 > >=20 > > r~ =20 >=20 >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117998): https://edk2.groups.io/g/devel/message/117998 Mute This Topic: https://groups.io/mt/105602816/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-