Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp93075iof; Sun, 5 Jun 2022 22:08:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxcVvY2TokCus12HnQ0oV7FMUBscaRG0v4W42V4Ynfju+Z1vNi9BIhpIvST69VBINEBD3d X-Received: by 2002:a63:83c6:0:b0:3fd:dfd2:a34a with SMTP id h189-20020a6383c6000000b003fddfd2a34amr686053pge.190.1654492102012; Sun, 05 Jun 2022 22:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654492102; cv=none; d=google.com; s=arc-20160816; b=k1Jga/25GjYP4Dsh+u57xrNhNw4Nqq+NgwwCp3tpron4HpiL5Z6ngZtREfzb7Xqz0K /NNQXrKijVavrvsCEJulUyWvL9uqR5y+z4yGZ0jjPMcGfdsmlxUE5QDxbCb6jjfyhnYn 5rRD3VRak7IwEHYy/sh82a4tzhtCW2Ed0FhxAzhols9IqycPHOwE5A8GIauYDGwd6Za+ rrCUcucNlmMLSFL25uEqScz/ISdGxSbpssihlXyjI70btfF+P0DmYbuW0KCmdbQynEXP uHceKGcyiuqYWePhVdFC33uaSPovZco+pvryvFdEgfWlwMMd+CaZLfLEyF6+7iAsDGsC PhXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xSlVDrcC6ThhuqFYVSDbH5zX5O/WG80a5ABV8+/WiYc=; b=G8FP9WhdH6bXmsMqGMfPdRJnKDdnX9En2hnD7b9L1Y5eskZw7SxA5Ks8lOawyVZ0Wz VzXixGWB5tKJVpg+tu+SxgQUe06ttjklZnbBGqJ1IBmoQ8TOGj1BTehsaEHcaXv6bN7h SVSKNil3yJijSn0HQ8s/FdJFI2uxStM54IMqRRTLTOX6jhWL0vviOE66oKPZijhMqkIT RRycgTHTjDOLFbSK699HikSc5tnxNMdygJ4iXXyrgGaLlaqsf/R05Tcv+yXfUtQqHZ35 tf7kRb4GyfXP91bwVEzCHiY7+oWLcbQkarPz7IytFmwIfq9j1Nh6+4sFsTiTUSEABNow dObg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=jaXFhDCS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b5-20020a056a00114500b0051bf49524basi8359328pfm.284.2022.06.05.22.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:08:22 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=jaXFhDCS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B4BE8813DB; Sun, 5 Jun 2022 21:20:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349315AbiFCWNs (ORCPT + 99 others); Fri, 3 Jun 2022 18:13:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234075AbiFCWNr (ORCPT ); Fri, 3 Jun 2022 18:13:47 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E7251E3F1 for ; Fri, 3 Jun 2022 15:13:46 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id j10so14602512lfe.12 for ; Fri, 03 Jun 2022 15:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xSlVDrcC6ThhuqFYVSDbH5zX5O/WG80a5ABV8+/WiYc=; b=jaXFhDCS8i3EMl+QHJtBD5GpPr5TQXbP2mE+ZuLw9VbjZMEY7AVTB//49N2rYgKc0j GjdW3v6cfPeBGqpOD+aZtY/rh+QlkTnf+Pnjf5ErLzn27MclKpSjJXZtF3dkvr8bICm/ rW4E1nRdwfRFb4hjEXPugXZD44dkyt/sGRopzgsj021Jg3FnT3asCMUjXEMd2tT7/Z3C 1AYAjXIg8B81YEqSmimrxPk1jYZRTVhuNBRGLI8LEcZD8cZvMQNJEPADEeYfS99sKYfZ /5SWpfwDusOzwIMwRhDtIT+W0a96l0AhulLR9NKYAQeFzhmqkn77KfW8Yy9pvkLX8QMh ENJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xSlVDrcC6ThhuqFYVSDbH5zX5O/WG80a5ABV8+/WiYc=; b=UxCXvh7xIVuxUUOggUlL1df2QsW+KHXLeLkkLKnY/75fnN2LsTNLgjjWBfqQu7E3F1 9dotJGYpU/vEDW6CSpOsK+zqRsWdlkwuVBSBpv1H30AnT+V3YJra1iszV2Xa8axjadB7 Ne1quXSUiLsgx45Sia6CA0OvC/ZIlUIxpz4OrWNEJwLYcDZ3FzOezSwnJEBt67ZdOh7+ ZQ+uTyMj+PdOc8GptwlmCKkeLHwnixJw8upBGfN0GHZydcmI4hSoeGckftSF9ReWpo8o vR9Uo4DwRUmLzAZ7T3pLMxcieL4PAXp7bMF3316BC3C5Tk5MvmNS76Y7zCusTHw/BElw KI9A== X-Gm-Message-State: AOAM532aNFoK9295k4fSGTcJClRYZ5dreWf/3BZTOt0EyowWYCkHJj42 Uv7L1r6zKyYI3W85a2Lu/5FB77kSL6PzchfE6A9N0w== X-Received: by 2002:a05:6512:ad3:b0:479:911:8463 with SMTP id n19-20020a0565120ad300b0047909118463mr8005984lfu.103.1654294424159; Fri, 03 Jun 2022 15:13:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nick Desaulniers Date: Fri, 3 Jun 2022 15:13:32 -0700 Message-ID: Subject: Re: arch/x86/entry/entry: RFC on recent kernels building error with llvm 11.0.2 internal assembler To: Mauro Rossi Cc: Nathan Chancellor , luto@kernel.org, Chih-Wei Huang , Linux Kernel Mailing List , clang-built-linux Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 1, 2022 at 5:57 AM Mauro Rossi wrote: > > On Wed, Jun 1, 2022 at 12:09 AM Nick Desaulniers > wrote: > > > > As Nathan noted, I messed up the commit "ANDROID: x86: entry: work > > around LLVM_IAS=1 bug in LSL". Please see: > > https://android-review.googlesource.com/c/kernel/common/+/1521061 > > https://android-review.googlesource.com/c/kernel/common/+/1560152/ > > > > If you're using an older toolchain, you'll need just the first. If > > you're using a newer toolchain, you'll need BOTH (or none, including > > dropping "ANDROID: x86: entry: work around LLVM_IAS=1 bug in LSL"). > > Thanks Nick, > > I had already applied the squashed commit composed of "ANDROID: x86: > entry: work around LLVM_IAS=1 bug in LSL" (the one using .quad) and > "ANDROID: x86: entry: fix LSL open coding", so I have already: > > .macro LOAD_CPU_AND_NODE_SEG_LIMIT reg:req > movq $__CPUNODE_SEG, \reg > +#ifdef __clang__ > +.long 0xc0030f48 LGTM > +#else > lsl \reg, \reg > +#endif > .endm > > > So in principle my kernel image should boot when built with LLVM_IAS=1 > but to my surprise all my systems (Sony VAIO i7, Intel NUC DN2820FYKH > with Celeron D2830, Athlon 200GE) are affected by hard reboot when > executing the kernel image Might need more info. Do they boot when LLVM_IAS=0 is explicitly set with your command line invocation of make? i.e. `make LLVM=1 LLVM_IAS=0 ...`? Can you launch these kernels in qemu? > > I'm trying to understand how to build (and boot) with LLVM_IAS=1 and > using clang 11.0.2 shipped with AOSP Android 11 I think this combo should work; we are testing x86_64 with mainline https://github.com/ClangBuiltLinux/continuous-integration2/blob/95b9a12cad31675118d61c26d0b541fa4e3c8f09/generator.yml#L1694 Could be something in your .config files though. -- Thanks, ~Nick Desaulniers