Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp249556pxb; Thu, 7 Apr 2022 04:45:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzXPUOcHbLtcGCRxN+5ZYO8+xcPfuj/BhmW2+vZ+xl3h06PWD3Fn/gK6Mj/0DMienWlXHn X-Received: by 2002:a50:9e61:0:b0:419:d8e5:6236 with SMTP id z88-20020a509e61000000b00419d8e56236mr13724483ede.327.1649331932118; Thu, 07 Apr 2022 04:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649331932; cv=none; d=google.com; s=arc-20160816; b=V1yyr7Y6lG3xf1gb5G0kmvneExbiLfH/mYzUG2yuYfqbMUwKP3qNGL3iwXnZhf8BiJ xER92jiZloLHE0E7ddtf70dnLGuxpt8qKMq0NTCEzFrqCeXr1f2axSAtFkfrJF1YpmNb Rxnst2XN1uvJYAqWZOKKXUKHS5tDwYoHo6+mXLRhvP/h72QNj3x7JZCpg3J7Lo65bw5U TsIvPo60+Dj88RY8PGrRj8JUAXQwIj9EIRJjTYEtgnoNnw0M5WoIIDI2rkcbkrlWx10m TdYYHOA6VEJabU57gAUQhXDoRCoe+mTwIESGEsMqS79EoLZ3aU6MVZtsFKqhzY9nmN1H HepA== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=5QKQ1N4dHTalp8NyhakLsBvc80FL3uuFYKe7oqhlTVQ=; b=XekyIqkRKQx6w9GkPpOLcbhIdegIU+BxrKFZ3oYyV8kSng15oAC5ZazKkQ1sgej7oK zXmiZxrnYjc8DqcBjdnEXwdRg6WkNKJepzUi/9adNtl2Dj3sTPlx54AfLVxa1hFPLaPd r3KxRFJYFDRc97zJtMToyyJ4l7ULwARrux4+TmHlheF+18yz97hoV6FZ4ScxANLVDeZ5 lXjfPa35PMcAdxT/PbkaOD+YHnUN/gpqSQeK+Co9BgBTHaEh9ZvCmuAM6Iwq+ONqompn t+TulR0PBAF5gniPh4Y7gXiXSQ2xzWST6JddPL802/DaR0dxiOPuzoI9tXLaFhjvGp71 wqAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZhAAWgan; 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 tc8-20020a1709078d0800b006e83ffeb587si578345ejc.683.2022.04.07.04.45.06; Thu, 07 Apr 2022 04:45:32 -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=ZhAAWgan; 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 S237768AbiDFXca (ORCPT + 99 others); Wed, 6 Apr 2022 19:32:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229748AbiDFXc1 (ORCPT ); Wed, 6 Apr 2022 19:32:27 -0400 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACB21C337B; Wed, 6 Apr 2022 16:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649287827; x=1680823827; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=dN6tJX4kfZRcYxEG7jPgJawAk+mr6Z5aozdvN/WcmgM=; b=ZhAAWgana9gbl3SgOhyB0sbqlLdJyg2lISOgdbhXtGXI/o0iwgUsMunF XSacqIF8FQr7n9HTX9G/Z94GHhnnU491FENnE5LwGfJiaxjhcYoo1lAJG UGWXwbBhhuliqdfAb+P9VAnH5RvxCT4m8/QKiRv805aCX9NFb+qxkdonU pHsoTLm+L1NM8/2dZq4FEZ0tJfsl7BlH9w6Ctq3FScfL25T5SWs0O1kn6 6mO9BqtEaiCZR2jf4QYusLohGeBa8Dx2ZXYFJ7mk+yyHDO//OwrdJltQk vmumHClQYnVr9zY80ve2Q+pVg2Ue1gqtU1O16VDx0dHr+wyO8Fx8qIT+K Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="321878694" X-IronPort-AV: E=Sophos;i="5.90,240,1643702400"; d="scan'208";a="321878694" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 16:30:25 -0700 X-IronPort-AV: E=Sophos;i="5.90,240,1643702400"; d="scan'208";a="524689613" Received: from mgailhax-mobl.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.254.55.23]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 16:30:22 -0700 Message-ID: <3ac99ee504d6230f747a0f0c6ab91e6acd375536.camel@intel.com> Subject: Re: [RFC PATCH v5 045/104] KVM: x86/tdp_mmu: make REMOVED_SPTE include shadow_initial value From: Kai Huang To: isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: isaku.yamahata@gmail.com, Paolo Bonzini , Jim Mattson , erdemaktas@google.com, Connor Kuehl , Sean Christopherson Date: Thu, 07 Apr 2022 11:30:20 +1200 In-Reply-To: <6614d2a2bc34441ed598830392b425fdf8e5ca52.1646422845.git.isaku.yamahata@intel.com> References: <6614d2a2bc34441ed598830392b425fdf8e5ca52.1646422845.git.isaku.yamahata@intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Fri, 2022-03-04 at 11:49 -0800, isaku.yamahata@intel.com wrote: > From: Isaku Yamahata > > TDP MMU uses REMOVED_SPTE = 0x5a0ULL as special constant to indicate the > intermediate value to indicate one thread is operating on it and the value > should be semi-arbitrary value. For TDX (more correctly to use #VE), the > value should include suppress #VE value which is shadow_init_value. > > Define SHADOW_REMOVED_SPTE as shadow_init_value | REMOVED_SPTE, and replace > REMOVED_SPTE with SHADOW_REMOVED_SPTE to use suppress #VE bit properly for > TDX. Like we discussed, this patch should be merged with patch "KVM: x86/mmu: Allow non-zero init value for shadow PTE". -- Thanks, -Kai