Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4533562rwd; Tue, 30 May 2023 06:47:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5N9d4cmBQBA32ElaUqHBCFBf6zNzQXS0l5IQLAq9tovmhK3SZNY7AclVyu+wtRCViBepLy X-Received: by 2002:a05:6a20:e489:b0:10b:56bd:b00e with SMTP id ni9-20020a056a20e48900b0010b56bdb00emr2168090pzb.40.1685454445764; Tue, 30 May 2023 06:47:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685454445; cv=none; d=google.com; s=arc-20160816; b=DK3YuZAgkJ8ZoTWoAM5odfkJXMnQQ86jmDR8MX0p/OHrCr3m3H4OEriINEDl3s4k+k HoAmcbxK2+AvH28fhJaFAm2d9bF+D1mhB31RsfumICeeNnTXb1uwCoop5D1AitN9EDGY vFrFTXQ34OBhQiiAtu/JLcF5xCwzEFNw4Z83qfPja6viw5k8UMhr15fm/w77eF4spVXv AYCqY15isQTOQnqbJ6Ty7qAJztGZer2om665xSrj1v94OHZHMlCajMF7QQdZY459IDty 09WWMXF7B9QROBrHPDZfP3f+uNAP+FdBNnESdA1vzpfOtJ7IzDVTFC/wXcMYgUw5x9bD Ffpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=RZKRB+yCChywPeqziDUaNiGSjh0MSvRyakCzKaCEcds=; b=Rf1QDuwwGx3gkQJMIasv9lX9Ap/SbgxBkqL1dfBEm26BdGdOqh980b9Mytt+qpaRIK 9/RyUEbOBD90i+M2DnNZxCl7JAFSOkl2Lg19if+/IJdRS8rrAZLirl5CWMZQmNg6Pp3e fFCSPa+KAVarAlUYQVxb/0IMqnjBa8k34CW9y6vEGx74f6aKJ6y7+CYn1VnrdKljmXzy J72q+0p+g0poX1XlzeLkMAiHsqqZH5eDC9u3LyOozBhhRxFNHAxoaC6JWZbmrTFTBRED hNPhRHRYT++LofqjdSLw9x3MUNFjuEYvIBWTrk4z3aNz/C+iKhU6u4n4vxh5yXdm4CaL DM1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="X/yJ+m8f"; 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 w21-20020aa79555000000b0064f33c84c52si973875pfq.179.2023.05.30.06.47.11; Tue, 30 May 2023 06:47:25 -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="X/yJ+m8f"; 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 S232633AbjE3NVG (ORCPT + 99 others); Tue, 30 May 2023 09:21:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232624AbjE3NVF (ORCPT ); Tue, 30 May 2023 09:21:05 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07A65D9 for ; Tue, 30 May 2023 06:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685452861; x=1716988861; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=X6n3CkRI8+JwdQaW9dpMbGRfCFGiJrQnTVujHVVXh0w=; b=X/yJ+m8fGMMGbbJ21tUcoIQrm9Hwa+o1pojEbQ++ueMhnXdZy5mcZgQI 0wOSFRHCilbBGqE++jd6gx0aAQ+JclANZMN7FVPFMn2oPrNjdCugwU0RD MdtgEVXMGXQ2kRNPgM1VfxiaKt4Rfdis6H2iLhXhFyLAZ+957lWsv0+yl JSYvEUWYtrzyk5xEYHpS2dfVa+VbL9l0ACq3vQKOtCGNM0OkzO/9Rza4/ 6NvGhW0WABcIgZqMKqIdZHrhZcs6o7vXbvVJ7Sp3fHUI3lON5wOkQ8oSV 1XWUMRddOyX94jdJRTmyGLuUFEx0VZaGZBuBwNsM0NMb/0znK9p0xhdl6 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="383166361" X-IronPort-AV: E=Sophos;i="6.00,204,1681196400"; d="scan'208";a="383166361" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2023 06:21:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="656853648" X-IronPort-AV: E=Sophos;i="6.00,204,1681196400"; d="scan'208";a="656853648" Received: from ndesilva-mobl1.amr.corp.intel.com (HELO [10.209.101.99]) ([10.209.101.99]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2023 06:21:00 -0700 Message-ID: Date: Tue, 30 May 2023 06:20:59 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.11.0 Subject: Re: [PATCHv2 3/3] x86/mm: Fix enc_status_change_finish_noop() To: "Kirill A. Shutemov" , dave.hansen@intel.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de Cc: decui@microsoft.com, rick.p.edgecombe@intel.com, seanjc@google.com, thomas.lendacky@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org References: <20230526120225.31936-1-kirill.shutemov@linux.intel.com> <20230526120225.31936-4-kirill.shutemov@linux.intel.com> Content-Language: en-US From: Sathyanarayanan Kuppuswamy In-Reply-To: <20230526120225.31936-4-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 On 5/26/23 5:02 AM, Kirill A. Shutemov wrote: > enc_status_change_finish_noop() defined as always-fail now which > doesn't make sense for noop. > > The change doesn't have user-visible effect because it only gets > called if the platform has CC_ATTR_MEM_ENCRYPT. All platforms with > the attribute override the callback with own implementation. > Reviewed-by: Kuppuswamy Sathyanarayanan > Signed-off-by: Kirill A. Shutemov > --- > 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; } -- Sathyanarayanan Kuppuswamy Linux Kernel Developer