From: Joerg Roedel <joerg.roedel@amd.com>
To: Maik Hentsche <maik.hentsche@amd.com>
Cc: Avi Kivity <avi@redhat.com>,
kvm@vger.kernel.org, Eduardo Habkost <ehabkost@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [PATCH] kvm-userspace: fix module build with --kerneldir
Date: Tue, 9 Dec 2008 16:02:41 +0100 [thread overview]
Message-ID: <20081209150241.GY12816@amd.com> (raw)
In-Reply-To: <20081201152831.63f7ffc0@siegfried>
Hey Avi,
do you plan to apply this patch? Or, if not, can you give a comment why
not?
Thanks,
Joerg
On Mon, Dec 01, 2008 at 03:28:31PM +0100, Maik Hentsche wrote:
> Please find my reworked patch attached. Support for pre-f1d28fb04
> kernels was tested with 2.6.16.1. I CC-ed everyone who contributed to
> this thread, thanks for your help. I hope the "bureaucracy" is correct.
> I'm not a kernel developer and thus only know about the contribution
> process what I found in the documentation.
>
> so long
> Maik
>
> ----
>
> When kvm-userspace is build with a different kernel version than the
> running kernel the depmod at the end will fail. This patch fixed the
> problem.
>
> Signed-off-by: Maik Hentsche <maik.hentsche@amd.com>
> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
>
>
> --
> \ AMD Saxony Limited Liability Company & Co. KG
> Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
> System | Register Court Dresden: HRA 4896
> Research | General Partner authorized to represent:
> Center | AMD Saxony LLC (Wilmington, Delaware, US)
> / General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe,
> Thomas McCoy
> diff --git a/configure b/configure
> index 63f956c..97a7cb7 100755
> --- a/configure
> +++ b/configure
> @@ -15,6 +15,12 @@ qemu_opts=()
> cross_prefix=
> arch=`uname -m`
> target_exec=
> +# don't use uname if kerneldir is set
> +no_uname=
> +depmod_version=
> +if [ -z "TMPDIR" ] ; then
> + TMPDIR=.
> +fi
>
> usage() {
> cat <<-EOF
> @@ -56,6 +62,7 @@ while [[ "$1" = -* ]]; do
> ;;
> --kerneldir)
> kerneldir="$arg"
> + no_uname=1
> ;;
> --with-patched-kernel)
> want_module=
> @@ -112,6 +119,21 @@ if [ -d "$kerneldir/include2" ]; then
> kernelsourcedir=${kerneldir%/*}/source
> fi
>
> +if [ -n "$no_uname" ]; then
> + if [ -e "$kerneldir/.kernelrelease" ]; then
> + depmod_version=`cat "$kerneldir/.kernelrelease"`
> +
> + elif [ -e "$kerneldir/include/config/kernel.release" ]; then
> + depmod_version=`cat "$kerneldir/include/config/kernel.release"`
> + else
> + echo
> + echo "Error: kernelversion not found"
> + echo "Please make sure your kernel is configured"
> + echo
> + exit 1
> + fi
> +fi
> +
> #configure user dir
> (cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \
> --arch="$arch" --processor="$processor" \
> @@ -143,6 +165,7 @@ CC=$cross_prefix$cc
> LD=$cross_prefix$ld
> OBJCOPY=$cross_prefix$objcopy
> AR=$cross_prefix$ar
> +DEPMOD_VERSION=$depmod_version
> EOF
>
> cat <<EOF > kernel/config.kbuild
> diff --git a/kernel/Makefile b/kernel/Makefile
> index 41449d6..8315e3d 100644
> --- a/kernel/Makefile
> +++ b/kernel/Makefile
> @@ -107,7 +107,7 @@ install:
> $(ORIGMODDIR)/arch/$(ARCH_DIR)/kvm/*.ko; do \
> if [ -f "$$i" ]; then mv "$$i" "$$i.orig"; fi; \
> done
> - /sbin/depmod -a
> + /sbin/depmod -a $(DEPMOD_VERSION)
>
> tmpspec = .tmp.kvm-kmod.spec
>
--
| AMD Saxony Limited Liability Company & Co. KG
Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
System | Register Court Dresden: HRA 4896
Research | General Partner authorized to represent:
Center | AMD Saxony LLC (Wilmington, Delaware, US)
| General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
next prev parent reply other threads:[~2008-12-09 15:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-25 13:57 [PATCH] kvm-userspace: fix module build with --kerneldir Joerg Roedel
2008-11-26 10:42 ` Avi Kivity
2008-11-26 10:59 ` Maik Hentsche
2008-11-26 11:14 ` Avi Kivity
2008-11-26 12:14 ` Maik Hentsche
2008-11-26 16:03 ` Avi Kivity
2008-11-26 12:16 ` Jan Kiszka
2008-11-26 16:00 ` Avi Kivity
2008-11-27 14:15 ` Eduardo Habkost
2008-11-27 14:26 ` Avi Kivity
2008-12-01 14:28 ` Maik Hentsche
2008-12-09 15:02 ` Joerg Roedel [this message]
2008-12-10 10:06 ` Avi Kivity
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=20081209150241.GY12816@amd.com \
--to=joerg.roedel@amd.com \
--cc=avi@redhat.com \
--cc=ehabkost@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=maik.hentsche@amd.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;
as well as URLs for NNTP newsgroup(s).