Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp131788pxh; Thu, 7 Apr 2022 16:21:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwm+jirGeEKV+oj4jsUHIWOonO6QJNKpeZEpnfRGViqPsmjB4djvnTPK8WJe8pWtCBTsDJT X-Received: by 2002:a63:2a92:0:b0:398:a420:4faa with SMTP id q140-20020a632a92000000b00398a4204faamr13149530pgq.222.1649373719172; Thu, 07 Apr 2022 16:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649373719; cv=none; d=google.com; s=arc-20160816; b=AR5bHmpiu2XCAfz35Gjn8Rc2r7jDlJPJ6m2FQgL+oSx4MqU1hJ3rtiso5rwvividOv tpmeGlr2YgPOeLyYB8BMQV7F1Z42eOppdPzyS11f6SPMymvYwsWDrBLIQAQwg0Y7q6ax QUAs+XjT31kZndYk3+si8inVoAbRTmnZgYBCRDUUqn0XfuOYB+s7UDRzbwmKOuLmOb79 10sfdN5vSgZqeqnCdu4taNoEOBayyt+njXxRSvcxsy17Og2a9rmPeVNvdnbDb2sAfQJq MckfkaG6POO2o7bMnHXP7Ku2HcjwziDeLpzL5+UNL+hROETpCAEEe6bSN9kUu71J0O0G SDOw== 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=WlTjRcp/8RR/wN1ryUt7vDq2xVnmQk4rleo83hrfgno=; b=W9wVbhGy8E+FKHQlkH6XpZ4Vy5vdWGqd78c4fv9WaKrOE+xwWzMUKMQ6WSq3Ky2IIb 5FFypu2lGxAEhFogvKWoY5TIP3PUKz2y2WxWGzV1e59IItzlLj1fOPlbwiL9OIWR25mE xGVp3tmdFiwY+fYTFHug4U6n9HW+x5/41tO4yYkpZ4SBdKYfEPkWpZl3YXCRowYyjluP rwtIpS2LZ8p8sCk978wn9N0zozvHUS7MFBleOSo1AhpCBzudmugGGz9jHstNK/u9xjg1 6lLHHnNqb5leGBP2eYexAeMKOLsJY77mzf5Z8D9+mRjRUYzUdwx0i/lMPtHX/EKNaMWQ xGow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=f8YVBDmb; 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 i13-20020a655b8d000000b003994c59447csi12019290pgr.104.2022.04.07.16.21.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 16:21:59 -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=f8YVBDmb; 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 2770316DB78; Thu, 7 Apr 2022 15:53:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232353AbiDGWzV (ORCPT + 99 others); Thu, 7 Apr 2022 18:55:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232327AbiDGWzR (ORCPT ); Thu, 7 Apr 2022 18:55:17 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28A0B16BF51; Thu, 7 Apr 2022 15:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649371996; x=1680907996; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=5d1RarmXrWSkAaZMLy3cBZ62eTcBy7+tNhk8kPDmHfc=; b=f8YVBDmbGnsVN2Xi+OZAtfa/aokXkwvdqvrn7VaiG5gS3EitLBzmzJIR zXRfvZL38qHa16wnWxU0YfPZDDzUPDq8YGG2NXNDDvbfEOgkzcmH46nqI mgdppNGO8wv4bR5I6lEOYP3yGxXYaQk5C23eW9U8GeOOxG8WbfKYKQkQZ pICCufGJC+1547mVMMdKY1raCrlaNr/i7BTU+Nu4fmNWNEPIG++bI5KCX JmOTNtgQizUlRUPPZY6QstZuI26Idm2qu7XNXnf1/FVAlrxs2Y1qln81V 02HpP9536kffLhnu3zqEuScpx9iY0XXYjUEFysN/HCT2egJB9TZHD54X9 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10310"; a="324621145" X-IronPort-AV: E=Sophos;i="5.90,242,1643702400"; d="scan'208";a="324621145" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 15:53:15 -0700 X-IronPort-AV: E=Sophos;i="5.90,242,1643702400"; d="scan'208";a="642672400" Received: from asaini1-mobl1.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.254.28.162]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 15:53:13 -0700 Message-ID: <05b1d51b69f14bb794024f13ef4703ad1c888717.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 10:53:11 +1200 In-Reply-To: References: <499d1fd01b0d1d9a8b46a55bb863afd0c76f1111.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.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 Thu, 2022-04-07 at 15:52 +0200, Paolo Bonzini wrote: > On 4/7/22 01:43, Kai Huang wrote: > > > + if (kvm_gfn_stolen_mask(vcpu->kvm)) { > > Please get rid of kvm_gfn_stolen_mask(). > > > > Kai, please follow the other reviews that I have posted in the last few > days. > > Paolo > 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.