Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2568403rdb; Mon, 4 Dec 2023 00:47:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFR8boBGIXWcwyKcCj1RhqfOBCMC51p5gS5grIEg+E3DMh1eqx3EYCkyMKNZYEw2HVo1BPB X-Received: by 2002:a05:6870:c87:b0:1ef:bacc:e4d2 with SMTP id mn7-20020a0568700c8700b001efbacce4d2mr4055414oab.28.1701679665035; Mon, 04 Dec 2023 00:47:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701679665; cv=none; d=google.com; s=arc-20160816; b=A8dRKmPRYtpT/sW2Smu5oLqyGrVMv+IVXallo52SGJa4WNU3BlTNTMWVsM+ArD2bxz kel+nbOun+lp4gb0dt44filACecJXOjiHPjSuT/emLVA/zMo5K9PpDSWS1W4qjpQ+xFv EWFHS/VUBugXV3HMimOJT1Zt78uYs2OvBuTsOdyulsWsps5kn7ebJo/6K01XIVWrKMAp QZI7sJj3xfkIpub5XYg4KvFEUHQca+YTZfpjMa/gEgaDCvEzjVrzzXlwkIvF5AIklhyx qL7BPw9A9tb+QNu6kVmI94nYc38ycFemw9tLyOoGVmxDv3UwTN1qbfIb/4MofleEysCI 2QEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ahyPWEOheWRxdqak223ujWwOM2gfMujolK5nPqTYHBE=; fh=DIG2rmMGi8rSUA3ilME18yR6TrTxGC9HMvxONYLGF4I=; b=DscEQ3JhINVIZjswie8nRvxG4DsTYAum9p/Bf4zBB3RE3qGX4QXMMZ4EzWy+IukteM +OqN+NWGyeSpFAEjoIH96kHYxIEHlGy/f1P1vFahQ+8csthNaZqxb9ITJFI6W0nyq9DH XJKofk18FzCdonyQagmJde9QfnHJisEo9+EhZzhBVJ6bKjPu4VObn1ezwrJ0Z5zkDKq8 P2xanb20A0hjtUbioe4lTmb6/iCxXrDyHLdYblRA3ym/QZVW2OjrhtDOVGSOO3QLyR+C t5gGr8ZArEFVrwzTX4AVP2Kt9kqZjnNg+KX5baYjBKMHPoiG912wt4lBI4J+WTG8F0CQ 5P2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bt3tvQd1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id t15-20020a63460f000000b005b8f24e6526si7441193pga.234.2023.12.04.00.47.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 00:47:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bt3tvQd1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id EEADA8068866; Mon, 4 Dec 2023 00:47:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232573AbjLDIrY (ORCPT + 99 others); Mon, 4 Dec 2023 03:47:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230154AbjLDIrX (ORCPT ); Mon, 4 Dec 2023 03:47:23 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBD4C9B for ; Mon, 4 Dec 2023 00:47:29 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EB18C433C8; Mon, 4 Dec 2023 08:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701679649; bh=yWpIH3H9GnySfKiZ2biNF5eZOOjjW8G9znn26WMmWq8=; h=From:To:Cc:Subject:Date:From; b=Bt3tvQd17fxJG1QhyKLzWmqZhTgFXCUi8NohfV/BqaRjuxBDL9Fj93TEqKVCQ3prU cECFd3wX7hGQ1ZsUi1sVIDMP1aDiiYTgo30xsobza+llJl7HUKfOl7kkwRGQroloEl yd2Q8qCHNPURUuMjaU/6j+kOWycz0WtS3sXUOyrE3qfJ0RfyJuklEFWgs1tcOV3oXr x869c6XKfR4pe6BA3BUr8dc6woUP3GgRaQiA0e9xzy5syhPrdc0yyIIv0EFZ11zBg+ El8TBWLd6TH3ElkOkDmVHbNPpODQxtFJYZbsMQLOInyjm0yqJ75sqGIHTuYHICIIgG yggzDxlBMAi+Q== From: Arnd Bergmann To: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: Arnd Bergmann , Boris Ostrovsky , "H. Peter Anvin" , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] x86/xen: add CPU dependencies for 32-bit build Date: Mon, 4 Dec 2023 09:47:01 +0100 Message-Id: <20231204084722.3789473-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 04 Dec 2023 00:47:40 -0800 (PST) From: Arnd Bergmann Xen only supports modern CPUs even when running a 32-bit kernel, and it now requires a kernel built for a 64 byte (or larger) cache line: In file included from : In function 'xen_vcpu_setup', inlined from 'xen_vcpu_setup_restore' at arch/x86/xen/enlighten.c:111:3, inlined from 'xen_vcpu_restore' at arch/x86/xen/enlighten.c:141:3: include/linux/compiler_types.h:435:45: error: call to '__compiletime_assert_287' declared with attribute error: BUILD_BUG_ON failed: sizeof(*vcpup) > SMP_CACHE_BYTES arch/x86/xen/enlighten.c:166:9: note: in expansion of macro 'BUILD_BUG_ON' 166 | BUILD_BUG_ON(sizeof(*vcpup) > SMP_CACHE_BYTES); | ^~~~~~~~~~~~ Enforce the dependency with a whitelist of CPU configurations. In normal distro kernels, CONFIG_X86_GENERIC is enabled, and this works fine. When this is not set, still allow Xen to be built on kernels that target a 64-bit capable CPU. Fixes: db2832309a82 ("x86/xen: fix percpu vcpu_info allocation") Signed-off-by: Arnd Bergmann --- arch/x86/xen/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index 9b1ec5d8c99c..a65fc2ae15b4 100644 --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig @@ -9,6 +9,7 @@ config XEN select PARAVIRT_CLOCK select X86_HV_CALLBACK_VECTOR depends on X86_64 || (X86_32 && X86_PAE) + depends on X86_64 || (X86_GENERIC || MPENTIUM4 || MCORE2 || MATOM || MK8) depends on X86_LOCAL_APIC && X86_TSC help This is the Linux Xen port. Enabling this will allow the -- 2.39.2