From: Andrea Arcangeli <andrea-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: swapping with MMU Notifiers V2
Date: Thu, 31 Jan 2008 19:56:29 +0100 [thread overview]
Message-ID: <20080131185629.GP7185@v2.random> (raw)
In-Reply-To: <20080131125842.GL7185-lysg2Xt5kKMAvxtiuMwx3w@public.gmane.org>
On Thu, Jan 31, 2008 at 01:58:42PM +0100, Andrea Arcangeli wrote:
> It might also be something stale in the buildsystem (perhaps a distcc
> of ccache glitch?), I also cleared 1G of ccache just to be sure in
My build problem might have been related to the fact the
kvm-userland/kernel/include directory isn't used by the kernel build
system while building the external module. I did the kvm modifications
to the kvm.git, synching from kvm.git to kvm-userland.git and then
building the external module against a third tree that happen to have
the kvm_* headers too but slightly different. I thought the
kvm-userland/kernel/include directory was used but apparently it isn't
anymore because the way it gets priority is a bit fragile.
This seems to fix things but it's certainly not more robust, it just
happens to build and run fine so far. I hope there's a better way to
make it work ;)
Signed-off-by: Andrea Arcangeli <andrea-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h
index 052d561..96f61d8 100644
--- a/kernel/external-module-compat.h
+++ b/kernel/external-module-compat.h
@@ -10,8 +10,62 @@
#include <linux/compiler.h>
#include <linux/version.h>
#include <linux/string.h>
-#include "include/linux/kvm.h"
+
+#ifndef CONFIG_PREEMPT_NOTIFIERS
+#include <linux/preempt.h>
+#define CONFIG_PREEMPT_NOTIFIERS
+#define CONFIG_PREEMPT_NOTIFIERS_COMPAT
+
+struct preempt_notifier;
+
+struct preempt_ops {
+ void (*sched_in)(struct preempt_notifier *notifier, int cpu);
+ void (*sched_out)(struct preempt_notifier *notifier,
+ struct task_struct *next);
+};
+
+struct preempt_notifier {
+ struct list_head link;
+ struct task_struct *tsk;
+ struct preempt_ops *ops;
+};
+
+void preempt_notifier_register(struct preempt_notifier *notifier);
+void preempt_notifier_unregister(struct preempt_notifier *notifier);
+
+static inline void preempt_notifier_init(struct preempt_notifier *notifier,
+ struct preempt_ops *ops)
+{
+ notifier->ops = ops;
+}
+
+void start_special_insn(void);
+void end_special_insn(void);
+void in_special_section(void);
+void special_reload_dr7(void);
+
+void preempt_notifier_sys_init(void);
+void preempt_notifier_sys_exit(void);
+
+#else
+
+static inline void start_special_insn(void) {}
+static inline void end_special_insn(void) {}
+static inline void in_special_section(void) {}
+static inline void special_reload_dr7(void) {}
+
+static inline void preempt_notifier_sys_init(void) {}
+static inline void preempt_notifier_sys_exit(void) {}
+
+#endif
+
+#include "include/asm/kvm_para.h"
+#include "include/asm/kvm.h"
+#include "include/linux/kvm_types.h"
#include "include/linux/kvm_para.h"
+#include "include/linux/kvm.h"
+#include "include/asm/kvm_host.h"
+#include "include/linux/kvm_host.h"
#include <linux/cpu.h>
#include <asm/processor.h>
#include <linux/hrtimer.h>
@@ -347,53 +401,6 @@ static inline unsigned long long __kvm_cmpxchg64(volatile void *ptr,
#endif
-#ifndef CONFIG_PREEMPT_NOTIFIERS
-#define CONFIG_PREEMPT_NOTIFIERS
-#define CONFIG_PREEMPT_NOTIFIERS_COMPAT
-
-struct preempt_notifier;
-
-struct preempt_ops {
- void (*sched_in)(struct preempt_notifier *notifier, int cpu);
- void (*sched_out)(struct preempt_notifier *notifier,
- struct task_struct *next);
-};
-
-struct preempt_notifier {
- struct list_head link;
- struct task_struct *tsk;
- struct preempt_ops *ops;
-};
-
-void preempt_notifier_register(struct preempt_notifier *notifier);
-void preempt_notifier_unregister(struct preempt_notifier *notifier);
-
-static inline void preempt_notifier_init(struct preempt_notifier *notifier,
- struct preempt_ops *ops)
-{
- notifier->ops = ops;
-}
-
-void start_special_insn(void);
-void end_special_insn(void);
-void in_special_section(void);
-void special_reload_dr7(void);
-
-void preempt_notifier_sys_init(void);
-void preempt_notifier_sys_exit(void);
-
-#else
-
-static inline void start_special_insn(void) {}
-static inline void end_special_insn(void) {}
-static inline void in_special_section(void) {}
-static inline void special_reload_dr7(void) {}
-
-static inline void preempt_notifier_sys_init(void) {}
-static inline void preempt_notifier_sys_exit(void) {}
-
-#endif
-
/* HRTIMER_MODE_ABS started life with a different name */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)
#define HRTIMER_MODE_ABS HRTIMER_ABS
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-01-31 18:56 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-29 14:50 swapping with MMU Notifiers V2 Andrea Arcangeli
[not found] ` <20080129145021.GJ7233-lysg2Xt5kKMAvxtiuMwx3w@public.gmane.org>
2008-01-29 15:13 ` Izik Eidus
2008-01-29 16:14 ` Carsten Otte
[not found] ` <479F50D6.4020005-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2008-01-29 16:24 ` Avi Kivity
[not found] ` <479F532C.1020503-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-29 16:31 ` Carsten Otte
2008-01-29 16:35 ` Carsten Otte
[not found] ` <479F55D6.1090807-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2008-01-29 17:02 ` Avi Kivity
[not found] ` <479F5C3C.7070501-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-29 18:13 ` Joerg Roedel
2008-01-29 17:54 ` Andrea Arcangeli
[not found] ` <20080129175420.GR7233-lysg2Xt5kKMAvxtiuMwx3w@public.gmane.org>
2008-01-29 18:05 ` Avi Kivity
[not found] ` <479F6AE0.3080702-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-29 18:34 ` Andrea Arcangeli
2008-01-30 11:26 ` Carsten Otte
[not found] ` <47A05EEF.3010701-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2008-01-30 11:42 ` Andrea Arcangeli
[not found] ` <20080130114206.GG7233-lysg2Xt5kKMAvxtiuMwx3w@public.gmane.org>
2008-01-30 15:01 ` Carsten Otte
[not found] ` <47A09142.4090307-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2008-01-30 15:09 ` Avi Kivity
[not found] ` <47A09342.1040708-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-30 15:14 ` Carsten Otte
2008-01-29 18:19 ` Joerg Roedel
[not found] ` <20080129181918.GA6344-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2008-01-29 18:42 ` Andrea Arcangeli
2008-01-30 9:49 ` Carsten Otte
[not found] ` <47A04816.4090408-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2008-01-30 14:38 ` Joerg Roedel
2008-01-29 16:52 ` Andrea Arcangeli
[not found] ` <20080129165219.GN7233-lysg2Xt5kKMAvxtiuMwx3w@public.gmane.org>
2008-01-29 17:17 ` Carsten Otte
[not found] ` <479F5FBF.40203-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2008-01-29 17:39 ` Andrea Arcangeli
2008-01-29 16:49 ` Andrea Arcangeli
[not found] ` <20080129164954.GM7233-lysg2Xt5kKMAvxtiuMwx3w@public.gmane.org>
2008-01-29 17:04 ` Avi Kivity
[not found] ` <479F5CBB.5060702-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-29 17:49 ` Andrea Arcangeli
[not found] ` <20080129174955.GQ7233-lysg2Xt5kKMAvxtiuMwx3w@public.gmane.org>
2008-01-29 17:53 ` Avi Kivity
2008-01-29 17:17 ` Carsten Otte
2008-01-30 18:57 ` Andrea Arcangeli
[not found] ` <20080130185735.GS7233-lysg2Xt5kKMAvxtiuMwx3w@public.gmane.org>
2008-01-31 6:50 ` Avi Kivity
[not found] ` <47A16F99.8060502-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-31 10:15 ` Andrea Arcangeli
[not found] ` <20080131101519.GG7185-lysg2Xt5kKMAvxtiuMwx3w@public.gmane.org>
2008-01-31 10:34 ` Avi Kivity
[not found] ` <47A1A43D.6020203-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-31 12:58 ` Andrea Arcangeli
[not found] ` <20080131125842.GL7185-lysg2Xt5kKMAvxtiuMwx3w@public.gmane.org>
2008-01-31 18:56 ` Andrea Arcangeli [this message]
2008-02-11 8:20 ` Avi Kivity
2008-02-11 11:37 ` Andrea Arcangeli
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=20080131185629.GP7185@v2.random \
--to=andrea-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/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