linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip: x86/tdx] x86/mm: Fix enc_status_change_finish_noop()
@ 2023-06-06 23:38 tip-bot2 for Kirill A. Shutemov
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Kirill A. Shutemov @ 2023-06-06 23:38 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Kirill A. Shutemov, Dave Hansen, Kuppuswamy Sathyanarayanan, x86,
	linux-kernel

The following commit has been merged into the x86/tdx branch of tip:

Commit-ID:     94142c9d1bdf1c18027a42758ceb6bdd59a92012
Gitweb:        https://git.kernel.org/tip/94142c9d1bdf1c18027a42758ceb6bdd59a92012
Author:        Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
AuthorDate:    Tue, 06 Jun 2023 12:56:22 +03:00
Committer:     Dave Hansen <dave.hansen@linux.intel.com>
CommitterDate: Tue, 06 Jun 2023 16:24:27 -07:00

x86/mm: Fix enc_status_change_finish_noop()

enc_status_change_finish_noop() is now defined as always-fail, which
doesn't make sense for noop.

The change has no user-visible effect because it is only called if the
platform has CC_ATTR_MEM_ENCRYPT. All platforms with the attribute
override the callback with their own implementation.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://lore.kernel.org/all/20230606095622.1939-4-kirill.shutemov%40linux.intel.com
---
 arch/x86/kernel/x86_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index f230d4d..6466431 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -131,7 +131,7 @@ struct x86_cpuinit_ops x86_cpuinit = {
 static void default_nmi_init(void) { };
 
 static bool enc_status_change_prepare_noop(unsigned long vaddr, int npages, bool enc) { return true; }
-static bool enc_status_change_finish_noop(unsigned long vaddr, int npages, bool enc) { return false; }
+static bool enc_status_change_finish_noop(unsigned long vaddr, int npages, bool enc) { return true; }
 static bool enc_tlb_flush_required_noop(bool enc) { return false; }
 static bool enc_cache_flush_required_noop(void) { return false; }
 static bool is_private_mmio_noop(u64 addr) {return false; }

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-06 23:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 23:38 [tip: x86/tdx] x86/mm: Fix enc_status_change_finish_noop() tip-bot2 for Kirill A. Shutemov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).