From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73C51C433EF for ; Tue, 7 Sep 2021 14:01:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3199660F14 for ; Tue, 7 Sep 2021 14:01:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3199660F14 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:37942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNbf9-0001Gp-3j for qemu-devel@archiver.kernel.org; Tue, 07 Sep 2021 10:01:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNbOu-0001BN-R5 for qemu-devel@nongnu.org; Tue, 07 Sep 2021 09:44:39 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:44724) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNbOr-0004Cv-NQ for qemu-devel@nongnu.org; Tue, 07 Sep 2021 09:44:36 -0400 Received: by mail-wm1-x32e.google.com with SMTP id l7-20020a1c2507000000b002e6be5d86b3so2278266wml.3 for ; Tue, 07 Sep 2021 06:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WkJEILKIhdl3VRNi+o6WcfgG/yP64dQ+4mkD99PbiSY=; b=XhJXnn6iv7V1MGRg9ZkLlas1IdzwsXckNYuZK2QugSrgr+IfNKJJ0bjcJUQrbOyr06 LrfxDlXRmjDHEcq0HrnbYOTSRwoM4wrJZM+Ife7R6e9gh7FUvhrPEb3WftwjnB1PhOH/ CMO0ofcZwZM6h4zBz0fBtTOJtRddgsWWEmuypIxs17tSO4BiVN97qpK0J877R15g7w8r JDwnyFjnqEGDKCPfCv6bPiegXwWT3pNCJfsgQpeCXegUUTW6ZK1CqAAsnCUxN7hVuZwG LEJIpqS92a/QTzlmsNdNxmFzQZf2l07YM7a194bNQnqguxs/jRbFHNkgr9Y5jk7ichEl AmFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WkJEILKIhdl3VRNi+o6WcfgG/yP64dQ+4mkD99PbiSY=; b=ceKlhjGyftdy1ec4A6WXx/Ph+2FoPLPpaf4Gx/x6eoHr8Kv78FMOlbFgL9iverAc95 TeBW1ZDGm7ScbKcN54FGU0s3oatLJS1ZDcAwxZCvTEMnBohIpXqWiTpLRnLsojaDPm1z 8uDwhnNMaIKZSkwGs9QGQNPHxCPeCj8Q1tKEJTWtpinZonUBGQwMa5BnsMBgIhcSYlUt jiB9k49f7c5L6KhTyPHBzi+bu7KKxdKXkLVyQgIR2NtEiaeASiaxcKXfojvHHpVBvZWP mFdsqOLk40wR8Il7n1PHGSg0xm3hasgVl6ZYovLcTSOEX+rMToR0lIyZkWSkp8R8jDLO ESoQ== X-Gm-Message-State: AOAM533SzZyiT35SrPAnDsrWoKVexv/3pG2pqValaGpBs0KXXqxcrQyt RccSfSgvKgyl3CV0VCE5akazsw== X-Google-Smtp-Source: ABdhPJznwkAIj2BBCM00XE8Pt6l/jHjtuDBdb65PfqgK9fRTDong02ISge3DaBIZvF7SqOG/fhi2pQ== X-Received: by 2002:a7b:cd92:: with SMTP id y18mr4120310wmj.78.1631022271773; Tue, 07 Sep 2021 06:44:31 -0700 (PDT) Received: from [192.168.1.165] ([139.47.33.227]) by smtp.gmail.com with ESMTPSA id r129sm2357134wmr.7.2021.09.07.06.44.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Sep 2021 06:44:31 -0700 (PDT) Subject: Re: [PATCH v5 17/31] target/arm: Enforce alignment for LDM/STM To: Nathan Chancellor References: <20210419202257.161730-1-richard.henderson@linaro.org> <20210419202257.161730-18-richard.henderson@linaro.org> From: Richard Henderson Message-ID: <0699da7b-354f-aecc-a62f-e25693209af4@linaro.org> Date: Tue, 7 Sep 2021 15:44:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-2.332, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-arm@nongnu.org, llvm@lists.linux.dev, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 8/31/21 2:51 AM, Nathan Chancellor wrote: > I just bisected a boot hang with an LLVM-built multi_v7_defconfig + > CONFIG_THUMB2_KERNEL=y kernel down to this commit. I do not see the same > hang when the kernel is compiled with GCC 11.2.0 and binutils 2.37 nor > do I see a hang with multi_v7_defconfig by itself. Is there something > that LLVM is doing wrong when compiling/assembling/linking the kernel or > is there something wrong/too aggressive with this commit? I can > reproduce this with current QEMU HEAD (ad22d05833). > > My QEMU invocation is: > > $ qemu-system-arm \ > -append "console=ttyAMA0 earlycon" \ > -display none \ > -initrd rootfs.cpio \ > -kernel zImage \ > -M virt \ > -m 512m \ > -nodefaults \ > -no-reboot \ > -serial mon:stdio > > and the rootfs.cpio and zImage files can be found here: > > https://github.com/nathanchance/bug-files/tree/15c1fd6e44622a3c27823d2c5c3083dfc7246146/qemu-2e1f39e29bf9a6b28eaee9fc0949aab50dbad94a Hmm. I see IN: 0xc13038e2: e890 008c ldm.w r0, {r2, r3, r7} R00=c13077ca R01=c11a8058 R02=c11a8058 R03=c031737f R04=48379000 R05=00000024 R06=c031748d R07=c03174bb R08=412fc0f1 R09=c0ce9308 R10=50c5387d R11=00000000 R12=00000009 R13=c1501f88 R14=c0301739 R15=c13038e2 PSR=200001f3 --C- T svc32 Taking exception 4 [Data Abort] ...from EL1 to EL1 ...with ESR 0x25/0x9600003f ...with DFSR 0x1 DFAR 0xc13077ca So, yes, it's a ldm from an address % 4 = 2, so it is correct that we should trap. You should see the same trap on real hw. r~