Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5049011rdb; Sat, 16 Sep 2023 00:16:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFqneyGmNZiSm9SrO6VwNiJr+7uN6xfYhbJksUyHHpXJGmkRCGXL4M1O1XEDiOBq5b+HZfW X-Received: by 2002:a05:6a20:7f84:b0:154:6480:8588 with SMTP id d4-20020a056a207f8400b0015464808588mr3877578pzj.0.1694848618169; Sat, 16 Sep 2023 00:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694848618; cv=none; d=google.com; s=arc-20160816; b=YplYcOaBP2lQjtm1mKqGYmpbgFqGohaQt+cM12DkVYqP7/6KWWxHLX203C5ZGdU3Cg 8DS/NR4UpDgr+q1P1D4YWnuJjpE7i+4Ds54JZEJIo+2nGADWwOR0X5d/D7Aoy6fNjmEn fS61qz/hVfQkj8eYC3nJ6FIY+IMohv6HRnJ/eubOIP/m0MetDXwFq8IyxhQxS9IY8J31 nt+CsQFEb3Xcl9tK+RFD00QTPZvfQqYp+xHRY0NeGoXC2rEQwgR1zyMr1bWPfZPW3dFx F74VSDdZGVTs1M5JBzqDboevOD1awpZIRdvGUWB/zWN1k7OXA8eqXgbx1BBGBaFjKl7R D3pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=yleJC+7YBNlUjlYVNZzM9vt9cQFuPW3G+hVjyHJnwaw=; fh=+GvPm/ki8yAAaqSOkWAptP3/weZWiFxCw1IGyFkLobM=; b=A+Ken99bzg0ZFMDJiIk0ZvFrlxAlxu3K/+0WdvtRGqVYZ6pN1vINN4Qa2xpugJsBK5 4iuvkt72ZHBQB2In3xoPgWjBkMrf8GJzR/UcjbNnLLRQ4ZoMiXtxQCLCwAuZZH4tZ+X5 N6/KFcxtSBarxthp9jfP1jUcp6T2PHPlOfY8fgUgNW9/b1K9GA9VECdofgvU06EQCJcR 5XrE4fFLioa6NGXZJD2/cKGtzmRpTPPtpgs+XZltRH8UeNVFTVdE2b+zHfhLda0Z86SV MB//i6rHAecXeyYiIJVIj0JmtgzYiuCDd6sKSQs29S80YmcSm19pSX6lXej4TMV6Wdyj BYng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ogYHCZ2n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id j190-20020a638bc7000000b0057795a17f4asi4578625pge.177.2023.09.16.00.16.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 00:16:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ogYHCZ2n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 81F168082040; Fri, 15 Sep 2023 14:06:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237647AbjIOVFk (ORCPT + 99 others); Fri, 15 Sep 2023 17:05:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237800AbjIOVFg (ORCPT ); Fri, 15 Sep 2023 17:05:36 -0400 Received: from mail-oo1-xc4a.google.com (mail-oo1-xc4a.google.com [IPv6:2607:f8b0:4864:20::c4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50C9DC7 for ; Fri, 15 Sep 2023 14:05:30 -0700 (PDT) Received: by mail-oo1-xc4a.google.com with SMTP id 006d021491bc7-5735a879147so3672732eaf.3 for ; Fri, 15 Sep 2023 14:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1694811929; x=1695416729; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=yleJC+7YBNlUjlYVNZzM9vt9cQFuPW3G+hVjyHJnwaw=; b=ogYHCZ2nyrdLNWE91OqecuE80rv024odTbCeKa7WT8GM/View0HLXL2xILl+Fs6nk2 T7NjFUrAfuO6olCOMtbd8Ik97WXqPabhkIaT84HZzjK44vlEmdKYD/NlTtt85n1uYokM 6JU2vXeqU9cgAmBieBC0IrXp2bthviZGvvIMD5wZKlGVdRM2ElX6XSsJpDRtCDVTGARU qJ7eAMvHsgmnlbjKRUeknfoOZeL2nCrUjMSs0IzGqOytc7nfCzdzkzuJgeBb22sNXHL/ wNvo9WV6ascGkLS1cTXkzEpyWlcvTlAx5DUq64U3kdziKTqEYhCJ2whNmhvzXt5eph5G T5sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694811929; x=1695416729; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yleJC+7YBNlUjlYVNZzM9vt9cQFuPW3G+hVjyHJnwaw=; b=mZZEJQzpBTTZVOJ1WWnLg5dR+TPdADoEtv+9k8RFDeVzy4CbVXIiarAxiVdo/ab5bp Emvd2ah/KmzYaSvP2AcxL6ZYylGaAQC3ltru4anWGy2aeFPPJAln02MfE5T6HrK9QDf4 sqQeEKP6OnY4cmr8B1WRPlIVhOrEzZy10MOQpgoxaScYX0xF82BKAwAAp8bCbAUIjdLG yfNDxveWlndY9Zdmt1hDd1g/VmZKOy2tn9Lh7JzEuW96KZ+yPMEw3s9IEoqgTMAlvO7W P3qqDq6QA/qcrslRY3YEcNXHJZClphelIDAGeJzQGstPXc1O5EdoRkD+pfj8dASgUDY/ 71RQ== X-Gm-Message-State: AOJu0YwdbD0tc4aSar+2vTmxlc5fxCizpc7rRsFzksH+WLWvOu5o5H/Y OgrgCk5IJ71iZzsuwfTewZCTlrOo2Z4= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a4a:2c02:0:b0:571:1762:7718 with SMTP id o2-20020a4a2c02000000b0057117627718mr908496ooo.1.1694811929595; Fri, 15 Sep 2023 14:05:29 -0700 (PDT) Date: Fri, 15 Sep 2023 14:05:27 -0700 In-Reply-To: Mime-Version: 1.0 References: <20230914015531.1419405-1-seanjc@google.com> <20230914015531.1419405-2-seanjc@google.com> Message-ID: Subject: Re: [RFC PATCH v12 01/33] KVM: Tweak kvm_hva_range and hva_handler_t to allow reusing for gfn ranges From: Sean Christopherson To: Xiaoyao Li Cc: 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" , 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" Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 15 Sep 2023 14:06:10 -0700 (PDT) On Fri, Sep 15, 2023, Xiaoyao Li wrote: > 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? Meh, I suppose. At some point, we do have to assume a certain level of code literacy though :-)