Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp613382pxr; Mon, 11 Apr 2022 02:38:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPaUIB+vU/B71YTNSca/Lj2INvGziN1orJDJdoNYnVJuCCakfeFcBhHzFbbBF6aQ2ODzNX X-Received: by 2002:a17:906:640a:b0:6e8:643a:7646 with SMTP id d10-20020a170906640a00b006e8643a7646mr12084839ejm.751.1649669931984; Mon, 11 Apr 2022 02:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649669931; cv=none; d=google.com; s=arc-20160816; b=BVtyzY70unsK2cUaEoKUEcIkwl1NFpzeofRikIzo5mUVxzssOtIsDGKk1EYsW7nrNI E3fAb59e+Bk1UsCnfJ9bXSRLXxueL7uFKpygM3c8Nqk5Gq8/E3ApUCu9HLC+6ojQkB5d r9gM+zwmEwXRtsGkWAT2dN+q2ofyH5PLHwjyDNaeTN4IrR+MzGRtE5sFl3EBn9RggwbN xQ2mCPtqhFiixYz6WgOdRV9DQu0I4YDjSAGUsWUCRdaBzBBp20CseM79p7ww+gubXQmH uhqql9XEjVvkSL7mHuCsu72rgrvl/da/cpP6HFUTjuHdEcGqzM64cpAVlWuMY4SJpL5m BsZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:user-agent:date :mime-version:references:in-reply-to:cc:to:from:subject:message-id :dkim-signature; bh=OlC14H7ol96d7De1JKmHp5w3+xo4o53264GIGeUf9U8=; b=EgOUswUF2h8O7HigaVCukzO+PYdvfc9aGFVUA1YoWdLlj/Y7gGb1CT+0ewZhhDsz9U Yj2zenVIxN0q8/CJeIbt85kY2DGCf5a1hu8J/DLZcaumpPL5ZmrCfXRfnBhYAnnV5T1n qXK3BdXyZ7zVH7ALXT562di2IPW8eBdWH/qT/k+CvRJIU8/OdWTLl4Q1vctq6cowFVhW 6Qbm88YwhOugQ9sJ4zD2t6S3U92lNleiou7IQUB1/ul7B8sXpzkpO+c3LtFO22uNfYQc ZvVswVs+BvHWoz6Fx2RWdq496hZxgwdd0Q8o3z6++SLCv3Cj5vS81nARAWxhY4oBcScO MjPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lMvq0jKM; 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 d20-20020a50cd54000000b0041b539e9ceesi6368324edj.491.2022.04.11.02.38.27; Mon, 11 Apr 2022 02:38:51 -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=lMvq0jKM; 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 S237636AbiDHXgt (ORCPT + 99 others); Fri, 8 Apr 2022 19:36:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230403AbiDHXgs (ORCPT ); Fri, 8 Apr 2022 19:36:48 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E093301; Fri, 8 Apr 2022 16:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649460882; x=1680996882; h=message-id:subject:from:to:cc:in-reply-to:references: mime-version:date:content-transfer-encoding; bh=smHiKtl9bXw+2mywjMN3ZlVei8DjqZmWYos0ESvFbe8=; b=lMvq0jKM6eQ8+fYkBZEZ5lY0/9j620mtsaqQoJylQr65Fma28j9yn6ic o0l5MgsROFPSE/0IYTUIGG+IPGMFs4SBzYH9menYppFrw4GjQdCl1JGpZ hzajvCj0bMtlxdzR/cHJnikvJA71cZvoy9X/0zkxO3TZ+A5ncRvygED8s vNrT33bKbKO1+tGtMTVUBGiFH3vgc2GnAfGdXc+PIWcbdW6CcD+sWU6vQ NO8qhjbiGZ7TPt98OnC7h0aKCe72eTL9vcZYc/1TWO/31UKK/XwVdJNDD L+F9h7NanZWfSHt6kobP3fUMPGbSvuIHgm7ILIdZLCotBsdPqA6IryHt6 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10311"; a="348160263" X-IronPort-AV: E=Sophos;i="5.90,246,1643702400"; d="scan'208";a="348160263" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2022 16:34:41 -0700 X-IronPort-AV: E=Sophos;i="5.90,246,1643702400"; d="scan'208";a="852289395" Received: from mgailhax-mobl.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.254.54.250]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2022 16:34:39 -0700 Message-ID: <7db9977ef1ec3f67ea2da1599f168825d7173111.camel@intel.com> Subject: Re: [RFC PATCH v5 042/104] KVM: x86/mmu: Track shadow MMIO value/mask on a per-VM basis From: Kai Huang To: Isaku Yamahata Cc: isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Jim Mattson , erdemaktas@google.com, Connor Kuehl , Sean Christopherson In-Reply-To: <20220408191239.GD857847@ls.amr.corp.intel.com> References: <1c7710a87eed650e4423935012e27747fb8c9dd8.camel@intel.com> <20220408191239.GD857847@ls.amr.corp.intel.com> Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sat, 09 Apr 2022 11:34:07 +1200 User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 On Fri, 2022-04-08 at 12:12 -0700, Isaku Yamahata wrote: > > > - shadow_present_mask = has_exec_only ? 0ull : > > > VMX_EPT_READABLE_MASK; > > > + shadow_present_mask = > > > + (has_exec_only ? 0ull : VMX_EPT_READABLE_MASK) | > > > init_value; > > > > This change doesn't seem make any sense.  Why should "Suppress #VE" bit be > > set > > for a present PTE? > > Because W or NX violation also needs #VE.  Although the name uses present, > it's > actually readable. Yeah I forgot this. Thanks! -- Thanks, -Kai