From patchwork Fri Dec 9 06:52:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Kai" X-Patchwork-Id: 13069297 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 063B7C4167B for ; Fri, 9 Dec 2022 06:53:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9A2638E0007; Fri, 9 Dec 2022 01:53:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 952A68E0001; Fri, 9 Dec 2022 01:53:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7F3B48E0007; Fri, 9 Dec 2022 01:53:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 6790F8E0001 for ; Fri, 9 Dec 2022 01:53:18 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 44C9EA082D for ; Fri, 9 Dec 2022 06:53:18 +0000 (UTC) X-FDA: 80221851276.12.72C5752 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by imf20.hostedemail.com (Postfix) with ESMTP id 5FC991C000E for ; Fri, 9 Dec 2022 06:53:16 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=noQnsf+v; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf20.hostedemail.com: domain of kai.huang@intel.com designates 134.134.136.24 as permitted sender) smtp.mailfrom=kai.huang@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1670568796; 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=P4r3/EN53sj8MztXYfpsm21w58N6eALatw/oxrR+5Dw=; b=xHMa+5cQbaUdvhPRKu9m7gxt2OPWaHjerxyDOxsexaCigBfVG0U/QuhsMyy6QJ7FExYx2I huuVCcgDYAwqglKe9zez+C3l3zCm/vtT06UrgK07V8ZC+os7KyKfGQWB0OytmaFIcvWWc8 uupiYWkNnOKJRMF6jRoMTYGs1IzcLis= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=noQnsf+v; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf20.hostedemail.com: domain of kai.huang@intel.com designates 134.134.136.24 as permitted sender) smtp.mailfrom=kai.huang@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1670568796; a=rsa-sha256; cv=none; b=eijRpD7upYIVvheoPDkr7CtzQYFoG5TU0VRaYddBE7zvwqNta9vRCskZTmkK4OzpxYIV5Y vagmEhYBDlmljcILw229+gVL4J6E1iLPwhbuXK3XfC/y93x/R0SjAKIL1EcYaX5kP/KzHR ijrPKjE2ID8lN0IqEq7txKWD8u/xtTY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670568796; x=1702104796; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CvOOEOyK2b3ch9pD2o6ehuG6OyGC9zRQ6+5y2KsnA+o=; b=noQnsf+vRzgnWLSFBOWDa77igmaP8TXnTLfexxV/Wbx9UYX+rR3Mz3em Xew9Bb5WfFhAU3HuldmD/97JmyMtbaqzl52r1kHcwbrZ6u4zz+q57MhZv L67hBTQXfS1AD0TkQ2IkqMK1fbW9nHGDn7VdsT7JZ/jkg5ggr+PIt7mZg fhPNN+TZf3dPepnCKthpWVvq21fD0lcXzldv+lfLl5R+QTTJ0Ip3OFkKk kLdDCFExTJRcL4X09Y5GnC2+dpSyk0+aSNFLZAZCc0HaxZ+h+deWV1LCZ 1/gbXhtTTJnUorCP3MYnIxXlSjbFPQBm5UbL9SG/IbzUvgQhpE1Nh14fR Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10555"; a="318551291" X-IronPort-AV: E=Sophos;i="5.96,230,1665471600"; d="scan'208";a="318551291" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2022 22:53:16 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10555"; a="679836822" X-IronPort-AV: E=Sophos;i="5.96,230,1665471600"; d="scan'208";a="679836822" Received: from omiramon-mobl1.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.212.28.82]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2022 22:53:11 -0800 From: Kai Huang To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: linux-mm@kvack.org, dave.hansen@intel.com, peterz@infradead.org, tglx@linutronix.de, seanjc@google.com, pbonzini@redhat.com, dan.j.williams@intel.com, rafael.j.wysocki@intel.com, kirill.shutemov@linux.intel.com, ying.huang@intel.com, reinette.chatre@intel.com, len.brown@intel.com, tony.luck@intel.com, ak@linux.intel.com, isaku.yamahata@intel.com, chao.gao@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, bagasdotme@gmail.com, sagis@google.com, imammedo@redhat.com, kai.huang@intel.com Subject: [PATCH v8 03/16] x86/virt/tdx: Make INTEL_TDX_HOST depend on X86_X2APIC Date: Fri, 9 Dec 2022 19:52:24 +1300 Message-Id: <514a6c330ef5fc214d32bcbcc7a77dc825e857df.1670566861.git.kai.huang@intel.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 5FC991C000E X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: dgwmqme55fnomawe6tagqudxbiw59dsr X-HE-Tag: 1670568796-220456 X-HE-Meta: U2FsdGVkX1/FLsV/MEzMrAZO5DdZThdYjl27kskZhgbaJxLXynwW19SmIhRPRzB+ghtyBMNwnmIhpoib2KfTxH9rKwNZblbakZehDvivxYSfc7+nWXNI+RScp/0w8RgRpmfeGA6LcmHyFe4W22Qc0TM0L3uySHO4HAahTzbc5KJc9SQIuArd2gPA8MyEHIdi9dxQ42W94OUJoxh//KKIfyG7nnsCv/uzXEiRsbAHFgoFd/lFqQYNJnB0tITCkK3P3P7TviSEazqAfqbe5a/net4TgM8BxaysuudgbcTiAQLi3Ws5YWDry/cRHgDdjSiPKX7Vj7j/1dt2Z+bKKJ5G9NL3RM2qpoSHqR9SU/B0tH+jE8V60yJzwrHrKFJVM7G/96a7UunpOoLE+vpiwQ112qANvDOjXxyMY6Bfs6/8j5umrZXtWyNPlAdNGEW7J1w1o7AXDWcHdoEBh2M1QZPWYHd07R+C+7ZOStwkNBJmvIOXvN16EKBEiBRonLB2PHh1fAQnmtesiw64A9rRN1IkrzjkKanuVSMkHAYJX/eSOryDvzJN8i76nkxpvz6JvIUz5t8ue4Z37DHnHwvZZknKo/cIoSHOrjBASy3nLKcIs3b1GbBE+NHI1IlIr/Hio9+CLlLZ2YO1+dJjmXHlgANOQlf5mBeVnztPuEoBTa4/Gh3G6G7CafHbnxN5NalCGefWyjBLeV8vhqzz3jaoXS0s7OSD5EXMDyhhOp5jbLM+FF8ZAi4E91tyGmioN0fidOF+WJ6z4/6yFiirVo7vokk6gTYFRPae1d0psjdKlHCxgFtdX8wjafLOxhy0L654eu1NPi7s/DYvjc1TThxGL5/mWM3+FVtrKW87PcvLBGmHmzXD1tq0R/YHG0yopO9f8RxfbBv6vWuAJIKeZbGsfBFGgWW4tuFqaiT3+wD9e9Bo35JpmX6evz2TovZENpelZMhwEVl7abVgzNw= 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 --- 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 cced4ef3bfb2..dd333b46fafb 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1958,6 +1958,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