* [PATCH] KVM: arm64: build perf support only when enabled
@ 2021-04-21 13:49 ` Arnd Bergmann
0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2021-04-21 13:49 UTC (permalink / raw)
To: Marc Zyngier, Catalin Marinas, Will Deacon
Cc: Arnd Bergmann, James Morse, Alexandru Elisei, Suzuki K Poulose,
Fuad Tabba, Andrew Scull, David Brazdil, Quentin Perret,
linux-arm-kernel, kvmarm, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The perf_num_counters() function is only defined when CONFIG_PERF_EVENTS
is enabled:
arch/arm64/kvm/perf.c: In function 'kvm_perf_init':
arch/arm64/kvm/perf.c:58:43: error: implicit declaration of function 'perf_num_counters'; did you mean 'dec_mm_counter'? [-Werror=implicit-function-declaration]
58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0
| ^~~~~~~~~~~~~~~~~
Use conditional compilation to disable this feature entirely when
CONFIG_PERF_EVENTS is disabled in the host.
Fixes: 6b5b368fccd7 ("KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Not sure if this is the correct symbol to check for, but this is
one way to avoid the build failure.
---
arch/arm64/kvm/Makefile | 4 +++-
arch/arm64/kvm/arm.c | 8 +++++---
include/kvm/arm_pmu.h | 7 +++++++
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/kvm/Makefile b/arch/arm64/kvm/Makefile
index 589921392cb1..9adf12ba5047 100644
--- a/arch/arm64/kvm/Makefile
+++ b/arch/arm64/kvm/Makefile
@@ -12,7 +12,7 @@ obj-$(CONFIG_KVM) += hyp/
kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \
$(KVM)/vfio.o $(KVM)/irqchip.o \
- arm.o mmu.o mmio.o psci.o perf.o hypercalls.o pvtime.o \
+ arm.o mmu.o mmio.o psci.o hypercalls.o pvtime.o \
inject_fault.o va_layout.o handle_exit.o \
guest.o debug.o reset.o sys_regs.o \
vgic-sys-reg-v3.o fpsimd.o pmu.o \
@@ -24,4 +24,6 @@ kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \
vgic/vgic-mmio-v3.o vgic/vgic-kvm-device.o \
vgic/vgic-its.o vgic/vgic-debug.o
+kvm-$(CONFIG_PERF_EVENTS) += perf.o
+
kvm-$(CONFIG_HW_PERF_EVENTS) += pmu-emul.o
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 4808aca8c87c..720e075c70f9 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -1694,7 +1694,8 @@ static int init_subsystems(void)
if (err)
goto out;
- kvm_perf_init();
+ if (IS_ENABLED(CONFIG_PERF_EVENTS))
+ kvm_perf_init();
kvm_sys_reg_table_init();
out:
@@ -1899,7 +1900,8 @@ static int init_hyp_mode(void)
return 0;
out_err:
- teardown_hyp_mode();
+ if (IS_ENABLED(CONFIG_PERF_EVENTS))
+ teardown_hyp_mode();
kvm_err("error initializing Hyp mode: %d\n", err);
return err;
}
@@ -2101,7 +2103,7 @@ int kvm_arch_init(void *opaque)
out_hyp:
hyp_cpu_pm_exit();
- if (!in_hyp_mode)
+ if (!IS_ENABLED(CONFIG_PERF_EVENTS) && in_hyp_mode)
teardown_hyp_mode();
out_err:
return err;
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h
index 6fd3cda608e4..d84307a1ebd5 100644
--- a/include/kvm/arm_pmu.h
+++ b/include/kvm/arm_pmu.h
@@ -13,12 +13,19 @@
#define ARMV8_PMU_CYCLE_IDX (ARMV8_PMU_MAX_COUNTERS - 1)
#define ARMV8_PMU_MAX_COUNTER_PAIRS ((ARMV8_PMU_MAX_COUNTERS + 1) >> 1)
+#ifdef CONFIG_PERF_EVENTS
DECLARE_STATIC_KEY_FALSE(kvm_arm_pmu_available);
static __always_inline bool kvm_arm_support_pmu_v3(void)
{
return static_branch_likely(&kvm_arm_pmu_available);
}
+#else
+static __always_inline bool kvm_arm_support_pmu_v3(void)
+{
+ return 0;
+}
+#endif
#ifdef CONFIG_HW_PERF_EVENTS
--
2.29.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] KVM: arm64: build perf support only when enabled
@ 2021-04-21 13:49 ` Arnd Bergmann
0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2021-04-21 13:49 UTC (permalink / raw)
To: Marc Zyngier, Catalin Marinas, Will Deacon
Cc: linux-arm-kernel, Arnd Bergmann, linux-kernel, kvmarm
From: Arnd Bergmann <arnd@arndb.de>
The perf_num_counters() function is only defined when CONFIG_PERF_EVENTS
is enabled:
arch/arm64/kvm/perf.c: In function 'kvm_perf_init':
arch/arm64/kvm/perf.c:58:43: error: implicit declaration of function 'perf_num_counters'; did you mean 'dec_mm_counter'? [-Werror=implicit-function-declaration]
58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0
| ^~~~~~~~~~~~~~~~~
Use conditional compilation to disable this feature entirely when
CONFIG_PERF_EVENTS is disabled in the host.
Fixes: 6b5b368fccd7 ("KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Not sure if this is the correct symbol to check for, but this is
one way to avoid the build failure.
---
arch/arm64/kvm/Makefile | 4 +++-
arch/arm64/kvm/arm.c | 8 +++++---
include/kvm/arm_pmu.h | 7 +++++++
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/kvm/Makefile b/arch/arm64/kvm/Makefile
index 589921392cb1..9adf12ba5047 100644
--- a/arch/arm64/kvm/Makefile
+++ b/arch/arm64/kvm/Makefile
@@ -12,7 +12,7 @@ obj-$(CONFIG_KVM) += hyp/
kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \
$(KVM)/vfio.o $(KVM)/irqchip.o \
- arm.o mmu.o mmio.o psci.o perf.o hypercalls.o pvtime.o \
+ arm.o mmu.o mmio.o psci.o hypercalls.o pvtime.o \
inject_fault.o va_layout.o handle_exit.o \
guest.o debug.o reset.o sys_regs.o \
vgic-sys-reg-v3.o fpsimd.o pmu.o \
@@ -24,4 +24,6 @@ kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \
vgic/vgic-mmio-v3.o vgic/vgic-kvm-device.o \
vgic/vgic-its.o vgic/vgic-debug.o
+kvm-$(CONFIG_PERF_EVENTS) += perf.o
+
kvm-$(CONFIG_HW_PERF_EVENTS) += pmu-emul.o
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 4808aca8c87c..720e075c70f9 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -1694,7 +1694,8 @@ static int init_subsystems(void)
if (err)
goto out;
- kvm_perf_init();
+ if (IS_ENABLED(CONFIG_PERF_EVENTS))
+ kvm_perf_init();
kvm_sys_reg_table_init();
out:
@@ -1899,7 +1900,8 @@ static int init_hyp_mode(void)
return 0;
out_err:
- teardown_hyp_mode();
+ if (IS_ENABLED(CONFIG_PERF_EVENTS))
+ teardown_hyp_mode();
kvm_err("error initializing Hyp mode: %d\n", err);
return err;
}
@@ -2101,7 +2103,7 @@ int kvm_arch_init(void *opaque)
out_hyp:
hyp_cpu_pm_exit();
- if (!in_hyp_mode)
+ if (!IS_ENABLED(CONFIG_PERF_EVENTS) && in_hyp_mode)
teardown_hyp_mode();
out_err:
return err;
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h
index 6fd3cda608e4..d84307a1ebd5 100644
--- a/include/kvm/arm_pmu.h
+++ b/include/kvm/arm_pmu.h
@@ -13,12 +13,19 @@
#define ARMV8_PMU_CYCLE_IDX (ARMV8_PMU_MAX_COUNTERS - 1)
#define ARMV8_PMU_MAX_COUNTER_PAIRS ((ARMV8_PMU_MAX_COUNTERS + 1) >> 1)
+#ifdef CONFIG_PERF_EVENTS
DECLARE_STATIC_KEY_FALSE(kvm_arm_pmu_available);
static __always_inline bool kvm_arm_support_pmu_v3(void)
{
return static_branch_likely(&kvm_arm_pmu_available);
}
+#else
+static __always_inline bool kvm_arm_support_pmu_v3(void)
+{
+ return 0;
+}
+#endif
#ifdef CONFIG_HW_PERF_EVENTS
--
2.29.2
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] KVM: arm64: build perf support only when enabled
@ 2021-04-21 13:49 ` Arnd Bergmann
0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2021-04-21 13:49 UTC (permalink / raw)
To: Marc Zyngier, Catalin Marinas, Will Deacon
Cc: Arnd Bergmann, James Morse, Alexandru Elisei, Suzuki K Poulose,
Fuad Tabba, Andrew Scull, David Brazdil, Quentin Perret,
linux-arm-kernel, kvmarm, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The perf_num_counters() function is only defined when CONFIG_PERF_EVENTS
is enabled:
arch/arm64/kvm/perf.c: In function 'kvm_perf_init':
arch/arm64/kvm/perf.c:58:43: error: implicit declaration of function 'perf_num_counters'; did you mean 'dec_mm_counter'? [-Werror=implicit-function-declaration]
58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0
| ^~~~~~~~~~~~~~~~~
Use conditional compilation to disable this feature entirely when
CONFIG_PERF_EVENTS is disabled in the host.
Fixes: 6b5b368fccd7 ("KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Not sure if this is the correct symbol to check for, but this is
one way to avoid the build failure.
---
arch/arm64/kvm/Makefile | 4 +++-
arch/arm64/kvm/arm.c | 8 +++++---
include/kvm/arm_pmu.h | 7 +++++++
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/kvm/Makefile b/arch/arm64/kvm/Makefile
index 589921392cb1..9adf12ba5047 100644
--- a/arch/arm64/kvm/Makefile
+++ b/arch/arm64/kvm/Makefile
@@ -12,7 +12,7 @@ obj-$(CONFIG_KVM) += hyp/
kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \
$(KVM)/vfio.o $(KVM)/irqchip.o \
- arm.o mmu.o mmio.o psci.o perf.o hypercalls.o pvtime.o \
+ arm.o mmu.o mmio.o psci.o hypercalls.o pvtime.o \
inject_fault.o va_layout.o handle_exit.o \
guest.o debug.o reset.o sys_regs.o \
vgic-sys-reg-v3.o fpsimd.o pmu.o \
@@ -24,4 +24,6 @@ kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \
vgic/vgic-mmio-v3.o vgic/vgic-kvm-device.o \
vgic/vgic-its.o vgic/vgic-debug.o
+kvm-$(CONFIG_PERF_EVENTS) += perf.o
+
kvm-$(CONFIG_HW_PERF_EVENTS) += pmu-emul.o
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 4808aca8c87c..720e075c70f9 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -1694,7 +1694,8 @@ static int init_subsystems(void)
if (err)
goto out;
- kvm_perf_init();
+ if (IS_ENABLED(CONFIG_PERF_EVENTS))
+ kvm_perf_init();
kvm_sys_reg_table_init();
out:
@@ -1899,7 +1900,8 @@ static int init_hyp_mode(void)
return 0;
out_err:
- teardown_hyp_mode();
+ if (IS_ENABLED(CONFIG_PERF_EVENTS))
+ teardown_hyp_mode();
kvm_err("error initializing Hyp mode: %d\n", err);
return err;
}
@@ -2101,7 +2103,7 @@ int kvm_arch_init(void *opaque)
out_hyp:
hyp_cpu_pm_exit();
- if (!in_hyp_mode)
+ if (!IS_ENABLED(CONFIG_PERF_EVENTS) && in_hyp_mode)
teardown_hyp_mode();
out_err:
return err;
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h
index 6fd3cda608e4..d84307a1ebd5 100644
--- a/include/kvm/arm_pmu.h
+++ b/include/kvm/arm_pmu.h
@@ -13,12 +13,19 @@
#define ARMV8_PMU_CYCLE_IDX (ARMV8_PMU_MAX_COUNTERS - 1)
#define ARMV8_PMU_MAX_COUNTER_PAIRS ((ARMV8_PMU_MAX_COUNTERS + 1) >> 1)
+#ifdef CONFIG_PERF_EVENTS
DECLARE_STATIC_KEY_FALSE(kvm_arm_pmu_available);
static __always_inline bool kvm_arm_support_pmu_v3(void)
{
return static_branch_likely(&kvm_arm_pmu_available);
}
+#else
+static __always_inline bool kvm_arm_support_pmu_v3(void)
+{
+ return 0;
+}
+#endif
#ifdef CONFIG_HW_PERF_EVENTS
--
2.29.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] KVM: arm64: build perf support only when enabled
2021-04-21 13:49 ` Arnd Bergmann
(?)
@ 2021-04-21 13:56 ` Marc Zyngier
-1 siblings, 0 replies; 12+ messages in thread
From: Marc Zyngier @ 2021-04-21 13:56 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Catalin Marinas, Will Deacon, Arnd Bergmann, James Morse,
Alexandru Elisei, Suzuki K Poulose, Fuad Tabba, Andrew Scull,
David Brazdil, Quentin Perret, linux-arm-kernel, kvmarm,
linux-kernel
On Wed, 21 Apr 2021 14:49:01 +0100,
Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The perf_num_counters() function is only defined when CONFIG_PERF_EVENTS
> is enabled:
>
> arch/arm64/kvm/perf.c: In function 'kvm_perf_init':
> arch/arm64/kvm/perf.c:58:43: error: implicit declaration of function 'perf_num_counters'; did you mean 'dec_mm_counter'? [-Werror=implicit-function-declaration]
> 58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0
> | ^~~~~~~~~~~~~~~~~
>
> Use conditional compilation to disable this feature entirely when
> CONFIG_PERF_EVENTS is disabled in the host.
>
> Fixes: 6b5b368fccd7 ("KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> Not sure if this is the correct symbol to check for, but this is
> one way to avoid the build failure.
I think a better way is to get rid of perf_num_counters() entirely,
see [1]. If someone acks the second and last patches, I'll even take
the whole series in (nudge nudge...).
Thanks,
M.
[1] https://lore.kernel.org/r/20210414134409.1266357-1-maz@kernel.org
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] KVM: arm64: build perf support only when enabled
@ 2021-04-21 13:56 ` Marc Zyngier
0 siblings, 0 replies; 12+ messages in thread
From: Marc Zyngier @ 2021-04-21 13:56 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, Arnd Bergmann, Catalin Marinas, linux-kernel,
Will Deacon, kvmarm
On Wed, 21 Apr 2021 14:49:01 +0100,
Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The perf_num_counters() function is only defined when CONFIG_PERF_EVENTS
> is enabled:
>
> arch/arm64/kvm/perf.c: In function 'kvm_perf_init':
> arch/arm64/kvm/perf.c:58:43: error: implicit declaration of function 'perf_num_counters'; did you mean 'dec_mm_counter'? [-Werror=implicit-function-declaration]
> 58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0
> | ^~~~~~~~~~~~~~~~~
>
> Use conditional compilation to disable this feature entirely when
> CONFIG_PERF_EVENTS is disabled in the host.
>
> Fixes: 6b5b368fccd7 ("KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> Not sure if this is the correct symbol to check for, but this is
> one way to avoid the build failure.
I think a better way is to get rid of perf_num_counters() entirely,
see [1]. If someone acks the second and last patches, I'll even take
the whole series in (nudge nudge...).
Thanks,
M.
[1] https://lore.kernel.org/r/20210414134409.1266357-1-maz@kernel.org
--
Without deviation from the norm, progress is not possible.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] KVM: arm64: build perf support only when enabled
@ 2021-04-21 13:56 ` Marc Zyngier
0 siblings, 0 replies; 12+ messages in thread
From: Marc Zyngier @ 2021-04-21 13:56 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Catalin Marinas, Will Deacon, Arnd Bergmann, James Morse,
Alexandru Elisei, Suzuki K Poulose, Fuad Tabba, Andrew Scull,
David Brazdil, Quentin Perret, linux-arm-kernel, kvmarm,
linux-kernel
On Wed, 21 Apr 2021 14:49:01 +0100,
Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The perf_num_counters() function is only defined when CONFIG_PERF_EVENTS
> is enabled:
>
> arch/arm64/kvm/perf.c: In function 'kvm_perf_init':
> arch/arm64/kvm/perf.c:58:43: error: implicit declaration of function 'perf_num_counters'; did you mean 'dec_mm_counter'? [-Werror=implicit-function-declaration]
> 58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0
> | ^~~~~~~~~~~~~~~~~
>
> Use conditional compilation to disable this feature entirely when
> CONFIG_PERF_EVENTS is disabled in the host.
>
> Fixes: 6b5b368fccd7 ("KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> Not sure if this is the correct symbol to check for, but this is
> one way to avoid the build failure.
I think a better way is to get rid of perf_num_counters() entirely,
see [1]. If someone acks the second and last patches, I'll even take
the whole series in (nudge nudge...).
Thanks,
M.
[1] https://lore.kernel.org/r/20210414134409.1266357-1-maz@kernel.org
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] KVM: arm64: build perf support only when enabled
2021-04-21 13:56 ` Marc Zyngier
(?)
@ 2021-04-21 14:28 ` Arnd Bergmann
-1 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2021-04-21 14:28 UTC (permalink / raw)
To: Marc Zyngier
Cc: Catalin Marinas, Will Deacon, James Morse, Alexandru Elisei,
Suzuki K Poulose, Fuad Tabba, Andrew Scull, David Brazdil,
Quentin Perret, Linux ARM, kvmarm, Linux Kernel Mailing List
On Wed, Apr 21, 2021 at 3:56 PM Marc Zyngier <maz@kernel.org> wrote:
> On Wed, 21 Apr 2021 14:49:01 +0100, Arnd Bergmann <arnd@kernel.org> wrote:
>
> I think a better way is to get rid of perf_num_counters() entirely,
> see [1]. If someone acks the second and last patches, I'll even take
> the whole series in (nudge nudge...).
Makes sense. I like your diffstat, too.
Arnd
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] KVM: arm64: build perf support only when enabled
@ 2021-04-21 14:28 ` Arnd Bergmann
0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2021-04-21 14:28 UTC (permalink / raw)
To: Marc Zyngier
Cc: Linux ARM, Catalin Marinas, Linux Kernel Mailing List,
Will Deacon, kvmarm
On Wed, Apr 21, 2021 at 3:56 PM Marc Zyngier <maz@kernel.org> wrote:
> On Wed, 21 Apr 2021 14:49:01 +0100, Arnd Bergmann <arnd@kernel.org> wrote:
>
> I think a better way is to get rid of perf_num_counters() entirely,
> see [1]. If someone acks the second and last patches, I'll even take
> the whole series in (nudge nudge...).
Makes sense. I like your diffstat, too.
Arnd
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] KVM: arm64: build perf support only when enabled
@ 2021-04-21 14:28 ` Arnd Bergmann
0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2021-04-21 14:28 UTC (permalink / raw)
To: Marc Zyngier
Cc: Catalin Marinas, Will Deacon, James Morse, Alexandru Elisei,
Suzuki K Poulose, Fuad Tabba, Andrew Scull, David Brazdil,
Quentin Perret, Linux ARM, kvmarm, Linux Kernel Mailing List
On Wed, Apr 21, 2021 at 3:56 PM Marc Zyngier <maz@kernel.org> wrote:
> On Wed, 21 Apr 2021 14:49:01 +0100, Arnd Bergmann <arnd@kernel.org> wrote:
>
> I think a better way is to get rid of perf_num_counters() entirely,
> see [1]. If someone acks the second and last patches, I'll even take
> the whole series in (nudge nudge...).
Makes sense. I like your diffstat, too.
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] KVM: arm64: build perf support only when enabled
2021-04-21 13:56 ` Marc Zyngier
(?)
@ 2021-04-22 10:12 ` Will Deacon
-1 siblings, 0 replies; 12+ messages in thread
From: Will Deacon @ 2021-04-22 10:12 UTC (permalink / raw)
To: Marc Zyngier
Cc: Arnd Bergmann, Catalin Marinas, Arnd Bergmann, James Morse,
Alexandru Elisei, Suzuki K Poulose, Fuad Tabba, Andrew Scull,
David Brazdil, Quentin Perret, linux-arm-kernel, kvmarm,
linux-kernel
On Wed, Apr 21, 2021 at 02:56:16PM +0100, Marc Zyngier wrote:
> On Wed, 21 Apr 2021 14:49:01 +0100,
> Arnd Bergmann <arnd@kernel.org> wrote:
> >
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > The perf_num_counters() function is only defined when CONFIG_PERF_EVENTS
> > is enabled:
> >
> > arch/arm64/kvm/perf.c: In function 'kvm_perf_init':
> > arch/arm64/kvm/perf.c:58:43: error: implicit declaration of function 'perf_num_counters'; did you mean 'dec_mm_counter'? [-Werror=implicit-function-declaration]
> > 58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0
> > | ^~~~~~~~~~~~~~~~~
> >
> > Use conditional compilation to disable this feature entirely when
> > CONFIG_PERF_EVENTS is disabled in the host.
> >
> > Fixes: 6b5b368fccd7 ("KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > Not sure if this is the correct symbol to check for, but this is
> > one way to avoid the build failure.
>
> I think a better way is to get rid of perf_num_counters() entirely,
> see [1]. If someone acks the second and last patches, I'll even take
> the whole series in (nudge nudge...).
Sorry, behind at the moment! Will get to it today.
Will
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] KVM: arm64: build perf support only when enabled
@ 2021-04-22 10:12 ` Will Deacon
0 siblings, 0 replies; 12+ messages in thread
From: Will Deacon @ 2021-04-22 10:12 UTC (permalink / raw)
To: Marc Zyngier
Cc: linux-arm-kernel, Arnd Bergmann, Arnd Bergmann, Catalin Marinas,
linux-kernel, kvmarm
On Wed, Apr 21, 2021 at 02:56:16PM +0100, Marc Zyngier wrote:
> On Wed, 21 Apr 2021 14:49:01 +0100,
> Arnd Bergmann <arnd@kernel.org> wrote:
> >
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > The perf_num_counters() function is only defined when CONFIG_PERF_EVENTS
> > is enabled:
> >
> > arch/arm64/kvm/perf.c: In function 'kvm_perf_init':
> > arch/arm64/kvm/perf.c:58:43: error: implicit declaration of function 'perf_num_counters'; did you mean 'dec_mm_counter'? [-Werror=implicit-function-declaration]
> > 58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0
> > | ^~~~~~~~~~~~~~~~~
> >
> > Use conditional compilation to disable this feature entirely when
> > CONFIG_PERF_EVENTS is disabled in the host.
> >
> > Fixes: 6b5b368fccd7 ("KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > Not sure if this is the correct symbol to check for, but this is
> > one way to avoid the build failure.
>
> I think a better way is to get rid of perf_num_counters() entirely,
> see [1]. If someone acks the second and last patches, I'll even take
> the whole series in (nudge nudge...).
Sorry, behind at the moment! Will get to it today.
Will
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] KVM: arm64: build perf support only when enabled
@ 2021-04-22 10:12 ` Will Deacon
0 siblings, 0 replies; 12+ messages in thread
From: Will Deacon @ 2021-04-22 10:12 UTC (permalink / raw)
To: Marc Zyngier
Cc: Arnd Bergmann, Catalin Marinas, Arnd Bergmann, James Morse,
Alexandru Elisei, Suzuki K Poulose, Fuad Tabba, Andrew Scull,
David Brazdil, Quentin Perret, linux-arm-kernel, kvmarm,
linux-kernel
On Wed, Apr 21, 2021 at 02:56:16PM +0100, Marc Zyngier wrote:
> On Wed, 21 Apr 2021 14:49:01 +0100,
> Arnd Bergmann <arnd@kernel.org> wrote:
> >
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > The perf_num_counters() function is only defined when CONFIG_PERF_EVENTS
> > is enabled:
> >
> > arch/arm64/kvm/perf.c: In function 'kvm_perf_init':
> > arch/arm64/kvm/perf.c:58:43: error: implicit declaration of function 'perf_num_counters'; did you mean 'dec_mm_counter'? [-Werror=implicit-function-declaration]
> > 58 | if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0
> > | ^~~~~~~~~~~~~~~~~
> >
> > Use conditional compilation to disable this feature entirely when
> > CONFIG_PERF_EVENTS is disabled in the host.
> >
> > Fixes: 6b5b368fccd7 ("KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > Not sure if this is the correct symbol to check for, but this is
> > one way to avoid the build failure.
>
> I think a better way is to get rid of perf_num_counters() entirely,
> see [1]. If someone acks the second and last patches, I'll even take
> the whole series in (nudge nudge...).
Sorry, behind at the moment! Will get to it today.
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-04-22 10:14 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 13:49 [PATCH] KVM: arm64: build perf support only when enabled Arnd Bergmann
2021-04-21 13:49 ` Arnd Bergmann
2021-04-21 13:49 ` Arnd Bergmann
2021-04-21 13:56 ` Marc Zyngier
2021-04-21 13:56 ` Marc Zyngier
2021-04-21 13:56 ` Marc Zyngier
2021-04-21 14:28 ` Arnd Bergmann
2021-04-21 14:28 ` Arnd Bergmann
2021-04-21 14:28 ` Arnd Bergmann
2021-04-22 10:12 ` Will Deacon
2021-04-22 10:12 ` Will Deacon
2021-04-22 10:12 ` Will Deacon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.