From patchwork Mon Jun 26 14:12:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Kai" X-Patchwork-Id: 13292971 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DD3DEB64D7 for ; Mon, 26 Jun 2023 14:13:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C1CF78D0005; Mon, 26 Jun 2023 10:13:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BCBE78D0001; Mon, 26 Jun 2023 10:13:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A93548D0005; Mon, 26 Jun 2023 10:13:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 9C9068D0001 for ; Mon, 26 Jun 2023 10:13:56 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6AA8E14072C for ; Mon, 26 Jun 2023 14:13:56 +0000 (UTC) X-FDA: 80945092872.12.BD28586 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by imf09.hostedemail.com (Postfix) with ESMTP id 3CAF514002B for ; Mon, 26 Jun 2023 14:13:53 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=cwkOaqLA; spf=pass (imf09.hostedemail.com: domain of kai.huang@intel.com designates 134.134.136.126 as permitted sender) smtp.mailfrom=kai.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1687788833; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=1Z0IxpQtYmTH1b2hLR67a4g50Ljq67r4iNXqiDKupvk=; b=FBn9uvY4hIPPjJLWmDjmTtEDIGM42kJHSip2Ts0dU8tbnE/m/tKl2mIHzceTBWHOxAzCnA wlSlvCux5YXxQrts4GyKAmwjfgA3+6v5unDxkj6fFh/HEufmOQH6ZKEp+5NnDsrTx+0blh K6qo02tsZm537bADLs+Lm2puvr/qhCc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687788833; a=rsa-sha256; cv=none; b=YT3+LeMxy8cXA34bJe4H4DSnS5lCK2rTaUApghM/jqbNw3miYeSy2R2DNEyc6PUvjSi7mm EG41Hdp9l6yok7eiWDoeetj8IwaUHBYobhwS1uXzOWcyrZ/xtbUWUL0tgB1Tk7ysSnHybF 99Mlwa8IuZOn7YuRxBAyUW/T55R3ypQ= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=cwkOaqLA; spf=pass (imf09.hostedemail.com: domain of kai.huang@intel.com designates 134.134.136.126 as permitted sender) smtp.mailfrom=kai.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687788833; x=1719324833; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UcselnuuZdl/x5uBa9vVdTh1BZxikIkr1yVlrBvuRMQ=; b=cwkOaqLAaWo0x1aGyDRWFE5J8WhbfXXGRYdDhhUFeezgyilzFqF/rQev ciBG9PaMcP2AYzcjnVb8yfNYqq9WpiiJYojHYbGiUXawebCY24Q4NUKB7 dU33y2aZxeA7X0TUSXFirQAd0AM7TMuU2rTy5HwiZ2CVNUHNULHeSwMoh vCjbsxO2tSjVMPV12p7xFjr6WxkBeP9vgLPleFuLQgMD799gCnDlQC6k8 GpVe9vUlHk8/TJE5TQxG51+lhOo3Crqrx3IdaMd354NeZy1dwsX/6uQUu /iVt3Y0yNUX4xMuOvjowyVnX6jvRqV6p8W6xQoy8uwmrrMBv0TPXS6N1p A==; X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="346033579" X-IronPort-AV: E=Sophos;i="6.01,159,1684825200"; d="scan'208";a="346033579" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 07:13:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="890292251" X-IronPort-AV: E=Sophos;i="6.01,159,1684825200"; d="scan'208";a="890292251" Received: from smithau-mobl1.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.213.179.223]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 07:13:45 -0700 From: Kai Huang To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: linux-mm@kvack.org, x86@kernel.org, dave.hansen@intel.com, kirill.shutemov@linux.intel.com, tony.luck@intel.com, peterz@infradead.org, tglx@linutronix.de, bp@alien8.de, mingo@redhat.com, hpa@zytor.com, seanjc@google.com, pbonzini@redhat.com, david@redhat.com, dan.j.williams@intel.com, rafael.j.wysocki@intel.com, ashok.raj@intel.com, reinette.chatre@intel.com, len.brown@intel.com, ak@linux.intel.com, isaku.yamahata@intel.com, ying.huang@intel.com, chao.gao@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, nik.borisov@suse.com, bagasdotme@gmail.com, sagis@google.com, imammedo@redhat.com, kai.huang@intel.com Subject: [PATCH v12 03/22] x86/virt/tdx: Make INTEL_TDX_HOST depend on X86_X2APIC Date: Tue, 27 Jun 2023 02:12:33 +1200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 3CAF514002B X-Rspam-User: X-Stat-Signature: ex5jhgycmr6gde4ien5i7mf81fpadfrj X-Rspamd-Server: rspam03 X-HE-Tag: 1687788832-516601 X-HE-Meta: U2FsdGVkX18Oee+3rqTGThyXhi94Eu8W1EJMKSIn+dL1Dl3Ot95Mnjw55EYphYferJmWTxZECHxq3BlfYM8rSqtVp5mE9ac+5K4ZEtZ3d7o8NOOiwL8p9mhaCEyI3zifT6qdMtVeJi/rB9NibIWudcMQjBmAgyJv8++fJwj8OAleMZdNlSwkkctdkdKljCEPMyE4moM396sYZn99SEf8L6DCIXVNHZTAA0Gl+9X9sWKNdxOz2nX7eNp9mHtKKN2UJCbDqCnBDrGfn/3QlqTaJJ8ROzq5rWPqbB8WjDP5QoxOwVhilBWtZDwPS7jMO2uxEkBJ9UPQntFNFPSC7LDgGWASSmRdoNWschwjhsaslctISDOIQc+k3r2IZIatdzERCmns7Z58lvT+p2krJ3gULk0TSUR0HuXvbHpAsesKhKPyz8xt4n7b0yWFeYQ4erwdGN5ocnriHBWxeLCanAPcy0/xwTGdwYi7L/RXkvkFnZUquLa/BS4cQ/RutgXkCHGjLFFkmt3F7h5EdNCqeYb8iCZihULk1n8nmX1wioNc2ZUR5L4d7Z6GeyqU7xGuSg8H1yyNjbHq8Am06dOVRuOcUiyPBsU29vblJqtC0qUbZWJlFRiwJ0juMGu2WBxdj0U7ns/l4UkhnZy2r6y5JDJBxemPsV+f3KQdK7YkdloIPMz1ImsROQT4NBfYTCLdGYZzwtiH0/czT7pvB5o7gMJ4ZDtI0xdHcA9xpTEgF+ZHe9TlpVJ3d4yqjtqSPEN4/UGftAb1dDltVhQ2X7nFCOT0Ltpn3z1fDjOb1n21oBPZOpscOb1ZHfkD8F1QJHsY2Ut9UGiPtShNv3uGeVmTgxOymBqcSJFSlnkEpM19CGtljehHBBbPJewBPSxuK6rI+tuYj8mQxeWGdMCCd8Vif3eK1u9HmRCcAMxq9tI5lkYIqdrc0PV4TT1W7Ivlq7D7ciUJs5xiAOQkKmcAax+Z6ZB ZM4OqU3t WWojeFsvx1+IMxnuJhBPRzf8jPcaLWVQQ638BAModv+jJk1RKHUWYiZU0k2ywkpqRBn7bTMEB6LCP9VevI7HB0sdFn7bM4ytik5Dp737PNCkLwUUGCWqdLBTDv8251tYsySYzTlxUzdBD4FgyEYibigPc2pvFZXZY+KYZ86WbQGyt7tCBEl0Wq1ktUj79cwP4PP+5l9EiYtvJLP+a5W52oPPQ+PisDW6hQVGnxBCIuBi2yQQNXpBlEZ7y+BFsePzGwhO2SzUESLvYW7SCSX4XGJlA/MvoCTivKNl+ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: TDX capable platforms are locked to X2APIC mode and cannot fall back to the legacy xAPIC mode when TDX is enabled by the BIOS. TDX host support requires x2APIC. Make INTEL_TDX_HOST depend on X86_X2APIC. Link: https://lore.kernel.org/lkml/ba80b303-31bf-d44a-b05d-5c0f83038798@intel.com/ Signed-off-by: Kai Huang Reviewed-by: Dave Hansen Reviewed-by: David Hildenbrand Reviewed-by: Kirill A. Shutemov --- v11 -> v12: - Added Kirill's Reviewd-by. v10 -> v11: - Added David's Reviewed-by. v9 -> v10: - No change. v8 -> v9: - Added Dave's Reviewed-by. v7 -> v8: (Dave) - Only make INTEL_TDX_HOST depend on X86_X2APIC but removed other code - Rewrote the changelog. v6 -> v7: - Changed to use "Link" for the two lore links to get rid of checkpatch warning. --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 191587f75810..f0f3f1a2c8e0 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1957,6 +1957,7 @@ config INTEL_TDX_HOST depends on CPU_SUP_INTEL depends on X86_64 depends on KVM_INTEL + depends on X86_X2APIC help Intel Trust Domain Extensions (TDX) protects guest VMs from malicious host and certain physical attacks. This option enables necessary TDX