* [lttng-dev] [PATCH lttng-modules] Fix: disable kvm probe if lapic.h isn't found
@ 2015-07-24 18:18 Chris J Arges
2015-07-27 15:48 ` Mathieu Desnoyers
2015-07-27 20:02 ` Mathieu Desnoyers
0 siblings, 2 replies; 4+ messages in thread
From: Chris J Arges @ 2015-07-24 18:18 UTC (permalink / raw)
In a typical distribution if just linux-headers is installed, lapic.h will
not be installed. We should check if that file exists and not build the module.
Signed-off-by: Chris J Arges <chris.j.arges at canonical.com>
---
probes/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/probes/Makefile b/probes/Makefile
index 0314a5e..cc4c352 100644
--- a/probes/Makefile
+++ b/probes/Makefile
@@ -25,6 +25,8 @@ obj-m += lttng-probe-statedump.o
ifneq ($(CONFIG_KVM),)
obj-m += lttng-probe-kvm.o
ifneq ($(CONFIG_X86),)
+kvm_dep_lapic = $(srctree)/arch/x86/kvm/lapic.h
+ifneq ($(wildcard $(kvm_dep_lapic)),)
kvm_dep = $(srctree)/virt/kvm/iodev.h $(srctree)/include/kvm/iodev.h
ifneq ($(wildcard $(kvm_dep)),)
CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm
@@ -40,6 +42,9 @@ obj-m += $(shell \
else
$(warning File $(kvm_dep) not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.)
endif
+else
+$(warning File $(kvm_dep_lapic) not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.)
+endif
endif
endif
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [lttng-dev] [PATCH lttng-modules] Fix: disable kvm probe if lapic.h isn't found
2015-07-24 18:18 [lttng-dev] [PATCH lttng-modules] Fix: disable kvm probe if lapic.h isn't found Chris J Arges
@ 2015-07-27 15:48 ` Mathieu Desnoyers
2015-07-27 16:09 ` Chris J Arges
2015-07-27 20:02 ` Mathieu Desnoyers
1 sibling, 1 reply; 4+ messages in thread
From: Mathieu Desnoyers @ 2015-07-27 15:48 UTC (permalink / raw)
----- On Jul 24, 2015, at 2:18 PM, Chris J Arges chris.j.arges at canonical.com wrote:
> In a typical distribution if just linux-headers is installed, lapic.h will
> not be installed. We should check if that file exists and not build the module.
Hi Chris,
Although this patch looks technically correct, I'd like to understand
how you triggered this issue in the first place.
If we look at this Makefile, we skip building KVM probes altogether
if neither $(srctree)/virt/kvm/iodev.h nor $(srctree)/include/kvm/iodev.h
are found. AFAIU, none of those headers are installed as linux-headers.
Which of those headers are found in your distribution headers ? Is it
due to a modification specific to Ubuntu or is it something that
appears in mainline kernel ?
Thanks!
Mathieu
>
> Signed-off-by: Chris J Arges <chris.j.arges at canonical.com>
> ---
> probes/Makefile | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/probes/Makefile b/probes/Makefile
> index 0314a5e..cc4c352 100644
> --- a/probes/Makefile
> +++ b/probes/Makefile
> @@ -25,6 +25,8 @@ obj-m += lttng-probe-statedump.o
> ifneq ($(CONFIG_KVM),)
> obj-m += lttng-probe-kvm.o
> ifneq ($(CONFIG_X86),)
> +kvm_dep_lapic = $(srctree)/arch/x86/kvm/lapic.h
> +ifneq ($(wildcard $(kvm_dep_lapic)),)
> kvm_dep = $(srctree)/virt/kvm/iodev.h $(srctree)/include/kvm/iodev.h
> ifneq ($(wildcard $(kvm_dep)),)
> CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm
> @@ -40,6 +42,9 @@ obj-m += $(shell \
> else
> $(warning File $(kvm_dep) not found. Probe "kvm" x86-specific is disabled. Use
> full kernel source tree to enable it.)
> endif
> +else
> +$(warning File $(kvm_dep_lapic) not found. Probe "kvm" x86-specific is
> disabled. Use full kernel source tree to enable it.)
> +endif
> endif
> endif
>
> --
> 2.1.4
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [lttng-dev] [PATCH lttng-modules] Fix: disable kvm probe if lapic.h isn't found
2015-07-27 15:48 ` Mathieu Desnoyers
@ 2015-07-27 16:09 ` Chris J Arges
0 siblings, 0 replies; 4+ messages in thread
From: Chris J Arges @ 2015-07-27 16:09 UTC (permalink / raw)
Mathieu,
I'm testing with Ubuntu Wily using a 4.1 series kernel.
include/kvm/iodev.h is installed by linux-headers with the 4.1 kernel,
and therefore the probe Makefile tries to install the kvm probe, but
then fails to compile because arch/x86/kvm/lapic.h isn't found. All this
obviously works if you point at full sources.
--chris
On 07/27/2015 10:48 AM, Mathieu Desnoyers wrote:
> ----- On Jul 24, 2015, at 2:18 PM, Chris J Arges chris.j.arges at canonical.com wrote:
>
>> In a typical distribution if just linux-headers is installed, lapic.h will
>> not be installed. We should check if that file exists and not build the module.
>
> Hi Chris,
>
> Although this patch looks technically correct, I'd like to understand
> how you triggered this issue in the first place.
>
> If we look at this Makefile, we skip building KVM probes altogether
> if neither $(srctree)/virt/kvm/iodev.h nor $(srctree)/include/kvm/iodev.h
> are found. AFAIU, none of those headers are installed as linux-headers.
>
> Which of those headers are found in your distribution headers ? Is it
> due to a modification specific to Ubuntu or is it something that
> appears in mainline kernel ?
>
> Thanks!
>
> Mathieu
>
>>
>> Signed-off-by: Chris J Arges <chris.j.arges at canonical.com>
>> ---
>> probes/Makefile | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/probes/Makefile b/probes/Makefile
>> index 0314a5e..cc4c352 100644
>> --- a/probes/Makefile
>> +++ b/probes/Makefile
>> @@ -25,6 +25,8 @@ obj-m += lttng-probe-statedump.o
>> ifneq ($(CONFIG_KVM),)
>> obj-m += lttng-probe-kvm.o
>> ifneq ($(CONFIG_X86),)
>> +kvm_dep_lapic = $(srctree)/arch/x86/kvm/lapic.h
>> +ifneq ($(wildcard $(kvm_dep_lapic)),)
>> kvm_dep = $(srctree)/virt/kvm/iodev.h $(srctree)/include/kvm/iodev.h
>> ifneq ($(wildcard $(kvm_dep)),)
>> CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm
>> @@ -40,6 +42,9 @@ obj-m += $(shell \
>> else
>> $(warning File $(kvm_dep) not found. Probe "kvm" x86-specific is disabled. Use
>> full kernel source tree to enable it.)
>> endif
>> +else
>> +$(warning File $(kvm_dep_lapic) not found. Probe "kvm" x86-specific is
>> disabled. Use full kernel source tree to enable it.)
>> +endif
>> endif
>> endif
>>
>> --
>> 2.1.4
>>
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev at lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [lttng-dev] [PATCH lttng-modules] Fix: disable kvm probe if lapic.h isn't found
2015-07-24 18:18 [lttng-dev] [PATCH lttng-modules] Fix: disable kvm probe if lapic.h isn't found Chris J Arges
2015-07-27 15:48 ` Mathieu Desnoyers
@ 2015-07-27 20:02 ` Mathieu Desnoyers
1 sibling, 0 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2015-07-27 20:02 UTC (permalink / raw)
Merged into master and stable-2.6, thanks!
Mathieu
----- On Jul 24, 2015, at 2:18 PM, Chris J Arges chris.j.arges at canonical.com wrote:
> In a typical distribution if just linux-headers is installed, lapic.h will
> not be installed. We should check if that file exists and not build the module.
>
> Signed-off-by: Chris J Arges <chris.j.arges at canonical.com>
> ---
> probes/Makefile | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/probes/Makefile b/probes/Makefile
> index 0314a5e..cc4c352 100644
> --- a/probes/Makefile
> +++ b/probes/Makefile
> @@ -25,6 +25,8 @@ obj-m += lttng-probe-statedump.o
> ifneq ($(CONFIG_KVM),)
> obj-m += lttng-probe-kvm.o
> ifneq ($(CONFIG_X86),)
> +kvm_dep_lapic = $(srctree)/arch/x86/kvm/lapic.h
> +ifneq ($(wildcard $(kvm_dep_lapic)),)
> kvm_dep = $(srctree)/virt/kvm/iodev.h $(srctree)/include/kvm/iodev.h
> ifneq ($(wildcard $(kvm_dep)),)
> CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm
> @@ -40,6 +42,9 @@ obj-m += $(shell \
> else
> $(warning File $(kvm_dep) not found. Probe "kvm" x86-specific is disabled. Use
> full kernel source tree to enable it.)
> endif
> +else
> +$(warning File $(kvm_dep_lapic) not found. Probe "kvm" x86-specific is
> disabled. Use full kernel source tree to enable it.)
> +endif
> endif
> endif
>
> --
> 2.1.4
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-27 20:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-24 18:18 [lttng-dev] [PATCH lttng-modules] Fix: disable kvm probe if lapic.h isn't found Chris J Arges
2015-07-27 15:48 ` Mathieu Desnoyers
2015-07-27 16:09 ` Chris J Arges
2015-07-27 20:02 ` Mathieu Desnoyers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox