Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6874617rwd; Tue, 6 Jun 2023 03:16:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5VJs82CY4TR0Uije30GtrZ2sggFgg2CZITIAWZfWQkMxzh8JodW+v/QLb6oveRNNh4K4we X-Received: by 2002:a05:620a:438b:b0:75d:5a17:abb with SMTP id a11-20020a05620a438b00b0075d5a170abbmr1438417qkp.57.1686046606504; Tue, 06 Jun 2023 03:16:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686046606; cv=none; d=google.com; s=arc-20160816; b=ktsAg8C0dXSEJgKwUu/6HPveJL7Tnb7NFa+q+5+pUD9FL9Wt0RBy0umWTXv/2qA/yF Up7voxMgfUJW+v3IHSEnEjgpkTn6W9Izc+HW5y48Y6l/jLw9Ndf67iDvmt5ZmHtffcdF 9ND2JssQRned4rExsa9Fyd6jjgkxx7Cv31ayvnxKcQnqkEXtD2b08u7gIG827h2lEMZ8 1zqC2MQT04lAjWk1fuqi+tsUXn4f+tEYoXpm7Y2DNezPXFJiGkgnBgI3EIbQc2y9bmvy DCa/qSEO+5llINdcgs4CjKdahYonXYa07VdTM5yJhM9SPwNTdsypbv5I6Fwlr7xmX2Bc nDLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tKLRM3caoZvBKL3YmQ7NiEoTe3Jf7IorLEJnq6ZTj9c=; b=L3H10psM4uXDZ7pjvM2M3gDACpcKZ7idYIpA4I+A5sUtxoPmrB/rJ9t3x81B57fQxe W2RHmQK1y0/8hQBUZL6xCWQvBnJb2j0V6/L4ZLqeyStm/VTRhkFkIfX9DV1HfrpiYpHd THzO8Ozt5s7FeUwqgo9TtGd86DrFzlU500MXlD1trk0cusYJ5jet7knMqYuLddlciMMg e0Fi6iNHEbU34jWmlaEjcJw8j2xoUJa5QM1WATP/GVL372t+J2E6izXkewSu3JUh4Zx6 FbSbXs8kXPgsy38/esw4OAxusB8foHbF28fgMLrp51TQBGm/pqNeFnHAi8Hp9VDfLHPR cOrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=X72g7Mnf; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s24-20020ae9f718000000b0075d005b5472si5313037qkg.705.2023.06.06.03.16.32; Tue, 06 Jun 2023 03:16:46 -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=@intel.com header.s=Intel header.b=X72g7Mnf; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237295AbjFFJ4h (ORCPT + 99 others); Tue, 6 Jun 2023 05:56:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237308AbjFFJ4f (ORCPT ); Tue, 6 Jun 2023 05:56:35 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27C63E6B for ; Tue, 6 Jun 2023 02:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686045393; x=1717581393; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9GElKVgLMZ9LqY2JLMC1Sd5gav9lSYApUQe9KiZ8CuU=; b=X72g7MnftcVRKdd1dpn26C7XfUdg8Yz129ZznK8T3MnkFZFmFGFSEctV 3gLrNiBYofD1LXQoVenbuv0YrsitGT028Abeb6HNrxeFQdmBXZc9DrzlI yr0p62eD28coTZYprC7uHc73uerCtleN7V0naQ3LZ6Havucb93WXUr1OP LY+3tT244hPxwWaWw8qY43P3h8wTvuqwmmdv9jste6iBb5AJM0A3BPruZ oekT8NkZpVE100EYqGSJQWsqAI9pk+uJ6Wv4pICB+8ViSLms1lTq05BOe 7pEvRjLsAkP9bfHSba2Ap1XU6/AjiJIj2FMC92RdQptoL+Wx4MPYHBjSE w==; X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="422445921" X-IronPort-AV: E=Sophos;i="6.00,219,1681196400"; d="scan'208";a="422445921" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 02:56:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="738720779" X-IronPort-AV: E=Sophos;i="6.00,219,1681196400"; d="scan'208";a="738720779" Received: from rgraefe-mobl1.ger.corp.intel.com (HELO box.shutemov.name) ([10.252.58.173]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 02:56:29 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id BAACC10D348; Tue, 6 Jun 2023 12:56:26 +0300 (+03) From: "Kirill A. Shutemov" To: dave.hansen@intel.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de Cc: decui@microsoft.com, rick.p.edgecombe@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, seanjc@google.com, thomas.lendacky@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCHv3 3/3] x86/mm: Fix enc_status_change_finish_noop() Date: Tue, 6 Jun 2023 12:56:22 +0300 Message-Id: <20230606095622.1939-4-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20230606095622.1939-1-kirill.shutemov@linux.intel.com> References: <20230606095622.1939-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 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 Reviewed-by: Kuppuswamy Sathyanarayanan --- 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 f230d4d7d8eb..64664311ac2b 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; } -- 2.39.3