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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C1F7C433EF for ; Tue, 9 Nov 2021 23:16:29 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id F176361105 for ; Tue, 9 Nov 2021 23:16:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F176361105 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 57E284B26C; Tue, 9 Nov 2021 18:16:28 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0cN8x-FF26+9; Tue, 9 Nov 2021 18:16:26 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id E3E044B274; Tue, 9 Nov 2021 18:16:26 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 2FC584B274 for ; Tue, 9 Nov 2021 18:16:25 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pF4ROAnKBtol for ; Tue, 9 Nov 2021 18:16:23 -0500 (EST) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 96DDC4B26C for ; Tue, 9 Nov 2021 18:16:23 -0500 (EST) Received: by mail-pg1-f171.google.com with SMTP id 188so490400pgb.7 for ; Tue, 09 Nov 2021 15:16:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3iDOWhiMYVH4J/xrL04EpHxxB+pfcqrny8aFQ+9uha4=; b=VzrYqN0K7z0Tuv/HZEo98TZC4k8HLv0Bi89F+eTM7VIgt8Hd0SbLQLu1jfW8/8S8fv tzfRT3bkeDhN2PHc31X4H7Y8DtkUZW4N710CDOsPQBTQtnUWIqdFY6F7ije1Cnoj6Q+4 ppkFKf+QIHaiDGp0vt5e+c8PAWdm9ufyP9kMeDz/DPFOwmptdhrUt8KETig+vfK9Hq/N lJFBQKcjKRbfCPyMg8YrBLHsmR9t18pjj8BDwHYytNF7IYDGiDNiRxMB/BsE6ChUEAKz f1UvA+hVEnhTbq/8QIGBSxxEpmi70akY31pDC1IU1AtgFWCS0WgRlyVxJZndzjJCKeh8 qtJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3iDOWhiMYVH4J/xrL04EpHxxB+pfcqrny8aFQ+9uha4=; b=UtFkmkFoFmY20oO3Bo0cVpWRctLZLNHNLteNnVb7dym4sAA7s7vz2Kh1e7KQYYjAtK FaDihE48Xe1IRPoJLpEj10zIq/HAZ3njuGUBxPQpFLLYZ64GqVNyUIl5cMvRQfyRaBf9 JM10NMVueqaN1iVRQkU7UyMgmM7vf2skxLXckjlpkoLclhU6yks+p8gLZQl+OpTxgi9d Smw7WCjNQk5xxQnO2KsrO2J3fBunmt+q0sLiiU1LL7hX5O7YHDVjU1ep6f3Sr1IoKX1m ld+AyxIlexw3fH5zKAJCvp+P3UErpLmofAs2V/cs0ku1C6WsGnakMOnhv+7Nsqa5755J RKVg== X-Gm-Message-State: AOAM530nB1mi/APLgMMQI7jRIDKTK6llnMUDW3gL+Sx9Na+Lzs7W9xAz 8s0FZB+WRDrtGkS4gt1JUnrcuA== X-Google-Smtp-Source: ABdhPJzkNcQryrFCiNL8a59OsXtVtP1KqfiFu5fhzV9PARw6xea5VYu1cXC91MqNZo8wxwwswlX9UA== X-Received: by 2002:a63:2c0f:: with SMTP id s15mr9035602pgs.6.1636499782405; Tue, 09 Nov 2021 15:16:22 -0800 (PST) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id y9sm3778534pjt.27.2021.11.09.15.16.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Nov 2021 15:16:21 -0800 (PST) Date: Tue, 9 Nov 2021 23:16:18 +0000 From: Sean Christopherson To: Marc Zyngier Subject: Re: [PATCH v3 15/16] KVM: arm64: Drop perf.c and fold its tiny bits of code into arm.c / pmu.c Message-ID: References: <20210922000533.713300-1-seanjc@google.com> <20210922000533.713300-16-seanjc@google.com> <87tuhnq4it.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87tuhnq4it.wl-maz@kernel.org> Cc: Wanpeng Li , kvm@vger.kernel.org, Peter Zijlstra , Guo Ren , linux-riscv@lists.infradead.org, Vincent Chen , Jiri Olsa , kvmarm@lists.cs.columbia.edu, Stefano Stabellini , xen-devel@lists.xenproject.org, Will Deacon , Joerg Roedel , linux-csky@vger.kernel.org, Alexander Shishkin , Ingo Molnar , Palmer Dabbelt , Like Xu , Albert Ou , Zhu Lingshan , Arnaldo Carvalho de Melo , Greentime Hu , Paul Walmsley , Namhyung Kim , Boris Ostrovsky , Artem Kashkanov , linux-arm-kernel@lists.infradead.org, Jim Mattson , Juergen Gross , Nick Hu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Paolo Bonzini , Vitaly Kuznetsov X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Mon, Oct 11, 2021, Marc Zyngier wrote: > On Wed, 22 Sep 2021 01:05:32 +0100, > Sean Christopherson wrote: > > diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h > > index 864b9997efb2..42270676498d 100644 > > --- a/include/kvm/arm_pmu.h > > +++ b/include/kvm/arm_pmu.h > > @@ -14,6 +14,7 @@ > > #define ARMV8_PMU_MAX_COUNTER_PAIRS ((ARMV8_PMU_MAX_COUNTERS + 1) >> 1) > > > > DECLARE_STATIC_KEY_FALSE(kvm_arm_pmu_available); > > +void kvm_pmu_init(void); > > > > static __always_inline bool kvm_arm_support_pmu_v3(void) > > { > > Note that this patch is now conflicting with e840f42a4992 ("KVM: > arm64: Fix PMU probe ordering"), which was merged in -rc4. Moving the > static key definition to arch/arm64/kvm/pmu-emul.c and getting rid of > kvm_pmu_init() altogether should be enough to resolve it. Defining kvm_arm_pmu_available in pmu-emul.c doesn't work as-is because pmu-emul.c depends on CONFIG_HW_PERF_EVENTS=y. Since pmu-emul.c is the only path that enables the key, my plan is to add a prep match to bury kvm_arm_pmu_available behind the existing #ifdef CONFIG_HW_PERF_EVENTS in arm_pmu.h and add a stub for kvm_arm_support_pmu_v3(). The only ugly part is that the KVM_NVHE_ALIAS() also gains an #ifdef, but that doesn't seem too bad. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm