Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32B18C433EF for ; Tue, 26 Apr 2022 14:33:34 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.313970.531801 (Exim 4.92) (envelope-from ) id 1njMFn-0001wT-BD; Tue, 26 Apr 2022 14:33:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 313970.531801; Tue, 26 Apr 2022 14:33:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1njMFn-0001wM-7j; Tue, 26 Apr 2022 14:33:23 +0000 Received: by outflank-mailman (input) for mailman id 313970; Tue, 26 Apr 2022 14:33:22 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1njMFm-0001wG-1s for xen-devel@lists.xenproject.org; Tue, 26 Apr 2022 14:33:22 +0000 Received: from smarthost01b.ixn.mail.zen.net.uk (smarthost01b.ixn.mail.zen.net.uk [212.23.1.21]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d1c981fe-c56d-11ec-8fc2-03012f2f19d4; Tue, 26 Apr 2022 16:33:20 +0200 (CEST) Received: from [82.70.146.41] (helo=pear.davidvrabel.org.uk) by smarthost01b.ixn.mail.zen.net.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njMFh-0003Fq-Cr; Tue, 26 Apr 2022 14:33:17 +0000 Received: from apple.davidvrabel.org.uk ([82.70.146.43]) by pear.davidvrabel.org.uk with esmtp (Exim 4.94.2) (envelope-from ) id 1njMFf-0018Vq-4c; Tue, 26 Apr 2022 15:33:16 +0100 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d1c981fe-c56d-11ec-8fc2-03012f2f19d4 Message-ID: <0b7c4df3-e6f2-7791-4e8e-9655eb8c6f6f@cantab.net> Date: Tue, 26 Apr 2022 15:33:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Content-Language: en-GB To: Julien Grall , Jan Beulich Cc: Andrew Cooper , George Dunlap , Stefano Stabellini , Wei Liu , David Vrabel , xen-devel@lists.xenproject.org References: <20220425132801.1076759-1-dvrabel@cantab.net> From: David Vrabel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 82.70.146.43 X-SA-Exim-Mail-From: dvrabel@cantab.net Subject: Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on pear.davidvrabel.org.uk) X-Originating-smarthost01b-IP: [82.70.146.41] Feedback-ID: 82.70.146.41 On 26/04/2022 15:14, Julien Grall wrote: > Hi, > > On 26/04/2022 15:01, Jan Beulich wrote: >> On 25.04.2022 15:28, David Vrabel wrote: >>> --- a/xen/common/page_alloc.c >>> +++ b/xen/common/page_alloc.c >>> @@ -162,6 +162,13 @@ >>>   static char __initdata opt_badpage[100] = ""; >>>   string_param("badpage", opt_badpage); >>> +/* >>> + * Heap allocations may need TLB flushes which require IRQs to be >>> + * enabled (except when only 1 PCPU is online). >>> + */ >>> +#define ASSERT_ALLOC_CONTEXT() \ >>> +    ASSERT(!in_irq() && (local_irq_is_enabled() || num_online_cpus() >>> <= 1)) >> >> At least one of these tightened assertions triggers on Arm, as per the >> most recent smoke flight. I'm going to revert this for the time being. > > From the serial console [1]: > > (XEN) Xen call trace: > (XEN)    [<0022a510>] alloc_xenheap_pages+0x120/0x150 (PC) > (XEN)    [<00000000>] 00000000 (LR) > (XEN)    [<002736ac>] arch/arm/mm.c#xen_pt_update+0x144/0x6e4 > (XEN)    [<002740d4>] map_pages_to_xen+0x10/0x20 > (XEN)    [<00236864>] __vmap+0x400/0x4a4 > (XEN)    [<0026aee8>] > arch/arm/alternative.c#__apply_alternatives_multi_stop+0x144/0x1ec > (XEN)    [<0022fe40>] stop_machine_run+0x23c/0x300 An allocation inside a stop_machine_run() action function. That is what the asserts were designed to catch. I did try the run the GitLab CI pipelines but it is setup to use runners that are only available to the Xen Project group, so forking the repo doesn't work. Can my (personal) GitLab be added as a Developer to the Xen Project group? I think this is the intended way for people to run the CI pipelines on their own branches. David