From patchwork Mon Mar 6 14:13:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Kai" X-Patchwork-Id: 13161218 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 4B91FC678D4 for ; Mon, 6 Mar 2023 14:14:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D9D636B0074; Mon, 6 Mar 2023 09:14:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D4E79280002; Mon, 6 Mar 2023 09:14:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C171E280001; Mon, 6 Mar 2023 09:14:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id AF57D6B0074 for ; Mon, 6 Mar 2023 09:14:46 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 8AECDA0841 for ; Mon, 6 Mar 2023 14:14:46 +0000 (UTC) X-FDA: 80538669372.15.E846750 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by imf03.hostedemail.com (Postfix) with ESMTP id 7A5B420011 for ; Mon, 6 Mar 2023 14:14:44 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=WksUwEYi; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf03.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=1678112084; 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=+kA5rux/hcpfTk1ED8pntVzX5z1xt2ZD6grLDsv18ko=; b=cCJ7rb6F3J81VOudedHEShCbZLvJ7RWyGBFDrVXNHrZiN0hBDGGGGd5dqUoihIDG5u0K79 XyhtBLXO0bI4pq6VbEVzHmJDPiS4aryJx6aN7oiJi+Bx41yMlMC1SsLVKm4APGBLl/gENZ jctflyH76ks2h2c+iiAulDYokW8HyuE= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=WksUwEYi; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf03.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=1678112084; a=rsa-sha256; cv=none; b=kiW9cocauAUkrCq7+ZjzTWQCkMk8jXjpRd8VG3+CohwTf9JjA05QTFqxngh62EtsYTLTa1 ms3uwFUQZNf9qrohujodeb56yRZRemAfBOxXPVibtwC9j8wfT7PO+/zs3cgWdZrAM29lUt Z/0ZMLgBOYtGA77KT8Y+8CxhJ3RmWVg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678112084; x=1709648084; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dSuzXAdQmayBHAPr3LIj7u4EPJ2EUXayNvd7wuACrRk=; b=WksUwEYi6iKPWV+qtXVvlDsSzoDBnmGg7F63jHKOkkSbRO/FE8afdVPS aWSON6qj6VLU0fAZNKbKl4fszwlyLtWUdXyKBnolpHbzcCkXlDYjL0m3c 8HTteZPONLzuqG61YX91ymgq0Ji2zmTguSIRT3xf/qWEx4wp9r1ZkaT5M qnHWy1cKVJghYhQBJFnpJdfqYShTk7UTvpHvbhmJE6VswEu53CQKeR53D MPvm+M+lLE/UgF7ehzgy/jjvPF5Wu0KHfgbL1jinbnBDH7bO04j+KfDpr i88rWPaHY6aaERdqB48bZJDI1TEx4LUHYfmNRvR6fxQf80wcUQjdE0qCM w==; X-IronPort-AV: E=McAfee;i="6500,9779,10641"; a="337080035" X-IronPort-AV: E=Sophos;i="5.98,238,1673942400"; d="scan'208";a="337080035" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 06:14:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10641"; a="765232059" X-IronPort-AV: E=Sophos;i="5.98,238,1673942400"; d="scan'208";a="765232059" Received: from jwhisle1-mobl2.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.212.92.57]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 06:14:39 -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, david@redhat.com, bagasdotme@gmail.com, sagis@google.com, imammedo@redhat.com, kai.huang@intel.com Subject: [PATCH v10 03/16] x86/virt/tdx: Make INTEL_TDX_HOST depend on X86_X2APIC Date: Tue, 7 Mar 2023 03:13:48 +1300 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 7A5B420011 X-Rspamd-Server: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WtdX0qu936IZg17xe2pj6AAt5mSiOqbtIpiMyADxG3ysBqBmwuT541Q+QMSG5De1k8CH5Lbdn3dX0/wcYHIRFQr6Amfbve3Wd8o5hBlytfV3HhFRK7ffDkLYCEoHX9uWQL4DuxqdwhoLk7KWZyApUcfgKJ9c7nh8XGnGsd4fpTfWQAJYsJ6mF0o4iTNtAQglOVK4cNx2ooR5BItDQmzGlNtgYLw2hqf6kCsZGuC71RZG7j7a8xbzxPQ1XGSVAoEEGmXAYrlyhmAtT+H3HJQ== 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 --- 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 fc010973a6ff..6dd5d5586099 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