Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4715442rdb; Fri, 15 Sep 2023 10:02:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGLEheThP688tPs/cFeb9ows/2jbkw5qiI29CLKbDVcuJuBrXEFTkHbZm79NjktNOIqlf0C X-Received: by 2002:a05:6a20:428a:b0:153:a461:d96e with SMTP id o10-20020a056a20428a00b00153a461d96emr2777459pzj.47.1694797367576; Fri, 15 Sep 2023 10:02:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694797367; cv=none; d=google.com; s=arc-20160816; b=d67i5sXw9J9h0+pxtchcxlflP6zl8g+bO37IdHOA9aE7ebBUiWBETqLHXzxe2xmeON QJT2MjO298livznzwz0W2HcgvXGScalJ+b//G8ryBbBo4gBwJKlMjGPLV2KBDmHmKeHP X9ASnVLB5gW1SumbjbVKut3rSxkfvYhNBYFe8q+Hpj4a0bVVbEMhZ0V+29bOOTOlFVbZ dcLRKlIrFEruAst6Y2idv68K/7xU7d6qWxalkuC6oR+w+T2hTHCnjTH1OX8/qJVoJGuV FtgtOKcVmtnNVG9fWrAxPMZMQkm/A45i2Cdc8SjTgHAWb1T+s1tIHqV66l28l0C8ccv/ i1mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=KFwmST+28+JQuI4fAhoCg0WB+pIidCQMHgLH54IRLXg=; fh=TaoLQepEZsFKuopFKxPSylLnqfM1XM5QDYyQ0ZH8CtI=; b=ueuwFY4O3kzjjv4FG3i7QyAUhJMiPSj306HiPa6AVM+1SK3zfdppZsY+/aoNzzyZ6G CCMFX/lwZyUMst4zAl9sEDO3qOW5nSrFCwUxCxzEfjqAbMj2tF6+sv9cmZIvughy9KM7 sA/aRqntHlImTZIRV834c9j2i/2Vi1hJ2uEr85V7Hb3is0MdnNWrG1HB73vFK2ucA5my r8yP7YRl23TqiFBGHmP4HS3oTOLb8CsYwU+dS2tGxbDksjPcY20xPKPsTLj7EQAgKCNi ESv0pFZqFEiOPnVcQA70/YP2PImnEdMYoJhOquZQFELJ2iNATf+mOdDrrNoSwJzFUHrC mjPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DezGOKHC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id u24-20020a056a00099800b0069023afa581si3735646pfg.253.2023.09.15.10.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 10:02:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DezGOKHC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E99A98392310; Thu, 14 Sep 2023 23:47:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232403AbjIOGrj (ORCPT + 99 others); Fri, 15 Sep 2023 02:47:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232396AbjIOGrh (ORCPT ); Fri, 15 Sep 2023 02:47:37 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A02152708; Thu, 14 Sep 2023 23:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694760449; x=1726296449; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=nbiNTtCye3B4MOA9keAnL3jGRC3Z0ZFqO6c5ckMzgn4=; b=DezGOKHC77KnfZ4+W70StJamxTSX9G4/vDZdgQgNkmJIk7xKsOuLSTYd cgKsiTGD3QE09NWsL3cAWG68GTXvv5fq9AgKzzppeQsXlM1SBDVSfJ5Ch SXC+NRFKy6ldk/xVL2WSxP5xFTRdU7YFuayf9MdfOczejFnrkfqQ9yh4B m6+tMlP58l9OELQLiwb7Ee67casNkwmXlg5kz4Tv078X15bd29OlPsYaY MoM4ado6curPC/YXYlQ6SdpMhVQN68HcqUQPjP4fWdk/UPHfhRZEHjKH9 odvwn9MhuZaDV50NsLT/fHnCzQvtjmWAppnb8ilkwCCgVcrvbbBjtMdIH A==; X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="383000904" X-IronPort-AV: E=Sophos;i="6.02,148,1688454000"; d="scan'208";a="383000904" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 23:47:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="744857575" X-IronPort-AV: E=Sophos;i="6.02,148,1688454000"; d="scan'208";a="744857575" Received: from xiaoyaol-hp-g830.ccr.corp.intel.com (HELO [10.93.29.154]) ([10.93.29.154]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 23:47:16 -0700 Message-ID: Date: Fri, 15 Sep 2023 14:47:13 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.15.1 Subject: Re: [RFC PATCH v12 01/33] KVM: Tweak kvm_hva_range and hva_handler_t to allow reusing for gfn ranges Content-Language: en-US To: Sean Christopherson , Paolo Bonzini , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Matthew Wilcox (Oracle)" , Andrew Morton , Paul Moore , James Morris , "Serge E. Hallyn" Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Chao Peng , Fuad Tabba , Jarkko Sakkinen , Anish Moorthy , Yu Zhang , Isaku Yamahata , Xu Yilun , Vlastimil Babka , Vishal Annapurve , Ackerley Tng , Maciej Szmigiero , David Hildenbrand , Quentin Perret , Michael Roth , Wang , Liam Merwick , Isaku Yamahata , "Kirill A . Shutemov" References: <20230914015531.1419405-1-seanjc@google.com> <20230914015531.1419405-2-seanjc@google.com> From: Xiaoyao Li In-Reply-To: <20230914015531.1419405-2-seanjc@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 14 Sep 2023 23:47:46 -0700 (PDT) On 9/14/2023 9:54 AM, Sean Christopherson wrote: > Rework and rename "struct kvm_hva_range" into "kvm_mmu_notifier_range" so > that the structure can be used to handle notifications that operate on gfn > context, i.e. that aren't tied to a host virtual address. > > Practically speaking, this is a nop for 64-bit kernels as the only > meaningful change is to store start+end as u64s instead of unsigned longs. > > Reviewed-by: Paolo Bonzini > Signed-off-by: Sean Christopherson > --- > virt/kvm/kvm_main.c | 34 +++++++++++++++++++--------------- > 1 file changed, 19 insertions(+), 15 deletions(-) > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index 486800a7024b..0524933856d4 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -541,18 +541,22 @@ static inline struct kvm *mmu_notifier_to_kvm(struct mmu_notifier *mn) > return container_of(mn, struct kvm, mmu_notifier); > } > > -typedef bool (*hva_handler_t)(struct kvm *kvm, struct kvm_gfn_range *range); > +typedef bool (*gfn_handler_t)(struct kvm *kvm, struct kvm_gfn_range *range); Is it worth mentioning the rename of it as well in changelog? Anyway, Reviewed-by: Xiaoyao Li