Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5558055pxb; Mon, 14 Feb 2022 01:52:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBF/AiZ2c6nFNO5Ea5nJFbLxRQHYCC5KfKYt5BqRQkflbW7EVPCvzLO3XmKqWfLCBI3Dri X-Received: by 2002:a17:90a:d58b:: with SMTP id v11mr13876252pju.100.1644832364030; Mon, 14 Feb 2022 01:52:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644832364; cv=none; d=google.com; s=arc-20160816; b=ArTWNcTzET1BrPCys4PMus1BxQwgbeZd48l2XQm+bMXaccsD28/puVz0lh1QDQcIJK Srl1qTmKvDLPRGPMjWtGZkSddOlLU8kg5/M7ECGIW3FPH6EJkkYOfjGx06HPw8F5dNyB Q76c5ZTPRtEtiHnNZ9TptE7itB7KccPu8WpGuM6ADFOLh6XtzIVyRbJ5OF3+1kH3hT1z NtXJmvbUfI7Chrw3pXQTppgAr/eTRAc4Q32cwRpcwN4BVk6jvNzvhDv9Ih1LYvuEGSg+ ty91MVp+tHbuoUfgsOgBUQ2LWZhnh/8rEz/OZCx3OUjkxWceibtxxOXCb0pmnVkSir41 rmZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=87vVVlt1Gj8gtKfe5Lr2/twqlYXCww3QQq8NSJlRxOY=; b=phCPBTOvOQbnNag1AhJUlp9l1nqZ++BldDzehvE6NzEQWK+mwGCwetmzlDYWYzP+wf C/wF/EMbahMhs0ol3OO9oxAeZVrYy/j9t9u4GIbU1ZI4KxR+JHztLA/vG43isoHPlGdI /FCOKT6SlWNswR00PF1tB5/WfSmP/Uu5HrixV2scuODltdREDzwKQRMSSAXkIWjWV2D/ z987TA/jWzr1kDQohiHzS8APjoGj7HCpgi9bAooMxt0dQiaksZiDtJSAuypWBFLxIZTA m+1fE6AaYs2GeAKFhmvm+YGM1pSNy8y0xP+7aM3BNaxG55CqGfy5JPBiutAw+FIjQe0j 9wCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=g6faqlPY; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m16si30011519pfc.211.2022.02.14.01.52.32; Mon, 14 Feb 2022 01:52:44 -0800 (PST) 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=@google.com header.s=20210112 header.b=g6faqlPY; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238950AbiBKA1j (ORCPT + 95 others); Thu, 10 Feb 2022 19:27:39 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:56696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345570AbiBKA1i (ORCPT ); Thu, 10 Feb 2022 19:27:38 -0500 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ACB255A3 for ; Thu, 10 Feb 2022 16:27:38 -0800 (PST) Received: by mail-pl1-x62b.google.com with SMTP id p6so3110260plf.10 for ; Thu, 10 Feb 2022 16:27:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=87vVVlt1Gj8gtKfe5Lr2/twqlYXCww3QQq8NSJlRxOY=; b=g6faqlPYdt6/QRXXz+XK476VGGGfTiJy3bKL70N0F+WD8GrL4lZc+StV90vlUD3Nm4 W0WE6qNKicd2LtJjrPifzDGgb1ONl2cgs7eY0MEoZQ65zsVV5LsiiKDDDDJpzwRgeAQg syxBykrBibhV/yk/P7fGUObXiFfiICbaDF8awb8nT++oCUI1u7qxVNQuGV8LCndsLJwW sMFVwlqYEJH/gntTENi/GnHlDxMm6LGhaeH7NLF83CUzQH6UH0u+IyLCCPEtgzVL2UIg WhcqEsBAXsgRMKLIqat4nfklmIdWaHd7UltnlJAqSi4fX8L6LnbYFa86sKy+qS7LBeFP EIMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=87vVVlt1Gj8gtKfe5Lr2/twqlYXCww3QQq8NSJlRxOY=; b=u5spaFSneQ3Z379hQQwDm2oqTwbFolBaNcN94PYrqZ4I+ux3P7ytljNmN3n1l0EP3d o0tm9YOqimOLhF/BwAafzAvU06gxxHhhj4rH+7WaKRl/d7vzlPtnHrWBY3XYoU2Gmoq/ gaLTSdZkyzo5NexAmUcQxhvpAlh+O1XCnJ4iRDhAMilUmsL8DDkOhbsi4NBboHdZDinG dCmzj8+060YxjgFtGLha3ENwebfx0/xLkxjcpg5+S9Z/dRbcpQJwDYnXIIdBdgvuiCGG x7RdXF3tQkZ+ZLCzqx3w6cmd0CcUNeJ3M5d1p3Gago/8aX0Wjxq9dcQB5xRI8SWePfcO slWw== X-Gm-Message-State: AOAM532N4tmZDBgFAlKpaD41PXlidlHQE0Yn6SO3yrOVgj+BvI23uMez jL/v2RPA121vk7xxgKD7Gfs2WPOZ+C6DMw== X-Received: by 2002:a17:902:eb8f:: with SMTP id q15mr5303584plg.67.1644539257851; Thu, 10 Feb 2022 16:27:37 -0800 (PST) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id t15sm18290964pgc.49.2022.02.10.16.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 16:27:37 -0800 (PST) Date: Fri, 11 Feb 2022 00:27:33 +0000 From: Sean Christopherson To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, vkuznets@redhat.com, mlevitsk@redhat.com, dmatlack@google.com Subject: Re: [PATCH 06/12] KVM: MMU: rename kvm_mmu_reload Message-ID: References: <20220209170020.1775368-1-pbonzini@redhat.com> <20220209170020.1775368-7-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209170020.1775368-7-pbonzini@redhat.com> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 Wed, Feb 09, 2022, Paolo Bonzini wrote: > The name of kvm_mmu_reload is very confusing for two reasons: > first, KVM_REQ_MMU_RELOAD actually does not call it; second, > it only does anything if there is no valid root. > > Rename it to kvm_mmu_ensure_valid_root, which matches the actual > behavior better. 100% agree that kvm_mmu_reload() is a terrible name, but kvm_mmu_ensure_valid_root() isn't much better, e.g. it sounds like a sanity check and nothing more. Maybe just be very literalal? kvm_mmu_load_if_necessary() kvm_mmu_load_if_invalid() Or follow cond_sched()? kvm_mmu_cond_load()