From patchwork Tue Jun 6 23:38:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 104154 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3744214vqr; Tue, 6 Jun 2023 16:57:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6yLPCzO5vsgS1kBz23/rRt3Sa+AeJV6gl+3LZr1nKtsI9nOcedF51WpuDbUmqv2SCjuN5J X-Received: by 2002:a05:6e02:151:b0:335:7e65:dfa with SMTP id j17-20020a056e02015100b003357e650dfamr4898316ilr.30.1686095875244; Tue, 06 Jun 2023 16:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686095875; cv=none; d=google.com; s=arc-20160816; b=O3mhryyA52cY1a+2r39VlD4zF1fydST7aRAoksrS0ZJA3YuP00F5lTNoxXLvEp77i9 F7o6uYOGd5FMXPxW/TF+9zhuanN1gvItoIk/L5syNJhhMMDODOIACOYA9Ju7FcKKaZLn QUpMMNGJVSOSkI/qV/IhYJws0P946jRxR6SMK9mJwRvh3mviCtEk0jaFT/vLE1hjOGHC 4kLRG3I5IQ0WZ554cw/qHGJpoDK1qNcH4AQLo076N2BAYZYfFcELd3Z22FTHuZvxRljD MzqxJnOz7oeDdl6fQkMB7GA6dUGxZ8O+eeonGw8joYvheOtXMXXAjw/aMl8TG5H/Okqz BDjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=Equul31tyb3rOZreGt/tUeXVvhpBwBra9uCHyHhfYvY=; b=kKRkjchsM6D4c/hmim2Lzerf3WzoQ1w/kaDY4NNMCRIVCtWqcHH3B5JpPENxDrkxVG KhOHMDkTjy1fgKW5BpPqaReey50UOz65KpCZwVv3N2RmBXHeMCv5O6t12dqR8QeIVxwg RKjxsQv9xcgdB+tUoj5RJwoAIyEIY023d2V3IK17RgM707xiosLBeb9g5j1bHtXlalRt ArWOVfsJMqGclO9wtIRnll7yCroAX6KohGyDUKY7wTfCEPLDprsnJLXN012abAuPHs9M J1hGGF4isLj6oxXBKaMjBRaoClSOweuY5SRw28BFJa+T8BhIwrPAY0G5bPvT/imQ7LH8 LjWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="BTs02gl/"; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r16-20020a638f50000000b00530b135eae9si8083477pgn.119.2023.06.06.16.57.41; Tue, 06 Jun 2023 16:57:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="BTs02gl/"; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240118AbjFFXie (ORCPT + 99 others); Tue, 6 Jun 2023 19:38:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239876AbjFFXi0 (ORCPT ); Tue, 6 Jun 2023 19:38:26 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61E711712; Tue, 6 Jun 2023 16:38:20 -0700 (PDT) Date: Tue, 06 Jun 2023 23:38:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686094698; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Equul31tyb3rOZreGt/tUeXVvhpBwBra9uCHyHhfYvY=; b=BTs02gl/3qbZ9L9+y0j9rD2S+Y3iEGId2wdyCJfg2cxMEl22dN7Z5aD/uIltoE64VELgay GRC6SHnJY4zuOFkfrA/9bCHga8j6lymr5CSwFixQZbzhek/AxzKf2mIRq30cAOk1vsf2XN p/rSobeYErXcVsDTmvAjNVbXdUP97tn5CMQwOASCr36bALcorWOyPUB11ykLuWoPeEq50T xMJwlVv6rP1wUiJZLcKGHYQQ/f4bHPjhkPMhHpk+KdfCJI9QToh1XptxUCO36x8R74KMnV xCn7BYhEBXKnYxEpULqWVgDDYgM8b+pAsU7o/H9TPqf7Or9SIGYQ7OLQ42IN8A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686094698; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Equul31tyb3rOZreGt/tUeXVvhpBwBra9uCHyHhfYvY=; b=b3WtUVf21vNP6qD6s8I5fJCKk+s56ha0WzUgL7lRXLUaZnCeE/kn4sPCVN92KP8wJAklav 06GIH7Y60/sefJBg== From: "tip-bot2 for Kirill A. Shutemov" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/tdx] x86/mm: Fix enc_status_change_finish_noop() Cc: "Kirill A. Shutemov" , Dave Hansen , Kuppuswamy Sathyanarayanan , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <168609469763.404.15773231678482556597.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767999668351435616?= X-GMAIL-MSGID: =?utf-8?q?1767999668351435616?= 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 AuthorDate: Tue, 06 Jun 2023 12:56:22 +03:00 Committer: Dave Hansen 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 Signed-off-by: Dave Hansen Reviewed-by: Kuppuswamy Sathyanarayanan 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; }