Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: chris.j.arges@canonical.com (Chris J Arges)
Subject: [lttng-dev] [PATCH lttng-modules] Fix: disable kvm probe if lapic.h isn't found
Date: Fri, 24 Jul 2015 13:18:59 -0500	[thread overview]
Message-ID: <1437761939-1782-1-git-send-email-chris.j.arges@canonical.com> (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




             reply	other threads:[~2015-07-24 18:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 18:18 Chris J Arges [this message]
2015-07-27 15:48 ` Mathieu Desnoyers
2015-07-27 16:09   ` Chris J Arges
2015-07-27 20:02 ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1437761939-1782-1-git-send-email-chris.j.arges@canonical.com \
    --to=chris.j.arges@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox