in exec.c #ifdef MADV_MERGEABLE madvise(new_block->host, size, MADV_MERGEABLE); #endif MADV_MERGEABLE undefined, KMS not work need added this patch to ebuild - --- qemu-kvm-0.12.2_orig/exec.c>2010-02-18 19:04:32.000000000 +0200 +++ qemu-kvm-0.12.2/exec.c<---->2010-02-18 19:10:39.000000000 +0200 @@ -22,6 +22,7 @@ #else #include <sys/types.h> #include <sys/mman.h> +#include <asm-generic/mman-common.h> #endif #include <stdlib.h> #include <stdio.h>
Created attachment 220197 [details, diff] patch enable KMS
it doesn't look correct, probably we just need to update the system headers a bit
(In reply to comment #2) > it doesn't look correct, probably we just need to update the system headers a > bit i am use latest linux-headers (2.6.32) MADV_MERGEABLE defined only in asm-generic/mman-common.h (included in asm/mman.h) in sys/mman.h not defined properly be include <asm/mman.h>..... ps: sorry for my english)
asm/mman.h should be included already through the sys/mman.h ... strange
I do not think so - $ grep asm/mman.h /usr/include/sys/mman.h $ grep /mman.h /usr/include/sys/mman.h #include <bits/mman.h> #endif /* sys/mman.h */ $ qfile /usr/include/sys/mman.h sys-libs/glibc-2.11-r1 (/usr/include/sys/mman.h) $ qfile /usr/include/asm/mman.h sys-kernel/linux-headers-2.6.32 (/usr/include/asm/mman.h) may be developers forgot to add <asm/mman.h> ? or it is should be included in other versions of glibc ?
> may be developers forgot to add <asm/mman.h> ? qemu-kvm developers )
Did you remember to rebuild glibc after updating linux-headers?
(In reply to comment #7) > Did you remember to rebuild glibc after updating linux-headers? > yes, glibc has been rebuild after updating linux-headers...
I can confirm that glibc isn't pulling in the correct bits after a recompile. This issue however isn't with qemu-kvm needing to pull in more headers, its the fact that glibc needs to expose these defines properly to user-space.
these have been added to upstream glibc's mman.h, but you probably want to have things working today rather than in a few months. so i suggest you do something like: #include <sys/mman.h> #ifndef MADV_MERGEABLE #include <asm/mman.h> #endif
Fixed with 0.12.3-r1
Please note this has been fixed upstream with glibc 2.11.1 which is in the tree now, see gentoo bug #315477: [BZ #10972] * sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Add new MADV_* constants from recent kernels. * sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/sh/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise. I recommend removing the patch and maybe adding an elog message, that KSM will only work with >=sys-kernel/linux-headers-2.6.32 and >=sys-libs/glibc-2.11.1
Why should we change the currently working versions with the patch also working with glibc-2.11.1? If we require those versions, that would not be an elog message, but a dependency. But why do you want to force testing versions on users, when the stable ones do also work? ;-) So as short answer: No, we wont change the ebuilds now, but might drop the patch, once glibc-2.11.1 got stable on all relevant arches.