Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6367308rwb; Tue, 9 Aug 2022 14:06:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR6varxruYrK9k3sJCWuuFU/eiQuxB1/iikElQZi1RCTO0OcZZG6hpVjXcMAflmW84nHlG36 X-Received: by 2002:a17:906:478d:b0:730:a5ed:1bf3 with SMTP id cw13-20020a170906478d00b00730a5ed1bf3mr17325314ejc.255.1660079176828; Tue, 09 Aug 2022 14:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660079176; cv=none; d=google.com; s=arc-20160816; b=J4/qDOToGWh2Q2OEnRO361xqDreDMKkbhJXLRdjmGrcwWhMRDDjYp3F3IUpdQmna6o o6aAiDs9AxbmdUrADSy+VlBPkVq4Epi9Y3T5cv2R2tJW3vqIpUD7hjokGQO4gH6iDwvB ipfPIZ+0DGbNjv9cuOY95YbJicDbeT1kscnS9K1gZTG/BVh0CoXm5TWpWEOHRuWcKhcr WWc+AyBqZ1cZDfinLRKNFrAuHp58C8bOfzfB/xDxiMv3rdpX2YdBh1cs4naGuDwr2oNG 46nkqdRtlQj3z8AyGwFf64GYkPFSV6xMJ+utDMOt+VtwXZ4BApLlWdGVbDTApgWQdZtQ Cr9g== 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:reply-to:user-agent :mime-version:date:message-id:dkim-signature; bh=eThzIo4r7cS8CRLu3srPmTyft7Cfglr0JGqBuCZ1C5o=; b=ZKujE+4xOAwE3B/2oMl/e+Q2fzkNrjVmv82Me1ea/tiBs9Z0zaFvOQX47sThzCZ7mJ cjOebZTv2VUL0Q+UY8Z8OVUDfviG7G1z0xVCKSc5fQMaWggLBvh9/eHvCvzLsJK8IxyG bAOpZZXDlcqF2EbfiVGidDCyJKUeDPbo1fR+do6RjeehFPDDTCcF+fxH+ccoTxkrK+Ye Opw82xgKEyNN6/rlUWMLz7AINqiKMHWbQAYQPY9O/BsdQI2hDPJsVbAljTkoUcXqKg/L DgUXLidcz/DFGG1GRfW7dA9xbjBNHLl7EDyyjJsnVM2xdrYByI4L5/IjtBCyeyn2/0X+ GDUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TEa2AmQi; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p19-20020aa7d313000000b0043a9a95d32fsi9171936edq.433.2022.08.09.14.05.51; Tue, 09 Aug 2022 14:06:16 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=TEa2AmQi; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343816AbiHIUrG (ORCPT + 99 others); Tue, 9 Aug 2022 16:47:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343783AbiHIUrD (ORCPT ); Tue, 9 Aug 2022 16:47:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DCB78219B for ; Tue, 9 Aug 2022 13:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660078022; h=from:from:reply-to: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=eThzIo4r7cS8CRLu3srPmTyft7Cfglr0JGqBuCZ1C5o=; b=TEa2AmQiyp6IJ2z4o90Od+usYRBq2R9EVikWUo6nwui9UTfTVretG5IvFpWTSl975UE0Ab 7ipz/aoln+q80EYDllj12/m0xQ8A+knb9K42NCLwhd7lD1w6BSciHT752ZyzqTighDWIGm ioM81I+c64AZouzjIaOl0bNCetYG7Ck= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-125-qkbeXtMWNNiY-FWUWLfPiw-1; Tue, 09 Aug 2022 16:47:01 -0400 X-MC-Unique: qkbeXtMWNNiY-FWUWLfPiw-1 Received: by mail-qt1-f199.google.com with SMTP id h19-20020ac85493000000b00343408bd8e5so1570904qtq.4 for ; Tue, 09 Aug 2022 13:47:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:reply-to:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc; bh=eThzIo4r7cS8CRLu3srPmTyft7Cfglr0JGqBuCZ1C5o=; b=0CmCQQfZGotxrJGis/MWl0L7OpoClAvsJba/L6Sa0/PQV61dgp9L6y2+PTJhOZ+Qxz Bk3y28RF0xakEXOOyenxYM0Xdzz9EDDFNthHnZ4TZ5JwoyUR3sUiZ/E+WPrNcz1QGEJ1 StYm2IfAUVAYg37CcWxwpzFWMeJcJNjPRNfe7rXLsfGt5lypFSFWmjTKkXOfNEsZF5sd ygLvSNFHsCsdTnaSng/iVGYtiXikuCt+CFdeEnIpkVEzEZQ/2lpRBCPotOFrvCHT35pr zgLBZ1/hemSgz1X68VArTeUiiGbkUPHkNj3HBArCeCom+ntDZMErWCs1m8wgpCdEWw9p c4/A== X-Gm-Message-State: ACgBeo2q+OoZnkCiFcfkSXVG0nN6/hHypcpnZwg6l901Sp40U9ov6xlZ NOpV7Rde5XkB/xtbOimR7EQjU6I4OW+EgZcuVUFSMcmhJ59zmGergC/UiypMl3UWoZ1qKIucEkN 1kgEllHmwhMDe88EN9pX278Gd X-Received: by 2002:a05:622a:1389:b0:31e:e7c1:e81a with SMTP id o9-20020a05622a138900b0031ee7c1e81amr22035097qtk.463.1660078020575; Tue, 09 Aug 2022 13:47:00 -0700 (PDT) X-Received: by 2002:a05:622a:1389:b0:31e:e7c1:e81a with SMTP id o9-20020a05622a138900b0031ee7c1e81amr22035074qtk.463.1660078020357; Tue, 09 Aug 2022 13:47:00 -0700 (PDT) Received: from ?IPV6:2a01:e0a:59e:9d80:527b:9dff:feef:3874? ([2a01:e0a:59e:9d80:527b:9dff:feef:3874]) by smtp.gmail.com with ESMTPSA id o11-20020a05620a2a0b00b006b648d016f3sm12548608qkp.126.2022.08.09.13.46.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Aug 2022 13:46:59 -0700 (PDT) Message-ID: Date: Tue, 9 Aug 2022 22:46:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Reply-To: eric.auger@redhat.com Subject: Re: [PATCH v2 4/5] KVM: irqfd: Rename resampler->notifier Content-Language: en-US To: Dmytro Maluka , Sean Christopherson , Paolo Bonzini , kvm@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, Alex Williamson , Rong L Liu , Zhenyu Wang , Tomasz Nowicki , Grzegorz Jaszczyk , upstream@semihalf.com, Dmitry Torokhov References: <20220805193919.1470653-1-dmy@semihalf.com> <20220805193919.1470653-5-dmy@semihalf.com> From: Eric Auger In-Reply-To: <20220805193919.1470653-5-dmy@semihalf.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 8/5/22 21:39, Dmytro Maluka wrote: > Since resampler irqfd is now using a mask notifier along with an ack > notifier, rename resampler->notifier to resampler->ack_notifier for > clarity. > > Signed-off-by: Dmytro Maluka Reviewed-by: Eric Auger Eric > --- > include/linux/kvm_irqfd.h | 2 +- > virt/kvm/eventfd.c | 16 ++++++++-------- > 2 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/include/linux/kvm_irqfd.h b/include/linux/kvm_irqfd.h > index 01754a1abb9e..4df9e6bbd7db 100644 > --- a/include/linux/kvm_irqfd.h > +++ b/include/linux/kvm_irqfd.h > @@ -37,7 +37,7 @@ struct kvm_kernel_irqfd_resampler { > * RCU list modified under kvm->irqfds.resampler_lock > */ > struct list_head list; > - struct kvm_irq_ack_notifier notifier; > + struct kvm_irq_ack_notifier ack_notifier; > struct kvm_irq_mask_notifier mask_notifier; > bool masked; > bool pending; > diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c > index f98dcce3959c..72de942dbb9c 100644 > --- a/virt/kvm/eventfd.c > +++ b/virt/kvm/eventfd.c > @@ -70,11 +70,11 @@ irqfd_resampler_ack(struct kvm_irq_ack_notifier *kian) > bool notify = true; > > resampler = container_of(kian, > - struct kvm_kernel_irqfd_resampler, notifier); > + struct kvm_kernel_irqfd_resampler, ack_notifier); > kvm = resampler->kvm; > > kvm_set_irq(kvm, KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID, > - resampler->notifier.gsi, 0, false); > + resampler->ack_notifier.gsi, 0, false); > > spin_lock(&resampler->lock); > if (resampler->masked) { > @@ -137,11 +137,11 @@ irqfd_resampler_shutdown(struct kvm_kernel_irqfd *irqfd) > > if (list_empty(&resampler->list)) { > list_del(&resampler->link); > - kvm_unregister_irq_ack_notifier(kvm, &resampler->notifier); > + kvm_unregister_irq_ack_notifier(kvm, &resampler->ack_notifier); > kvm_unregister_irq_mask_notifier(kvm, resampler->mask_notifier.irq, > &resampler->mask_notifier); > kvm_set_irq(kvm, KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID, > - resampler->notifier.gsi, 0, false); > + resampler->ack_notifier.gsi, 0, false); > kfree(resampler); > } > > @@ -390,7 +390,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args) > > list_for_each_entry(resampler, > &kvm->irqfds.resampler_list, link) { > - if (resampler->notifier.gsi == irqfd->gsi) { > + if (resampler->ack_notifier.gsi == irqfd->gsi) { > irqfd->resampler = resampler; > break; > } > @@ -407,8 +407,8 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args) > > resampler->kvm = kvm; > INIT_LIST_HEAD(&resampler->list); > - resampler->notifier.gsi = irqfd->gsi; > - resampler->notifier.irq_acked = irqfd_resampler_ack; > + resampler->ack_notifier.gsi = irqfd->gsi; > + resampler->ack_notifier.irq_acked = irqfd_resampler_ack; > resampler->mask_notifier.func = irqfd_resampler_mask_notify; > spin_lock_init(&resampler->lock); > INIT_LIST_HEAD(&resampler->link); > @@ -417,7 +417,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args) > kvm_register_and_fire_irq_mask_notifier(kvm, irqfd->gsi, > &resampler->mask_notifier); > kvm_register_irq_ack_notifier(kvm, > - &resampler->notifier); > + &resampler->ack_notifier); > irqfd->resampler = resampler; > } >