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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0721CC04A68 for ; Thu, 28 Jul 2022 18:47:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232666AbiG1SrE (ORCPT ); Thu, 28 Jul 2022 14:47:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232202AbiG1SrA (ORCPT ); Thu, 28 Jul 2022 14:47:00 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 141316E8B4 for ; Thu, 28 Jul 2022 11:46:59 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id e16so2638511pfm.11 for ; Thu, 28 Jul 2022 11:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc; bh=7izCngOY4FlJA7aFVGJAVWlS1so31LHrdF1iXKo0s7k=; b=AM21h/0ZazfG9t+LflSWC6wOUxf0sIuppMbc4jGoGUlehO+IH4f5xZcXJAy6mewqdp DvdYRPqEiU+VlN0xnvlVRpCoaIJup9Tfr8ktmoZOY4hrOoN5YnbxK28oDwRb5EpLSmip lM9AG2NaCSeDeSlSEMBullYvZeO9gr0REU3AQJ2ImnQdGRAp4qMHQ0LADFNKfz+sUJPh vg43NTe1Zur6nAIVxadX8uwYLNIJ5UZUFCwiyIpU5HmsBc+dP1TswFOTOuFkEHwEFPVd oMjGg39f7JMqPgBUWnq4DL7EBWWlSmDf0nM5MBlOQKA/kfQiQaW3xdqYc/JhgN3seH6Z hzwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc; bh=7izCngOY4FlJA7aFVGJAVWlS1so31LHrdF1iXKo0s7k=; b=5Tvz+Z6a5t0Z5RxgggoTPqKFiy1PUB4AuS3IZ2G0s4hZTydlfgi/Mp9quU2Z5awYwB AeUHDbt32pZdcbukGa5zFaceiNTODBpTL76EEukV25PZI0VdepxuTtFJ0agGWUUvy5hR RoL+NjN5B0dFSU+YCutmLWmoZcBOWeqLAVhZY5nWM0rRmXcRWtLCEI9rv8YWZ7CFmmh3 IDUfHbF7Iy+WrVv6bCqzcdm8wP6lHWR1DKejm0v6z6jT9rk6at86DJrO53G5F4CE8m2/ Rbwj4nd8MRAKSCTzVPyATn36RT2ZmUeUrtVR/NPIGNUxCv1dqysENKwHcjhe+NUNxErN a8/w== X-Gm-Message-State: AJIora/kdJYfdvRRsr7Cjaq1nZ0CeDa2UFGxTpadtCbhfHsqCmgtDI5M 9VDc8hcPSlsalq341QjmdlLgxQ== X-Google-Smtp-Source: AGRyM1vjaB1h+xE9vDngPt439cAbv1JnPa8dBVGgeDZaKfEcBegXZIOHbyewCCZLnFkv3DUgwi4Ibw== X-Received: by 2002:a63:f04:0:b0:41a:aea0:9726 with SMTP id e4-20020a630f04000000b0041aaea09726mr104814pgl.382.1659034018461; Thu, 28 Jul 2022 11:46:58 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id n9-20020a056a00212900b0052844157f09sm1127537pfj.51.2022.07.28.11.46.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 11:46:58 -0700 (PDT) Date: Thu, 28 Jul 2022 18:46:54 +0000 From: Sean Christopherson To: Dmytro Maluka Cc: Paolo Bonzini , kvm@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, Eric Auger , Alex Williamson , Rong L Liu , Zhenyu Wang , Tomasz Nowicki , Grzegorz Jaszczyk , Dmitry Torokhov Subject: Re: [PATCH 1/3] KVM: x86: Move kvm_(un)register_irq_mask_notifier() to generic KVM Message-ID: References: <20220715155928.26362-1-dmy@semihalf.com> <20220715155928.26362-2-dmy@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220715155928.26362-2-dmy@semihalf.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 15, 2022, Dmytro Maluka wrote: > In preparation for implementing postponing resamplefd event until the > interrupt is unmasked, move kvm_(un)register_irq_mask_notifier() from > x86 to arch-independent code to make it usable by irqfd. This patch needs to move more than just the helpers, e.g. mask_notifier_list needs to be in "struct kvm", not "stuct kvm_arch". arch/arm64/kvm/../../../virt/kvm/eventfd.c: In function ‘kvm_register_irq_mask_notifier’: arch/arm64/kvm/../../../virt/kvm/eventfd.c:528:51: error: ‘struct kvm_arch’ has no member named ‘mask_notifier_list’ 528 | hlist_add_head_rcu(&kimn->link, &kvm->arch.mask_notifier_list); | ^ make[3]: *** [scripts/Makefile.build:249: arch/arm64/kvm/../../../virt/kvm/eventfd.o] Error 1 make[3]: *** Waiting for unfinished jobs.... AR kernel/entry/built-in.a And kvm_fire_mask_notifiers() should probably be moved as well, otherwise there's no point in moving the registration to common code. The other option would be to make the generic functions wrappers around arch-specific hooks. But IIRC won't this eventually be needed for other architectures?