public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Pelle <Pelle-5JapdU7xTciEVqv0pETR8A@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [ANNOUNCE] kvm-38 release
Date: Wed, 12 Sep 2007 12:30:16 +0300	[thread overview]
Message-ID: <46E7B1A8.9010206@qumranet.com> (raw)
In-Reply-To: <46E7AC76.8000903-5JapdU7xTciEVqv0pETR8A@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

Pelle wrote:
> Hi,
>
> What kernel is required to run this version?
> I get the message
> kvm: unknown symbol div64_64
> when inserting this module in my ubuntu feisty 2.6.20-16-generic kernel.
> A quick google led me to believe this is only recently included in the 
> kernel.
>

Please try the attached patch.

-- 
error compiling committee.c: too many arguments to function


[-- Attachment #2: div64_64-compat.patch --]
[-- Type: text/x-patch, Size: 1119 bytes --]

diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h
index 74bc072..a60d98b 100644
--- a/kernel/external-module-compat.h
+++ b/kernel/external-module-compat.h
@@ -13,6 +13,7 @@
 #include <linux/cpu.h>
 #include <asm/processor.h>
 #include <linux/hrtimer.h>
+#include <asm/bitops.h>
 
 /*
  * 2.6.16 does not have GFP_NOWAIT
@@ -368,3 +369,38 @@ static inline void preempt_notifier_sys_exit(void) {}
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)
 #define HRTIMER_MODE_ABS HRTIMER_ABS
 #endif
+
+/* div64_64 is fairly new */
+#ifdef LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,21)
+
+#ifdef CONFIG_64BIT
+
+static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor)
+{
+	return dividend / divisor;
+}
+
+#else
+
+/* 64bit divisor, dividend and result. dynamic precision */
+static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor)
+{
+	uint32_t high, d;
+
+	high = divisor >> 32;
+	if (high) {
+		unsigned int shift = fls(high);
+
+		d = divisor >> shift;
+		dividend >>= shift;
+	} else
+		d = divisor;
+
+	do_div(dividend, d);
+
+	return dividend;
+}
+
+#endif
+
+#endif

[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

  parent reply	other threads:[~2007-09-12  9:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-12  8:58 [ANNOUNCE] kvm-38 release Avi Kivity
     [not found] ` <46E7AA1B.2070404-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-12  9:08   ` Pelle
     [not found]     ` <46E7AC76.8000903-5JapdU7xTciEVqv0pETR8A@public.gmane.org>
2007-09-12  9:21       ` Avi Kivity
2007-09-12  9:30       ` Avi Kivity [this message]
     [not found]         ` <46E7B1A8.9010206-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-12  9:43           ` Dong, Eddie
     [not found]             ` <10EA09EFD8728347A513008B6B0DA77A0210915C-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-09-12  9:47               ` Avi Kivity
2007-09-12  9:48           ` Pelle
     [not found]             ` <46E7B5E8.5000004-5JapdU7xTciEVqv0pETR8A@public.gmane.org>
2007-09-12 12:38               ` Haydn Solomon
     [not found]                 ` <b75785ba0709120538v50460c90y50593096f0303b68-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-09-12 15:29                   ` Haydn Solomon
     [not found]                     ` <b75785ba0709120829v153ab998me43fe5e68363065f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-09-14 17:12                       ` Avi Kivity
     [not found]                         ` <46EAC101.9040107-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-14 17:28                           ` Luca
     [not found]                             ` <68676e00709141028p11545118m3009ee6b6f13da78-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-09-14 19:20                               ` Haydn Solomon
2007-09-23  8:51                       ` Avi Kivity
     [not found]                         ` <46F628FC.4030906-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-23 13:27                           ` Haydn Solomon
     [not found]                             ` <b75785ba0709230627r4a0827cap291adfc8c05c8a81-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-09-23 13:44                               ` Haydn Solomon

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=46E7B1A8.9010206@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=Pelle-5JapdU7xTciEVqv0pETR8A@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