Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp146473pxh; Thu, 7 Apr 2022 16:55:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRY2Wgkt4we17GTWmqQFZ/ZDnWlzlDIeZIBnkQxBJmkSXnCcM6j+7r3LNx68U1IB76gDr5 X-Received: by 2002:a17:90a:5407:b0:1bf:43ce:f11b with SMTP id z7-20020a17090a540700b001bf43cef11bmr18824637pjh.31.1649375739269; Thu, 07 Apr 2022 16:55:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649375739; cv=none; d=google.com; s=arc-20160816; b=KbHOOB2piE2O77WeJok/vMOjLb9OFkNjzvoM+QhquwvjYNdwcCUOA3RaVtEzVv5MdX NaPXCUmaaE/D4a4OGtV4KbYT90gzJmcxXSEWGmUH0xR9VOdHMK+mNXUuW3B/HUOLxYaK cnMr2gBMkMgQYv9oWNBiNJujAnf7ELOSjdFqBiCVYsvZTFhcHyOpnNUny7cPj0jjWPlr atrOHEAnywzyKNoEqBzV2K6hX7w1w7s0F//OtdQsdqnviurhB6d39jqyfgvUeMxLgX8S e86PhIcT3hoDfjMg25KPgIegiV7MNHf20RjcfHltO6TNYVxaT3yrogq9qUnjRBE9LwQn JTKw== 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=2NNYEjahX514oR4matgGkkW5hlWOPKLwDcyup66L/Zk=; b=oyGY5PDPuR/UviaYcIPQFRnrdA52ee1qsmPDOEG/iwKmumOtHf1FpWjI6tM9eWQhMw GXtGFzMdx9fAG+zLAABo7gw3npZwTU/ozKhb+TeVRwxRHgevn48e1aPtk+Fm/JCQ7zhx cg1YD9j+Nf2KF/Yq0cTq/Uy5pXm918YfsrvYc36MTmQ5Z1cZEcvgntmwLUmndFNxRZ91 rvmSDlNHi0S69FOxL9avbOaAqVfvUj8GJjM0T+HTtUzA4g2pwHJx9AnYCmrvuxdjpWYF Fz6Fhh2/AtPCgJVo698O+KUIpEuvNRmjG11o2dU3+gLaFLipS9GoVDT4jMdM6BvrWlSv pzVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="c/UiCojz"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n185-20020a6327c2000000b003821dcd9eb3si21036160pgn.819.2022.04.07.16.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 16:55:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="c/UiCojz"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9C3B214B033; Thu, 7 Apr 2022 16:24:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231857AbiDGX0K (ORCPT + 99 others); Thu, 7 Apr 2022 19:26:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231713AbiDGX0G (ORCPT ); Thu, 7 Apr 2022 19:26:06 -0400 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A713C14B01F; Thu, 7 Apr 2022 16:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649373845; x=1680909845; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=O1b7WIeGUo0TmUs3OQt7Z4FLbzIJnxs4mxV2Cjhvoh0=; b=c/UiCojz08sBfVgqHXN6V9WkkLAxKpcUzYykqc8WMttrwQ6/zeRfbFm6 Hos96jsSmJRwS9pURKygrFnectqET6ulqYHn3xM5BX8ms30/s2NTAjZD6 95agqFUnjKplfj9eFM/wndMQrX2iZA9q/FT01TXjIkasAhqy2SSbhFD+3 g6c4ushPhPMnbW/j3YyuMPgx60Zt+2TRGVZtiW+loyt5/Dh5UZevV98a5 wwNbw+R+MKl9f0uUpRWrN8RKHDyE0XqXmtO5TUja5VNgvOO9iHnODq6Zj XpcV/Nw/pqdEkCIzlNyGcPYVOPCVp2BoVIiqE490gr2aqnmcAx3MQAPua Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10310"; a="322152346" X-IronPort-AV: E=Sophos;i="5.90,242,1643702400"; d="scan'208";a="322152346" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 16:24:05 -0700 X-IronPort-AV: E=Sophos;i="5.90,242,1643702400"; d="scan'208";a="524571247" Received: from asaini1-mobl1.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.254.28.162]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 16:24:02 -0700 Message-ID: <4515f55c1717e963989e3d5e8640636d5ed2f25f.camel@intel.com> Subject: Re: [RFC PATCH v5 047/104] KVM: x86/mmu: add a private pointer to struct kvm_mmu_page From: Kai Huang To: Paolo Bonzini , isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: isaku.yamahata@gmail.com, Jim Mattson , erdemaktas@google.com, Connor Kuehl , Sean Christopherson Date: Fri, 08 Apr 2022 11:24:00 +1200 In-Reply-To: <7dabd2a6-bc48-6ada-f2f1-f9e30370be2f@redhat.com> References: <499d1fd01b0d1d9a8b46a55bb863afd0c76f1111.1646422845.git.isaku.yamahata@intel.com> <05b1d51b69f14bb794024f13ef4703ad1c888717.camel@intel.com> <7dabd2a6-bc48-6ada-f2f1-f9e30370be2f@redhat.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.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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 01:03 +0200, Paolo Bonzini wrote: > On 4/8/22 00:53, Kai Huang wrote: > > > > > Do you mean below reply? > > > > "I think use of kvm_gfn_stolen_mask() should be minimized anyway. I > > would rename it to to kvm_{gfn,gpa}_private_mask and not return bool." > > > > I also mean we should not use kvm_gfn_stolen_mask(). I don't have opinion on > > the new name. Perhaps kvm_is_protected_vm() is my preference though. > > But this is one of the case where it would survive, even with the > changed name. > > Paolo > Perhaps I confused you (sorry about that). Yes we do need the check here. I just dislike the function name. -- Thanks, -Kai