From nobody Wed May 15 14:19:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=raptorengineering.com ARC-Seal: i=1; a=rsa-sha256; t=1695767958; cv=none; d=zohomail.com; s=zohoarc; b=AmXNZstd0xOU3OfTDHxuYJkG0wfNG8dT/5XABqUKyRzWWy1NOcD5c+3fg77WOpzRwF2LQLzsRRF1UP1tFwacCGhZFAjTsDjPyc9vQiSOG/i8frIlTKfdQ/Q4yX27N+b8NuUicwEMqKrXsIEpEFpF2kvuNtDaTFysFS3AM1yOGaE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695767958; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=34z+XO3iFnnbea1oH9CHpJPde99KYi0yOabtl66Tq90=; b=VuWd3QepEIb/L1LKGLN61QrIb5M54SKjHw5LLb0NF82NVBERVbphsI8lwKKfjwkR4OoUnYfymikMG2mRX58r+iUv0w9HyDgD3r4le/3nkr1goH+JbDNIjdNZc5uYrl4ilAkXxknJXwUiUREO195otELL/kY2rk0zzgar7mG2xzA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1695767958463455.98857587665475; Tue, 26 Sep 2023 15:39:18 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.608551.947105 (Exim 4.92) (envelope-from ) id 1qlGha-0005uZ-Co; Tue, 26 Sep 2023 22:38:46 +0000 Received: by outflank-mailman (output) from mailman id 608551.947105; Tue, 26 Sep 2023 22:38:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qlGha-0005uS-A9; Tue, 26 Sep 2023 22:38:46 +0000 Received: by outflank-mailman (input) for mailman id 608551; Tue, 26 Sep 2023 22:38:45 +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 1qlGhZ-0005uH-58 for xen-devel@lists.xenproject.org; Tue, 26 Sep 2023 22:38:45 +0000 Received: from raptorengineering.com (mail.raptorengineering.com [23.155.224.40]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 71e05ee3-5cbd-11ee-9b0d-b553b5be7939; Wed, 27 Sep 2023 00:38:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 07A998285AAD; Tue, 26 Sep 2023 17:38:32 -0500 (CDT) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 4b0SZ9vwVaO2; Tue, 26 Sep 2023 17:38:31 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 6C3FB8285690; Tue, 26 Sep 2023 17:38:31 -0500 (CDT) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id iZDDmjElaz6e; Tue, 26 Sep 2023 17:38:31 -0500 (CDT) Received: from raptor-ewks-026.rptsys.com (5.edge.rptsys.com [23.155.224.38]) by mail.rptsys.com (Postfix) with ESMTPSA id E650282854B0; Tue, 26 Sep 2023 17:38:30 -0500 (CDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 71e05ee3-5cbd-11ee-9b0d-b553b5be7939 DKIM-Filter: OpenDKIM Filter v2.10.3 mail.rptsys.com 6C3FB8285690 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raptorengineering.com; s=B8E824E6-0BE2-11E6-931D-288C65937AAD; t=1695767911; bh=34z+XO3iFnnbea1oH9CHpJPde99KYi0yOabtl66Tq90=; h=From:To:Date:Message-Id:MIME-Version; b=syvMnWBUdMYXOT8hXBKcjoRoBsaHqzI0c9ym6YWtwUprP38/x5EvjuSfqMMDKu4yp FHPeSIRS3nCOTy4QXoWJIotFIQbqEeUrXUs44KmFDArrMbmeQRD+pMWhc8Oq8Ljrq5 nl7tR4R/Ov2NRQYgNy1rAt8MPKfcyEtaxdzVLS24= X-Virus-Scanned: amavisd-new at rptsys.com From: Shawn Anastasio To: xen-devel@lists.xenproject.org Cc: Timothy Pearson , Shawn Anastasio , Doug Goldstein , Stefano Stabellini , Michal Orzel , Jan Beulich Subject: [PATCH v3 1/2] automation: Change build script to use arch defconfig Date: Tue, 26 Sep 2023 17:37:38 -0500 Message-Id: <5baa15904c5bb5f8d668c67519ad08293c32982d.1695767747.git.sanastasio@raptorengineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @raptorengineering.com) X-ZM-MESSAGEID: 1695767959208100003 Content-Type: text/plain; charset="utf-8" Change automation build script to call the make defconfig target before setting CONFIG_DEBUG and extra options. This fixes issues on Power where the build fails without using the ppc64_defconfig. Reported-by: Jan Beulich Signed-off-by: Shawn Anastasio Reviewed-by: Stefano Stabellini --- v3: Drop unnecessary sed. v2: No changes. automation/scripts/build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/automation/scripts/build b/automation/scripts/build index b4edcf010e..b3c71fb6fb 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -22,7 +22,10 @@ if [[ "${RANDCONFIG}" =3D=3D "y" ]]; then # RANDCONFIG implies HYPERVISOR_ONLY HYPERVISOR_ONLY=3D"y" else - echo "CONFIG_DEBUG=3D${debug}" > xen/.config + # Start off with arch's defconfig + make -C xen defconfig + + echo "CONFIG_DEBUG=3D${debug}" >> xen/.config if [[ -n "${EXTRA_XEN_CONFIG}" ]]; then echo "${EXTRA_XEN_CONFIG}" >> xen/.config -- 2.30.2 From nobody Wed May 15 14:19:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=raptorengineering.com ARC-Seal: i=1; a=rsa-sha256; t=1695767960; cv=none; d=zohomail.com; s=zohoarc; b=K+EEk94K+RLXLU45BGPXfOYseGZvwHT5ZlHTYjBLfTQ38sBqHHJP6AxFPepwn3WSZ+SmNKmAO5QHoLG6BZrCPfEUJ9BE0AT8wyhkI4Tf0kha70AQcIjnLnUDUJGPl2uoSgRM6JFPbBfbBXM0Vsw7YMsELFbzjUwPJ3NJWwTXKWc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695767960; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dSS9Fhkavs/AL0LupSPA21rO1FT/CXYU0GWi1j4YJNM=; b=Q+QNW6cPgKAa8VQLcAgM/5nopm2+5GG3S9lzimYsKx5XyxThw/P4AgvZ3Gx9dRO/u8kGSMbBZu7SLUSX9/V0Goovljqtx/huYcbP5v1GsnhXeFFY3rVyZoOj8a6FIopeWoet+sWS2QlXeL2AoT/itPCicgIkKReHdxhLOl6p+aM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1695767960167126.25083671859363; Tue, 26 Sep 2023 15:39:20 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.608553.947126 (Exim 4.92) (envelope-from ) id 1qlGhc-0006Oa-TG; Tue, 26 Sep 2023 22:38:48 +0000 Received: by outflank-mailman (output) from mailman id 608553.947126; Tue, 26 Sep 2023 22:38:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qlGhc-0006OT-PR; Tue, 26 Sep 2023 22:38:48 +0000 Received: by outflank-mailman (input) for mailman id 608553; Tue, 26 Sep 2023 22:38:46 +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 1qlGha-0005uH-R7 for xen-devel@lists.xenproject.org; Tue, 26 Sep 2023 22:38:46 +0000 Received: from raptorengineering.com (mail.raptorengineering.com [23.155.224.40]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 71e017bf-5cbd-11ee-9b0d-b553b5be7939; Wed, 27 Sep 2023 00:38:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 941B6828548F; Tue, 26 Sep 2023 17:38:32 -0500 (CDT) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id RU8ZbbAtZ0_b; Tue, 26 Sep 2023 17:38:32 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 0ECBE8286987; Tue, 26 Sep 2023 17:38:32 -0500 (CDT) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2PHqCNn3ZY9o; Tue, 26 Sep 2023 17:38:31 -0500 (CDT) Received: from raptor-ewks-026.rptsys.com (5.edge.rptsys.com [23.155.224.38]) by mail.rptsys.com (Postfix) with ESMTPSA id 5AE0A828548F; Tue, 26 Sep 2023 17:38:31 -0500 (CDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 71e017bf-5cbd-11ee-9b0d-b553b5be7939 DKIM-Filter: OpenDKIM Filter v2.10.3 mail.rptsys.com 0ECBE8286987 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raptorengineering.com; s=B8E824E6-0BE2-11E6-931D-288C65937AAD; t=1695767912; bh=dSS9Fhkavs/AL0LupSPA21rO1FT/CXYU0GWi1j4YJNM=; h=From:To:Date:Message-Id:MIME-Version; b=YUyv1Ek0BRLry0KFMuGSEq3230DYH2I5EpYzQz7hbr/W77RiS7UGHejuT2mpxgdHo kOvOP3irPyTWgLwv6SfOB61GH2ciCAr66ihyzcEIanEtPjZuiMuAMbV0jcDywvYYRY bAghSIcB0W+41FsMW2NGUDf90QBTVcIp+sYIAIr0= X-Virus-Scanned: amavisd-new at rptsys.com From: Shawn Anastasio To: xen-devel@lists.xenproject.org Cc: Timothy Pearson , Shawn Anastasio , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH v3 2/2] xen/common: Add NUMA node id bounds check to page_alloc.c/node_to_scrub Date: Tue, 26 Sep 2023 17:37:39 -0500 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @raptorengineering.com) X-ZM-MESSAGEID: 1695767960961100005 Content-Type: text/plain; charset="utf-8" When building for Power with CONFIG_DEBUG unset, a compiler error gets raised inside page_alloc.c's node_to_scrub function: common/page_alloc.c: In function 'node_to_scrub.part.0': common/page_alloc.c:1217:29: error: array subscript 1 is above array bounds of 'long unsigned int[1]' [-Werror=3Darray-bounds] 1217 | if ( node_need_scrub[node] ) It appears that this is a false positive, given that in practice cycle_node should never return a node ID >=3D MAX_NUMNODES as long as the architecture's node_online_map is properly defined and initialized, so this additional bounds check is only to satisfy GCC. Signed-off-by: Shawn Anastasio Reviewed-by: Stefano Stabellini --- v2: Add comment to explain the bounds check. xen/common/page_alloc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 35d9a26fa6..9b5df74fdd 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -1211,6 +1211,14 @@ static unsigned int node_to_scrub(bool get_node) } while ( !cpumask_empty(&node_to_cpumask(node)) && (node !=3D local_node) ); + /* + * In practice `node` will always be within MAX_NUMNODES, but GCC = can't + * always see that, so an explicit check is necessary to avoid tri= pping + * its out-of-bounds array access warning (-Warray-bounds). + */ + if ( node >=3D MAX_NUMNODES ) + break; + if ( node =3D=3D local_node ) break; -- 2.30.2