From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3F47C433FE for ; Mon, 6 Sep 2021 10:21:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC46160F13 for ; Mon, 6 Sep 2021 10:21:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241937AbhIFKWy (ORCPT ); Mon, 6 Sep 2021 06:22:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21744 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241920AbhIFKWv (ORCPT ); Mon, 6 Sep 2021 06:22:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630923706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6I/+jwkS4G/jaKLYt0NFvHjgSx5PJZJIsHfHPHUbyAg=; b=B9ztA6Ig9/qQ3wUZoU7FFFqL8fGKtW7fMy3eeNOhOfOa/A4r0O1dWN0EWZxYfB9BZuKRTf ch1/9q3y5Ph6KJzSmwRbFAe8+jL0dtNZxiEO17s3kCTAHlyuJbpivNlXEPUjLZt/pu82/6 itDZwOwjSuNw6E6lWhj+YywzLHuErgU= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-591-hDKdX_7wN0mi950C5kJAOw-1; Mon, 06 Sep 2021 06:21:45 -0400 X-MC-Unique: hDKdX_7wN0mi950C5kJAOw-1 Received: by mail-ej1-f71.google.com with SMTP id 22-20020a170906301600b005ca77a21183so2112917ejz.20 for ; Mon, 06 Sep 2021 03:21:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6I/+jwkS4G/jaKLYt0NFvHjgSx5PJZJIsHfHPHUbyAg=; b=HCYbIyTuVoG5k+MVp/ADwfGMRHbEciHsB3rDNzizFnGrI/yLVEKJunGdJR9PzFgD6p qI8oioD1rGSegJMQAdEFG5/zCHOd5auHjpiX9wOjUKhiERMYSd0h91UDoE6JJJeDrigD +FvUd8kGWnEKUQnYXXLGMr+TstbBMO39tbkaPJYX+Rlp+bmy9Czvz+DArIJlPX6PLBeJ 4RatlGWqnKvLVsTw0jbNgjoRNW49Mkq/vV8p6p6q5Jye5VmtDCvN+0W94yXkoGRpFkMg EddjBMZyJ0A2FkQPPId15nCbjGvk3S6fzw51a+hOPinE1FIFAhnUFZY5i+BEkJekb7qF EWsQ== X-Gm-Message-State: AOAM533mfsMQKqKgZ5W0lkmjVipoL/6hLmZJBR0uyldcnc2/iXqX8mz4 DVRa1GTugCeSEuBywJmHTZuIZXLuqVpd5XQSZ4ZpR6FC9MnJqbWNIeHZDXV2UjsYkWoeCRqsmYL VgEehmRMrzNIcrEwjZaoqWJIVHo7HNl1UV6QwQnQUosbMxOWgtN0EyCGtasBop5Gvkf/jUVUr5l Gr X-Received: by 2002:a17:907:7601:: with SMTP id jx1mr12682613ejc.69.1630923704092; Mon, 06 Sep 2021 03:21:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIfg38qh5MAYI2aL/o0JVdU/uV5GNkIIo8KH69KQ+gmjTcd3VL5L5ABWRZT4YQzrSiru1xPw== X-Received: by 2002:a17:907:7601:: with SMTP id jx1mr12682591ejc.69.1630923703795; Mon, 06 Sep 2021 03:21:43 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id s23sm4327693eds.12.2021.09.06.03.21.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Sep 2021 03:21:43 -0700 (PDT) Subject: Re: [PATCH] KVM: Remove unnecessary export of kvm_{inc,dec}_notifier_count() To: Maxim Levitsky , Sean Christopherson Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210902175951.1387989-1-seanjc@google.com> From: Paolo Bonzini Message-ID: <79dcce75-802d-5193-6200-c52f3b1ff90d@redhat.com> Date: Mon, 6 Sep 2021 12:21:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/09/21 09:12, Maxim Levitsky wrote: > On Thu, 2021-09-02 at 10:59 -0700, Sean Christopherson wrote: >> Don't export KVM's MMU notifier count helpers, under no circumstance >> should any downstream module, including x86's vendor code, have a >> legitimate reason to piggyback KVM's MMU notifier logic. E.g in the x86 >> case, only KVM's MMU should be elevating the notifier count, and that >> code is always built into the core kvm.ko module. >> >> Fixes: edb298c663fc ("KVM: x86/mmu: bump mmu notifier count in kvm_zap_gfn_range") >> Cc: Maxim Levitsky >> Signed-off-by: Sean Christopherson >> --- >> virt/kvm/kvm_main.c | 3 --- >> 1 file changed, 3 deletions(-) >> >> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c >> index 3e67c93ca403..140c7d311021 100644 >> --- a/virt/kvm/kvm_main.c >> +++ b/virt/kvm/kvm_main.c >> @@ -638,7 +638,6 @@ void kvm_inc_notifier_count(struct kvm *kvm, unsigned long start, >> max(kvm->mmu_notifier_range_end, end); >> } >> } >> -EXPORT_SYMBOL_GPL(kvm_inc_notifier_count); >> >> static int kvm_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn, >> const struct mmu_notifier_range *range) >> @@ -690,8 +689,6 @@ void kvm_dec_notifier_count(struct kvm *kvm, unsigned long start, >> */ >> kvm->mmu_notifier_count--; >> } >> -EXPORT_SYMBOL_GPL(kvm_dec_notifier_count); >> - >> >> static void kvm_mmu_notifier_invalidate_range_end(struct mmu_notifier *mn, >> const struct mmu_notifier_range *range) > > Ah, I somehow thought when I wrote this that those two will be used by kvm_amd. > > Reviewed-by: Maxim Levitsky > > Best regards, > Maxim Levitsky > Queued, thanks. Paolo