First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 157987
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Default Assignee for New Packages <maintainer-wanted@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Leo <sir_kalot@yahoo.it>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
kvm-12.ebuild first draft kvm ebuild text/plain Ryan Hope 2007-02-01 15:20 0000 811 bytes Details
kvm-12.ebuild better version of kvm-12.ebuild text/plain Ryan Hope 2007-02-04 22:28 0000 1.12 KB Details
kvm-12-r1.ebuild.patch ebuild patch tp kvm-12-r1 patch Sander Sweers 2007-02-09 00:54 0000 1.48 KB Details | Diff
kvm-12-r2.ebuild ebuild kvm-12-r2.ebuild text/plain Edgar Hucek 2007-02-09 11:09 0000 2.13 KB Details
kvm_add-scripts-qemu-ifup.patch files/kvm_add-scripts-qemu-ifup.patch text/plain Edgar Hucek 2007-02-09 11:10 0000 359 bytes Details
kvm_use_bios_files_in_usr_share_kvm.patch files/kvm_use_bios_files_in_usr_share_kvm.patch text/plain Edgar Hucek 2007-02-09 11:10 0000 306 bytes Details
kvm_use_etc_kvm_kvm-ifup.patch files/kvm_use_etc_kvm_kvm-ifup.patch text/plain Edgar Hucek 2007-02-09 11:10 0000 440 bytes Details
kvm-13.ebuild Ebuild for kvm-13 text/plain Frédéric Barthelery 2007-02-12 06:51 0000 2.64 KB Details
patch-to-kvm-12-r3.ebuild fixes typo in kvm-12-r2.ebuild patch Roman Garnett 2007-02-18 15:23 0000 419 bytes Details | Diff
kvm-fix-kvm-api-version.patch modifies KVM_EXPECTED_API_VERSION for newer kernels, ebuild will need to be modified to handle this patch Roman Garnett 2007-02-18 15:31 0000 316 bytes Details | Diff
kvm-15.ebuild kvm-15.ebuild text/plain Matthew Schultz 2007-02-28 17:10 0000 2.60 KB Details
kvm_use_bios_files_in_usr_share_kvm-15.patch kvm_use_bios_files_in_usr_share_kvm-15.patch patch Matthew Schultz 2007-02-28 17:10 0000 310 bytes Details | Diff
kvm_use_etc_kvm_kvm-ifup-15.patch kvm_use_etc_kvm_kvm-ifup-15.patch patch Matthew Schultz 2007-02-28 17:11 0000 323 bytes Details | Diff
kvm-14.ebuild kvm-14.ebuild text/plain Matthew Schultz 2007-03-01 19:13 0000 2.75 KB Details
kvm-configure-14.patch kvm-configure-14.patch patch Matthew Schultz 2007-03-01 19:14 0000 2.01 KB Details | Diff
qemu-configure-14.patch qemu-configure-14.patch patch Matthew Schultz 2007-03-01 19:14 0000 984 bytes Details | Diff
qemu-helper.c-14.patch qemu-helper.c-14.patch patch Matthew Schultz 2007-03-01 19:14 0000 763 bytes Details | Diff
qemu-makefile.target-14.patch qemu-makefile.target-14.patch patch Matthew Schultz 2007-03-01 19:15 0000 761 bytes Details | Diff
qemu-qemu-kvm.c-14.patch qemu-qemu-kvm.c-14.patch patch Matthew Schultz 2007-03-01 19:15 0000 816 bytes Details | Diff
qemu-vl.c-14.patch qemu-vl.c-14.patch patch Matthew Schultz 2007-03-01 19:15 0000 637 bytes Details | Diff
scripts-qemu-ifup-14.patch scripts-qemu-ifup-14.patch patch Matthew Schultz 2007-03-01 19:16 0000 474 bytes Details | Diff
kvm-21.ebuild kvm-21.ebuild text/plain Matthew Schultz 2007-04-28 20:49 0000 3.63 KB Details
kvm-configure-21.patch kvm-configure-21.patch patch Matthew Schultz 2007-04-28 20:49 0000 1.84 KB Details | Diff
kvm-kvm-21.patch kvm-kvm-21.patch patch Matthew Schultz 2007-04-28 20:50 0000 2.14 KB Details | Diff
qemu-configure-21.patch qemu-configure-21.patch patch Matthew Schultz 2007-04-28 20:50 0000 1011 bytes Details | Diff
qemu-helper.c-21.patch qemu-helper.c-21.patch patch Matthew Schultz 2007-04-28 20:50 0000 849 bytes Details | Diff
qemu-makefile.target-21.patch qemu-makefile.target-21.patch patch Matthew Schultz 2007-04-28 20:51 0000 729 bytes Details | Diff
qemu-qemu-kvm.c-21.patch qemu-qemu-kvm.c-21.patch patch Matthew Schultz 2007-04-28 20:51 0000 851 bytes Details | Diff
qemu-vl.c-21.patch qemu-vl.c-21.patch patch Matthew Schultz 2007-04-28 20:52 0000 324 bytes Details | Diff
scripts-qemu-ifup-21.patch scripts-qemu-ifup-21.patch patch Matthew Schultz 2007-04-28 20:52 0000 847 bytes Details | Diff
kvm-kvm-24.patch kvm-kvm-24.patch patch Matthew Schultz 2007-05-16 16:54 0000 3.49 KB Details | Diff
qemu-qemu-kvm.c-24.patch qemu-qemu-kvm.c-24.patch patch Matthew Schultz 2007-05-16 16:56 0000 902 bytes Details | Diff
kvm-24.ebuild kvm-24.ebuild text/plain Matthew Schultz 2007-05-16 16:56 0000 3.65 KB Details
qemu-configure-24.patch-10018.out Error log mentioned on comment 76 text/plain Luiz C. B. Mostaço-Guidolin 2007-05-24 02:36 0000 2.52 KB Details
kvm-25.ebuild kvm-25.ebuild text/plain Matthew Schultz 2007-05-25 13:48 0000 3.66 KB Details
build.log error log with gcc 4.1.2 on git-sources 2.6.22-rc3 text/plain MATSUYAMA Tomohiro 2007-05-28 02:18 0000 14.11 KB Details
kvm-27.ebuild kvm-27.ebuild text/plain Matthew Schultz 2007-06-04 17:57 0000 3.61 KB Details
kvm-configure.patch kvm-configure.patch patch Matthew Schultz 2007-06-04 17:58 0000 1.84 KB Details | Diff
qemu-configure.patch qemu-configure.patch patch Matthew Schultz 2007-06-04 17:59 0000 1011 bytes Details | Diff
qemu-helper.c.patch qemu-helper.c.patch patch Matthew Schultz 2007-06-04 17:59 0000 849 bytes Details | Diff
qemu-makefile.target.patch qemu-makefile.target.patch patch Matthew Schultz 2007-06-04 18:00 0000 729 bytes Details | Diff
qemu-vl.c.patch qemu-vl.c.patch patch Matthew Schultz 2007-06-04 18:00 0000 324 bytes Details | Diff
scripts-qemu-ifup.patch scripts-qemu-ifup.patch patch Matthew Schultz 2007-06-04 18:01 0000 847 bytes Details | Diff
kvm-kvm.patch kvm-kvm.patch patch Matthew Schultz 2007-06-04 18:01 0000 3.49 KB Details | Diff
qemu-qemu-kvm.c.patch qemu-qemu-kvm.c.patch patch Matthew Schultz 2007-06-04 18:02 0000 902 bytes Details | Diff
kvm-29.ebuild kvm-29.ebuild text/plain Matthew Schultz 2007-07-15 19:14 0000 3.61 KB Details
kvm-kvm.patch kvm-kvm.patch patch Matthew Schultz 2007-07-15 19:15 0000 3.28 KB Details | Diff
qemu-configure.patch qemu-configure.patch patch Matthew Schultz 2007-07-15 19:15 0000 965 bytes Details | Diff
qemu-qemu-kvm.c.patch qemu-qemu-kvm.c.patch patch Matthew Schultz 2007-07-15 19:16 0000 932 bytes Details | Diff
kvm-32.ebuild KVM 32 ebuild works GCC 4.2 and module build text/plain Evan Wagner 2007-07-24 19:23 0000 1.35 KB Details
kvm-33.ebuild kvm-33.ebuild text/plain Matthew Schultz 2007-07-25 15:23 0000 3.70 KB Details
kvm-kvm.patch kvm-kvm.patch patch Matthew Schultz 2007-07-25 15:23 0000 3.42 KB Details | Diff
qemu-configure.patch qemu-configure.patch patch Matthew Schultz 2007-07-25 15:23 0000 310 bytes Details | Diff
qemu-vl.c.patch qemu-vl.c.patch patch Matthew Schultz 2007-07-25 15:24 0000 324 bytes Details | Diff
scripts-qemu-ifup.patch scripts-qemu-ifup.patch patch Matthew Schultz 2007-07-25 15:24 0000 847 bytes Details | Diff
kvm-33.ebuild kvm-33.ebuild text/plain Matthew Schultz 2007-07-26 14:09 0000 3.69 KB Details
kvm-37.ebuild.tar.bz2 an ebuild for kvm-37 and all supporting patches in files application/x-tbz Carlo Marcelo Arenas Belon 2007-09-11 13:55 0000 4.41 KB Details
kvm-41.ebuild an ebuild for kvm-41 (evolved from the unofficial kvm-37) text/plain Carlo Marcelo Arenas Belon 2007-09-19 15:04 0000 3.93 KB Details
kvm-45-qemu-configure.patch kvm-45-qemu-configure.patch patch Sander Sweers 2007-10-02 11:04 0000 350 bytes Details | Diff
kvm-45-qemu-no-img.patch kvm-45-qemu-no-img.patch patch Sander Sweers 2007-10-02 11:05 0000 2.59 KB Details | Diff
kvm-45.ebuild kvm-45.ebuild text/plain Matthew Schultz 2007-10-02 20:59 0000 3.62 KB Details
kvm-45.ebuild.tar.bz2 kvm-45.ebuild with both approaches in application/x-tbz Fortunato Ventre 2007-10-03 19:38 0000 5.17 KB Details
kvm-45.ebuild ebuild for kvm-45 with qemu compatibility text/plain Carlo Marcelo Arenas Belon 2007-10-07 22:02 0000 4.09 KB Details
kvm-45-r1.ebuild kvm-45-r1.ebuild text/plain Carlo Marcelo Arenas Belon 2007-10-08 10:21 0000 4.29 KB Details
kvm-46-kvm.patch updated kvm (python wrapper) patch for kvm 46 patch Carlo Marcelo Arenas Belon 2007-10-11 16:34 0000 3.36 KB Details | Diff
kvm-46.ebuild ebuild for kvm 46 text/plain Carlo Marcelo Arenas Belon 2007-10-15 07:57 0000 4.48 KB Details
kvm-46.ebuild ebuild for kvm 46 text/plain Carlo Marcelo Arenas Belon 2007-10-15 08:21 0000 4.48 KB Details
kvm-48.ebuild ebuild for kvm 48 text/plain Carlo Marcelo Arenas Belon 2007-10-19 04:20 0000 4.55 KB Details
kvm-54.ebuild ebuild for kvm-54 text/plain Carlo Marcelo Arenas Belon 2007-11-28 02:45 0000 4.66 KB Details
kvm-55-r1.ebuild ebuild for kvm 55 text/plain Carlo Marcelo Arenas Belon 2007-12-04 19:27 0000 4.94 KB Details
kvm-55-r2.ebuild ebuild for kvm 55 text/plain Carlo Marcelo Arenas Belon 2007-12-07 06:10 0000 5.01 KB Details
kvm-57.ebuild ebuild for kvm 57 text/plain Carlo Marcelo Arenas Belon 2007-12-26 04:11 0000 6.18 KB Details
kvm-58.ebuild ebuild for kvm 58 text/plain Carlo Marcelo Arenas Belon 2007-12-28 08:48 0000 6.21 KB Details
kvm-59-r1.ebuild ebuild for kvm 59 text/plain Carlo Marcelo Arenas Belon 2008-01-14 04:23 0000 6.64 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 157987 depends on: Show dependency tree
Bug 157987 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-12-12 23:14 0000
KVM (for Kernel-based Virtual Machine) is a full virtualization solution for
Linux on x86 hardware. It consists of a loadable kernel module (kvm.ko) and a
userspace component.

Since the module will be included in the next 2.6.20 kernel, I think it will be
nice to create and ebuild for the userspace part ;-)

Leo

------- Comment #1 From Sander Sweers 2007-01-06 13:18:07 0000 -------
I see the following issues/TODO's so far.

1:   It is a modified version of qemu and installs in the same place.
2:   A user group kvm should be created for /dev/kvm
2.1: Or a more generic emul group should be created for all emulation /dev/
entries?
3: A udev rule should be created. If 2.1 is yes one set of rules can be used
instead of every package using its own file in /etc/udev/rules.d

I am not sure if the changed kvm made to qemu are being upstreamed but if they
are it is probably better to wait for that.

------- Comment #2 From Ryan Hope 2007-02-01 15:20:43 0000 -------
Created an attachment (id=108867) [details]
first draft kvm ebuild

------- Comment #3 From Ryan Hope 2007-02-04 22:28:03 0000 -------
Created an attachment (id=109180) [details]
better version of kvm-12.ebuild

------- Comment #4 From Joel Kaasinen 2007-02-05 12:20:19 0000 -------
Hmm, the kvm qemu need gcc 3 according to the docs. Have you circumvented this
somehow?

------- Comment #5 From Tom Lynema 2007-02-08 02:19:05 0000 -------
(In reply to comment #4)
> Hmm, the kvm qemu need gcc 3 according to the docs. Have you circumvented this
> somehow?
> 

The ebuild fails with gcc 4.1.  I don't think that it was circumvented at all.  

Ebuild works with gcc 3.3, however, it installs to /usr/local

------- Comment #6 From Balint Dobai-Pataky 2007-02-08 19:34:13 0000 -------
kvm works here. :)
thanks

------- Comment #7 From Sander Sweers 2007-02-09 00:54:35 0000 -------
Created an attachment (id=109596) [details]
ebuild patch tp kvm-12-r1

There are several issues with the current ebuild.
1 --prefix is not passed to configure
  Fixed it now passed --prefix=/usr
2 It always assumes kvm is part of the kernel by paassing --with-patched-kernel
  Fixed by including ./configure inside the check for kvm NOT in the kernel and
else it will pass --with-patched-kernel
3 It should not accept gcc-4
  Fixed: Borrowed the check from the original qemu
4 The make install will always try to install the kernel modules failing with
sanbox violations.
  Fixed: Very bad sed fix. Needs more love but my sed skills are almost zero
5 The udev rules where not correctly inserted because the path was wrong
  Fixed: Path is now set correctly
6 Usage of emake was last time I did an ebuild not permitted.
  fixed: substituted for make

Tested on kernel 2.6.19 on ~amd64

------- Comment #8 From Edgar Hucek 2007-02-09 11:09:54 0000 -------
Created an attachment (id=109612) [details]
New qemu friendly kvm

Make kvm qemu friendly

------- Comment #9 From Edgar Hucek 2007-02-09 11:10:10 0000 -------
Created an attachment (id=109613) [details]
Make kvm qemu friendly

Make kvm qemu friendly

------- Comment #10 From Edgar Hucek 2007-02-09 11:10:22 0000 -------
Created an attachment (id=109614) [details]
Make kvm qemu friendly

Make kvm qemu friendly

------- Comment #11 From Edgar Hucek 2007-02-09 11:10:34 0000 -------
Created an attachment (id=109615) [details]
Make kvm qemu friendly

Make kvm qemu friendly

------- Comment #12 From Sander Sweers 2007-02-10 14:06:05 0000 -------
(In reply to comment #8)
> Created an attachment (id=109612) [edit] [details]
> New qemu friendly kvm
> 
> Make kvm qemu friendly

Thanks, but not yet amd64 friendly. The binary on amd64 is qemu-system-x86_64.
replace the mv for the binary with the below.

        if use amd64; then
                mv ${D}/usr/bin/qemu-system-x86_64
${D}/usr/bin/kvm-system-x86_64
        else
                mv ${D}/usr/bin/qemu ${D}/usr/bin/kvm

------- Comment #13 From Frédéric Barthelery 2007-02-12 06:51:57 0000 -------
Created an attachment (id=109929) [details]
Ebuild for kvm-13

I try to make an ebuild kvm-13. This version doesn't work with the modules in
kernel 2.6.20

------- Comment #14 From Sander Sweers 2007-02-12 07:38:44 0000 -------
(In reply to comment #13)
> I try to make an ebuild kvm-13. This version doesn't work with the modules in
> kernel 2.6.20

KVM-12 works fine for me on AMD64. How does it fail for you?

------- Comment #15 From Frédéric Barthelery 2007-02-12 09:01:45 0000 -------
(In reply to comment #14)
> (In reply to comment #13)
> > I try to make an ebuild kvm-13. This version doesn't work with the modules in
> > kernel 2.6.20
> 
> KVM-12 works fine for me on AMD64. How does it fail for you?
> 

I have right follow-up the recommendation of the developers see
http://thread.gmane.org/gmane.comp.emulators.kvm.devel/1256

------- Comment #16 From Sander Sweers 2007-02-12 09:18:15 0000 -------
> > (In reply to comment #13158)
> > > I try to make an ebuild kvm-13. This version doesn't work with the modules in
> > > kernel 2.6.20
> > 
> > KVM-12 works fine for me on AMD64. How does it fail for you?
> > 
> 
> I have right follow-up the recommendation of the developers see
> http://thread.gmane.org/gmane.comp.emulators.kvm.devel/1256159

Oops, KVM-12 != KVM-13 so ignore my message ;-)

------- Comment #17 From Roman Garnett 2007-02-18 15:23:20 0000 -------
Created an attachment (id=110542) [details]
fixes typo in kvm-12-r2.ebuild

This patch fixes a typo in the kvm-12-r2.ebuild ("./confiure" ->
"./configure").  I'm not sure if I'm following proper protocol (upping the
revision number?), but I hope I'm not doing anything too egregious.

------- Comment #18 From Roman Garnett 2007-02-18 15:31:33 0000 -------
Created an attachment (id=110544) [details]
modifies KVM_EXPECTED_API_VERSION for newer kernels, ebuild will need to be
modified to handle this

Also, the ebuild will need to be fixed to patch the user/kvmctl.c file for
kernels that have (KVM_API_VERSION == 3).  The source wouldn't compile on
linux-2.6.20-mm1 until I applied the attached patch (from 
<a
href=http://www.mail-archive.com/kvm-devel@lists.sourceforge.net/msg01046.html>
http://www.mail-archive.com/kvm-devel@lists.sourceforge.net/msg01046.html</a>),
which modifies KVM_EXPECTED_API_VERSION accordingly.

I'm not sure how to do this, so I leave it for somebody more knowledgeable.

------- Comment #19 From Matthew Schultz 2007-02-28 16:14:08 0000 -------
Why is qemu-img removed from the package?  If it is a problem, is it still a
problem with KVM-15?

------- Comment #20 From Sander Sweers 2007-02-28 16:37:40 0000 -------
(In reply to comment #19)
> Why is qemu-img removed from the package?  If it is a problem, is it still a
> problem with KVM-15?

Because it conflicts with the standard qemu. This way we can have both
installed else they would block each other.

------- Comment #21 From Matthew Schultz 2007-02-28 17:10:29 0000 -------
Created an attachment (id=111591) [details]
kvm-15.ebuild

I'm not following why linux_chkconfig_present is used instead of
linux_chkconfig_builtin because modules can be overwritten so I have changed
that.  kvm_add-scripts-qemu-ifup.patch is no longer necessary so that has been
removed.  I have updated the other two patches and I will post them as well.

------- Comment #22 From Matthew Schultz 2007-02-28 17:10:58 0000 -------
Created an attachment (id=111593) [details]
kvm_use_bios_files_in_usr_share_kvm-15.patch

------- Comment #23 From Matthew Schultz 2007-02-28 17:11:16 0000 -------
Created an attachment (id=111594) [details]
kvm_use_etc_kvm_kvm-ifup-15.patch

------- Comment #24 From Matthew Schultz 2007-03-01 19:13:44 0000 -------
Created an attachment (id=111721) [details]
kvm-14.ebuild

I'm obsoleting my kvm-15 ebuild since I couldn't get it to work.  I have an
even better ebuild using KVM-14 which compiles with GCC 4.1 and the driver
modprobes (Yes it's possible) and everything works properly. :-D  You should
not compile the kernel virtualization modules with this ebuild.  This ebuild
also uses a lot of patches so make sure you download all the patches with a -14
suffix.

------- Comment #25 From Matthew Schultz 2007-03-01 19:14:11 0000 -------
Created an attachment (id=111722) [details]
kvm-configure-14.patch

------- Comment #26 From Matthew Schultz 2007-03-01 19:14:28 0000 -------
Created an attachment (id=111725) [details]
qemu-configure-14.patch

------- Comment #27 From Matthew Schultz 2007-03-01 19:14:51 0000 -------
Created an attachment (id=111726) [details]
qemu-helper.c-14.patch

------- Comment #28 From Matthew Schultz 2007-03-01 19:15:14 0000 -------
Created an attachment (id=111727) [details]
qemu-makefile.target-14.patch

------- Comment #29 From Matthew Schultz 2007-03-01 19:15:33 0000 -------
Created an attachment (id=111730) [details]
qemu-qemu-kvm.c-14.patch

------- Comment #30 From Matthew Schultz 2007-03-01 19:15:57 0000 -------
Created an attachment (id=111731) [details]
qemu-vl.c-14.patch

------- Comment #31 From Matthew Schultz 2007-03-01 19:16:16 0000 -------
Created an attachment (id=111732) [details]
scripts-qemu-ifup-14.patch

------- Comment #32 From Matthew Schultz 2007-03-01 19:17:38 0000 -------
Also the executable binary is now called qemu-kvm.

------- Comment #33 From Johan Vrolix 2007-03-01 20:58:47 0000 -------
kvm-14 doesn't compile here

vl.o: In function `main':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/vl.c:7063: undefined
reference to `code_copy_enabled'
libqemu.a(exec.o): In function `tb_invalidate_phys_page_range':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/exec.c:681: undefined
reference to `cpu_restore_state'
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/exec.c:601: undefined
reference to `cpu_x86_gen_code'
libqemu.a(cpu-exec.o): In function `cpu_x86_exec':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/cpu-exec.c:783:
undefined reference to `cc_table'
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/cpu-exec.c:140:
undefined reference to `cpu_x86_gen_code'
libqemu.a(helper.o): In function `tlb_fill':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:3866:
undefined reference to `cpu_restore_state'
libqemu.a(helper.o): In function `helper_verw':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2950:
undefined reference to `cc_table'
libqemu.a(helper.o): In function `helper_verr':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2916:
undefined reference to `cc_table'
libqemu.a(helper.o): In function `helper_lar':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2869:
undefined reference to `cc_table'
libqemu.a(helper.o): In function `helper_lsl':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2826:
undefined reference to `cc_table'
libqemu.a(helper.o): In function `compute_eflags':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/exec.h:511:
undefined reference to `cc_table'
libqemu.a(helper.o):/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/exec.h:511:
more undefined references to `cc_table' follow
libqemu.a(helper2.o): In function `cpu_x86_init':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper2.c:61:
undefined reference to `optimize_flags_init'
collect2: ld returned 1 exit status
make[2]: *** [qemu-kvm] Error 1
make[2]: Leaving directory
`/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/i386-kvm'
make[1]: *** [subdir-i386-kvm] Error 2
make[1]: Leaving directory
`/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu'
make: *** [qemu] Error 2

------- Comment #34 From Matthew Schultz 2007-03-01 21:50:00 0000 -------
(In reply to comment #33)
> kvm-14 doesn't compile here
> 
> vl.o: In function `main':
> /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/vl.c:7063: undefined
> reference to `code_copy_enabled'
> libqemu.a(exec.o): In function `tb_invalidate_phys_page_range':
> /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/exec.c:681: undefined
> reference to `cpu_restore_state'
> /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/exec.c:601: undefined
> reference to `cpu_x86_gen_code'
> libqemu.a(cpu-exec.o): In function `cpu_x86_exec':
> /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/cpu-exec.c:783:
> undefined reference to `cc_table'
> /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/cpu-exec.c:140:
> undefined reference to `cpu_x86_gen_code'
> libqemu.a(helper.o): In function `tlb_fill':
> /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:3866:
> undefined reference to `cpu_restore_state'
> libqemu.a(helper.o): In function `helper_verw':
> /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2950:
> undefined reference to `cc_table'
> libqemu.a(helper.o): In function `helper_verr':
> /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2916:
> undefined reference to `cc_table'
> libqemu.a(helper.o): In function `helper_lar':
> /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2869:
> undefined reference to `cc_table'
> libqemu.a(helper.o): In function `helper_lsl':
> /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2826:
> undefined reference to `cc_table'
> libqemu.a(helper.o): In function `compute_eflags':
> /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/exec.h:511:
> undefined reference to `cc_table'
> libqemu.a(helper.o):/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/exec.h:511:
> more undefined references to `cc_table' follow
> libqemu.a(helper2.o): In function `cpu_x86_init':
> /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper2.c:61:
> undefined reference to `optimize_flags_init'
> collect2: ld returned 1 exit status
> make[2]: *** [qemu-kvm] Error 1
> make[2]: Leaving directory
> `/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/i386-kvm'
> make[1]: *** [subdir-i386-kvm] Error 2
> make[1]: Leaving directory
> `/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu'
> make: *** [qemu] Error 2
> 

emerge --info?

------- Comment #35 From Stephen Ulmer 2007-03-02 01:28:41 0000 -------
Same problem here:

mythmaster src # emerge --info
Portage 2.1.2-r9 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.18.6
x86_64)
=================================================================
System uname: 2.6.18.6 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Gentoo Base System release 1.12.9
Timestamp of tree: Wed, 28 Feb 2007 00:00:10 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[enabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/misc/distfiles"
FEATURES="autoconfig buildpkg ccache distcc distlocks metadata-transfer
parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo
http://gentoo.oregonstate.edu
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LINGUAS="en en_US"
MAKEOPTS="-j3"
PKGDIR="/misc/packages/x86_64"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/ifolder-overlay
/usr/local/overlays/other-overlay /usr/local/overlays/dhcp-overlay
/usr/local/overlays/kvm-overlay"
SYNC="rsync://hustle.ulmer.org/gentoo-portage"
USE="X alsa amd64 berkdb bitmap-fonts cli cracklib crypt cups dri fortran gnome
gpm gtk iconv ipv6 isdnlog libg++ midi ncurses nls nptl nptlonly pam pcre perl
ppds pppd python readline reflection sasl session spl ssl tcpd truetype-fonts
type1-fonts unicode xorg zlib" ALSA_CARDS="hda-intel usb-audio"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file
hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route
share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses
text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="fbdev vesa nv nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
PORTAGE_RSYNC_EXTRA_OPTS

mythmaster src # 

------- Comment #36 From Matthew Schultz 2007-03-02 01:48:38 0000 -------
Currently, I have been testing with a Core Duo 32-bit CPU on the x86 arch which
does work.  I'm going to have to test this out on a 64-bit system.



(In reply to comment #35)
> Same problem here:
> 
> mythmaster src # emerge --info
> Portage 2.1.2-r9 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.18.6
> x86_64)
> =================================================================
> System uname: 2.6.18.6 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
> Gentoo Base System release 1.12.9
> Timestamp of tree: Wed, 28 Feb 2007 00:00:10 +0000
> distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632)
> [enabled]
> ccache version 2.4 [enabled]
> dev-lang/python:     2.4.3-r4
> dev-python/pycrypto: 2.0.1-r5
> dev-util/ccache:     2.4-r6
> sys-apps/sandbox:    1.2.17
> sys-devel/autoconf:  2.13, 2.61
> sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
> sys-devel/binutils:  2.16.1-r3
> sys-devel/gcc-config: 1.3.14
> sys-devel/libtool:   1.5.22
> virtual/os-headers:  2.6.17-r1
> ACCEPT_KEYWORDS="amd64"
> AUTOCLEAN="yes"
> CBUILD="x86_64-pc-linux-gnu"
> CFLAGS="-O2 -pipe"
> CHOST="x86_64-pc-linux-gnu"
> CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
> /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
> CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
> CXXFLAGS="-O2 -pipe"
> DISTDIR="/misc/distfiles"
> FEATURES="autoconfig buildpkg ccache distcc distlocks metadata-transfer
> parallel-fetch sandbox sfperms strict"
> GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo
> http://gentoo.oregonstate.edu
> http://www.ibiblio.org/pub/Linux/distributions/gentoo"
> LINGUAS="en en_US"
> MAKEOPTS="-j3"
> PKGDIR="/misc/packages/x86_64"
> PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
> --force --whole-file --delete --delete-after --stats --timeout=180
> --exclude=/distfiles --exclude=/local --exclude=/packages"
> PORTAGE_TMPDIR="/var/tmp"
> PORTDIR="/usr/portage"
> PORTDIR_OVERLAY="/usr/local/overlays/ifolder-overlay
> /usr/local/overlays/other-overlay /usr/local/overlays/dhcp-overlay
> /usr/local/overlays/kvm-overlay"
> SYNC="rsync://hustle.ulmer.org/gentoo-portage"
> USE="X alsa amd64 berkdb bitmap-fonts cli cracklib crypt cups dri fortran gnome
> gpm gtk iconv ipv6 isdnlog libg++ midi ncurses nls nptl nptlonly pam pcre perl
> ppds pppd python readline reflection sasl session spl ssl tcpd truetype-fonts
> type1-fonts unicode xorg zlib" ALSA_CARDS="hda-intel usb-audio"
> ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file
> hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route
> share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux"
> LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses
> text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="fbdev vesa nv nvidia"
> Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
> PORTAGE_RSYNC_EXTRA_OPTS
> 
> mythmaster src # 
> 

------- Comment #37 From Stephen Ulmer 2007-03-02 03:25:26 0000 -------
I unbundled the source and applied the patches by hand and got:

  patching file qemu/target-i386/helper.c
  patch unexpectedly ends in middle of line

and

  patching file qemu/Makefile.target
  patch unexpectedly ends in middle of line
  Hunk #2 succeeded at 235 with fuzz 1.

I haven't examined it farther to see if it's actually related. Note that I
applied them in what I guessed was the order of intrusiveness (may or may not
explain the fuzz), and backed-out the ones with the above messages.

I get a clean compile without the above patches -- you may want to check to see
if those two were properly posted (and at least make ones that patch doesn't
complain about :).

Thanks for your efforts!

------- Comment #38 From Matthew Schultz 2007-03-02 03:39:42 0000 -------
(In reply to comment #37)
> I unbundled the source and applied the patches by hand and got:
> 
>   patching file qemu/target-i386/helper.c
>   patch unexpectedly ends in middle of line
> 
> and
> 
>   patching file qemu/Makefile.target
>   patch unexpectedly ends in middle of line
>   Hunk #2 succeeded at 235 with fuzz 1.
> 
> I haven't examined it farther to see if it's actually related. Note that I
> applied them in what I guessed was the order of intrusiveness (may or may not
> explain the fuzz), and backed-out the ones with the above messages.
> 
> I get a clean compile without the above patches -- you may want to check to see
> if those two were properly posted (and at least make ones that patch doesn't
> complain about :).
> 
> Thanks for your efforts!
> 

Sounds good.  Were you able to modprobe the kvm-amd driver after it compiled? 

------- Comment #39 From Stephen Ulmer 2007-03-02 13:37:52 0000 -------
Yes, though I did no functional testing.

Also, I got this when compiling a stage4 with catalyst (using the ebuild and
all patches):


* ERROR: --callback failed!

* -- Grepping log... --

make[1]: Entering directory
`/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/k
ernel'
make -C /lib/modules/2.6.16.40-xen/build M=`pwd` "$@"
make: Entering an unknown directory
make: *** /lib/modules/2.6.16.40-xen/build: No such file or directory.  Stop.
make: Leaving an unknown directory
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/ke
rnel'
make: *** [kernel] Error 2

!!! ERROR: app-emulation/kvm-14 failed.
--

note that 2.6.16.40 is the version of the host kernel, not the version that was
compiled/installed inside the catalyst chroot. There is a (probably) a "uname"
in there somewhere that should be worked-around...

------- Comment #40 From Johan Vrolix 2007-03-02 19:10:58 0000 -------
(In reply to comment #34)
> (In reply to comment #33)
> > kvm-14 doesn't compile here
> > 
> > vl.o: In function `main':
> > /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/vl.c:7063: undefined
> > reference to `code_copy_enabled'
> > libqemu.a(exec.o): In function `tb_invalidate_phys_page_range':
> > /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/exec.c:681: undefined
> > reference to `cpu_restore_state'
> > /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/exec.c:601: undefined
> > reference to `cpu_x86_gen_code'
> > libqemu.a(cpu-exec.o): In function `cpu_x86_exec':
> > /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/cpu-exec.c:783:
> > undefined reference to `cc_table'
> > /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/cpu-exec.c:140:
> > undefined reference to `cpu_x86_gen_code'
> > libqemu.a(helper.o): In function `tlb_fill':
> > /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:3866:
> > undefined reference to `cpu_restore_state'
> > libqemu.a(helper.o): In function `helper_verw':
> > /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2950:
> > undefined reference to `cc_table'
> > libqemu.a(helper.o): In function `helper_verr':
> > /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2916:
> > undefined reference to `cc_table'
> > libqemu.a(helper.o): In function `helper_lar':
> > /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2869:
> > undefined reference to `cc_table'
> > libqemu.a(helper.o): In function `helper_lsl':
> > /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2826:
> > undefined reference to `cc_table'
> > libqemu.a(helper.o): In function `compute_eflags':
> > /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/exec.h:511:
> > undefined reference to `cc_table'
> > libqemu.a(helper.o):/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/exec.h:511:
> > more undefined references to `cc_table' follow
> > libqemu.a(helper2.o): In function `cpu_x86_init':
> > /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper2.c:61:
> > undefined reference to `optimize_flags_init'
> > collect2: ld returned 1 exit status
> > make[2]: *** [qemu-kvm] Error 1
> > make[2]: Leaving directory
> > `/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/i386-kvm'
> > make[1]: *** [subdir-i386-kvm] Error 2
> > make[1]: Leaving directory
> > `/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu'
> > make: *** [qemu] Error 2
> > 
> 
> emerge --info?
> 

vrx@TiTaN ~ $ emerge --info
Portage 2.1.2-r9 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0,
2.6.20-gentoo x86_64)
=================================================================
System uname: 2.6.20-gentoo x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor
4200+
Gentoo Base System release 1.12.9
Timestamp of tree: Fri, 02 Mar 2007 19:01:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.20-r1
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -Os -pipe -fomit-frame-pointer -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=athlon64 -Os -pipe -fomit-frame-pointer -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox
sfperms strict userfetch"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/
ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ "
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/kde
/usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac aalib alsa amd64 arts asf berkdb bitmap-fonts branding cairo cdr cli
cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode fam ffmpeg
firefox flac fortran gdbm gif gpm gstreamer hal iconv ieee1394 ipod ipv6
isdnlog java jpeg kde kdehiddenvisibility ldap libg++ logitech-mouse mad midi
mikmod mng mp3 mpeg mysql mysqli ncurses nls nptl nptlonly nvidia ogg opengl
pam pcre pdf perl png ppds pppd python qt3 qt4 quicktime readline reflection
sdl session sndfile spell spl ssl tcpd theora truetype truetype-fonts
type1-fonts unicode vcd vorbis xml xorg xv xvid xvmc zlib" ALSA_CARDS="ali5451
als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938
es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx
via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop
empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi
null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard
mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780
lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #41 From Nemanja Jakovljevic 2007-03-05 09:03:45 0000 -------
Fails here too:

/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2552:
warning: 'e1' may be used uninitialized in this function
rm -f libqemu.a
ar rcs libqemu.a exec.o kqemu.o qemu-kvm.o cpu-exec.o fpu/softfloat-native.o
helper.o helper2.o translate-copy.o disas.o  i386-dis.o
gcc -L /mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/../user -g -o
qemu-kvm vl.o osdep.o readline.o monitor.o pci.o console.o loader.o isa_mmio.o
cutils.o migration.o block.o block-raw.o block-cow.o block-qcow.o aes.o
block-vmdk.o block-cloop.o block-dmg.o block-bochs.o block-vpc.o block-vvfat.o
block-qcow2.o scsi-disk.o cdrom.o lsi53c895a.o usb.o usb-hub.o usb-linux.o
usb-hid.o usb-ohci.o usb-msd.o ne2000.o rtl8139.o pcnet.o hypercall.o ide.o
pckbd.o ps2.o vga.o sb16.o es1370.o dma.o audio.o noaudio.o wavaudio.o
sdlaudio.o ossaudio.o alsaaudio.o wavcapture.o fdc.o mc146818rtc.o serial.o
i8259.o i8254.o pcspk.o pc.o cirrus_vga.o mixeng.o apic.o parallel.o acpi.o
piix_pci.o usb-uhci.o smbus_eeprom.o gdbstub.o sdl.o x_keymap.o vnc.o
slirp/cksum.o slirp/if.o slirp/ip_icmp.o slirp/ip_input.o slirp/ip_output.o
slirp/slirp.o slirp/mbuf.o slirp/misc.o slirp/sbuf.o slirp/socket.o
slirp/tcp_input.o slirp/tcp_output.o slirp/tcp_subr.o slirp/tcp_timer.o
slirp/udp.o slirp/bootp.o slirp/debug.o slirp/tftp.o libqemu.a
/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/../user/libkvm.a  -lm
-lz -lasound -lkvm -lSDL -lpthread  -lutil -lrt -luuid
vl.o: In function `get_clock':
/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/vl.c:652: undefined
reference to `clock_gettime'
vl.o: In function `init_get_clock':
/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/vl.c:640: undefined
reference to `clock_gettime'
block-raw.o: In function `raw_aio_cancel':
/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/block-raw.c:362:
undefined reference to `aio_cancel64'
/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/block-raw.c:366:
undefined reference to `aio_error64'
/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/block-raw.c:366:
undefined reference to `aio_error64'
block-raw.o: In function `raw_aio_write':
/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/block-raw.c:349:
undefined reference to `aio_write64'
block-raw.o: In function `raw_aio_read':
/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/block-raw.c:333:
undefined reference to `aio_read64'
block-raw.o: In function `qemu_aio_poll':
/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/block-raw.c:225:
undefined reference to `aio_error64'
/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/block-raw.c:233:
undefined reference to `aio_return64'
block-raw.o: In function `qemu_aio_init':
/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/block-raw.c:209:
undefined reference to `aio_init'
collect2: ld returned 1 exit status
make[2]: *** [qemu-kvm] Error 1
make[2]: Leaving directory
`/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu/i386-kvm'
make[1]: *** [subdir-i386-kvm] Error 2
make[1]: Leaving directory
`/mnt/jaguar/portage/app-emulation/kvm-14/work/kvm-14/qemu'
make: *** [qemu] Error 2

!!! ERROR: app-emulation/kvm-14 failed.
Call stack:
  ebuild.sh, line 1614:   Called dyn_compile
  ebuild.sh, line 971:   Called qa_call 'src_compile'
  environment, line 4022:   Called src_compile
  kvm-14.ebuild, line 57:   Called die

!!! make failed
!!! If you need support, post the topmost build error, and the call stack if
relevant.
!!! A complete build log is located at
'/mnt/jaguar/portage/app-emulation/kvm-14/temp/build.log'.

!!! This ebuild is from an overlay: '/usr/local/portage'

----------

emerge --info 

Portage 2.1.2-r13 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0,
2.6.19-beyond1.2 i686)
=================================================================
System uname: 2.6.19-beyond1.2 i686 Genuine Intel(R) CPU           T2300  @
1.66GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Fri, 02 Mar 2007 14:00:01 +0000
dev-java/java-config: 1.3.7, 2.0.31-r3
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.20-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3  -march=pentium4m -mfpmath=sse,387 -mmmx -msse -msse2 -pipe
-fomit-frame-pointer -momit-leaf-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3  -march=pentium4m -mfpmath=sse,387 -mmmx -msse -msse2 -pipe
-fomit-frame-pointer -momit-leaf-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms
strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/mnt/jaguar"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/iwlwifi /usr/local/portage
/usr/local/portage-xgl"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acpi alsa audacious avi bash-completion bitmap-fonts bzip2
cdparanoia cdr crypt cups curl divx4linux dri dvd dvdr dvdread encode exif
firefox gcj gd gif gimpprint gphoto2 gpm gtk gtk2 hal iconv jabber jpeg kde mmx
mp3 mpeg mplayer ncurses nptl nptlonly nsplugin offensive ogg oggvorbis openal
opengl oss pam pcmcia pcre pdf perl png posix python qt3 qt4 quicktime real sse
sse2 ssl tiff truetype truetype-fonts type1-fonts unicode usb v4l vorbis wifi
win32codecs x86 xorg xvid xvmc zlib" ALSA_CARDS="hda-intel intel8x0m"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file
hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route
share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses
text" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #42 From Johan Vrolix 2007-03-10 22:44:30 0000 -------
Shouldn't this be split up in 2 ebuilds?
One for the kernel modules and one for the userspace tools?

------- Comment #43 From Sune Kloppenborg Jeppesen 2007-03-14 22:11:02 0000 -------
kvm-14 fails for me with the same undefined references as already reported.
However it seems to miss all DEPEND information. To get it to configure I had
to merge:

media-libs/libsdl
media-libs/alsa-lib

------- Comment #44 From Clement Siuchung Cheung 2007-04-19 01:40:47 0000 -------
(In reply to comment #33)

Same here.

gcc -L /var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/../user -g -o
qemu-kvm vl.o osdep.o readline.o monitor.o pci.o console.o loader.o isa_mmio.o
cutils.o migration.o block.o block-raw.o block-cow.o block-qcow.o aes.o
block-vmdk.o block-cloop.o block-dmg.o block-bochs.o block-vpc.o block-vvfat.o
block-qcow2.o scsi-disk.o cdrom.o lsi53c895a.o usb.o usb-hub.o usb-linux.o
usb-hid.o usb-ohci.o usb-msd.o ne2000.o rtl8139.o pcnet.o hypercall.o ide.o
pckbd.o ps2.o vga.o sb16.o es1370.o dma.o audio.o noaudio.o wavaudio.o
sdlaudio.o ossaudio.o alsaaudio.o wavcapture.o fdc.o mc146818rtc.o serial.o
i8259.o i8254.o pcspk.o pc.o cirrus_vga.o mixeng.o apic.o parallel.o acpi.o
piix_pci.o usb-uhci.o smbus_eeprom.o gdbstub.o sdl.o x_keymap.o vnc.o
slirp/cksum.o slirp/if.o slirp/ip_icmp.o slirp/ip_input.o slirp/ip_output.o
slirp/slirp.o slirp/mbuf.o slirp/misc.o slirp/sbuf.o slirp/socket.o
slirp/tcp_input.o slirp/tcp_output.o slirp/tcp_subr.o slirp/tcp_timer.o
slirp/udp.o slirp/bootp.o slirp/debug.o slirp/tftp.o libqemu.a  -lm -lz
-lasound -lSDL -lpthread  -lutil -lrt -luuid
vl.o: In function `main':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/vl.c:7063: undefined
reference to `code_copy_enabled'
libqemu.a(exec.o): In function `tb_invalidate_phys_page_range':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/exec.c:681: undefined
reference to `cpu_restore_state'
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/exec.c:601: undefined
reference to `cpu_x86_gen_code'
libqemu.a(cpu-exec.o): In function `cpu_x86_exec':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/cpu-exec.c:783:
undefined reference to `cc_table'
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/cpu-exec.c:140:
undefined reference to `cpu_x86_gen_code'
libqemu.a(helper.o): In function `tlb_fill':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:3866:
undefined reference to `cpu_restore_state'
libqemu.a(helper.o): In function `helper_verw':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2950:
undefined reference to `cc_table'
libqemu.a(helper.o): In function `helper_verr':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2916:
undefined reference to `cc_table'
libqemu.a(helper.o): In function `helper_lar':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2869:
undefined reference to `cc_table'
libqemu.a(helper.o): In function `helper_lsl':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper.c:2826:
undefined reference to `cc_table'
libqemu.a(helper.o): In function `compute_eflags':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/exec.h:511:
undefined reference to `cc_table'
libqemu.a(helper.o):/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/exec.h:511:
more undefined references to `cc_table' follow
libqemu.a(helper2.o): In function `cpu_x86_init':
/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/target-i386/helper2.c:61:
undefined reference to `optimize_flags_init'
collect2: ld returned 1 exit status
make[2]: *** [qemu-kvm] Error 1
make[2]: Leaving directory
`/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu/i386-kvm'
make[1]: *** [subdir-i386-kvm] Error 2
make[1]: Leaving directory
`/var/tmp/portage/app-emulation/kvm-14/work/kvm-14/qemu'
make: *** [qemu] Error 2

!!! ERROR: app-emulation/kvm-14 failed.
Call stack:
  ebuild.sh, line 1614:   Called dyn_compile
  ebuild.sh, line 971:   Called qa_call 'src_compile'
  environment, line 4121:   Called src_compile
  kvm-14.ebuild, line 57:   Called die

!!! make failed
!!! If you need support, post the topmost build error, and the call stack if
relevant.
!!! A complete build log is located at
'/var/tmp/portage/app-emulation/kvm-14/temp/build.log'.

!!! This ebuild is from an overlay: '/usr/portage/local/clement'
bliss app-emulation/kvm # emerge --info
Portage 2.1.2.2 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3,
2.6.19-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.19-gentoo-r5 x86_64 Intel(R) Core(TM)2 CPU          6300  @
1.86GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 16 Apr 2007 01:46:01 +0000
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/rc.d /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer multilib-pkg parallel-fetch sandbox
sfperms strict"
GENTOO_MIRRORS="http://ftp.uoi.gr/mirror/OS/gentoo/
ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/
ftp://ftp.rhnet.is/pub/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/
http://distro.ibiblio.org/pub/linux/distributions/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/clement /usr/portage/local/layman/sunrise
/usr/portage/local/layman/damn_bluetooth-alsa"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X a52 aac acpi aiglx alsa amd64 autoreplace berkdb bitmap-fonts bzip2
cairo cap caps cdr cjk cli cracklib crypt dbus dri dvb dvd dvdr encode fam
ffmpeg firefox fortran gdbm gif glitz gpm gstreamer gtk gtk2 hal highlight
history hou iconv immqt-bc ipv6 isdnlog jingle jpeg kde kdeenablefinal
kdehiddenvisibility kdexdeltas lcms libg++ logrotate mad midi mikmod mmap mp3
mpeg ncurses nls nptl nptlonly nsplugin ogg opengl oss pam pcre perl png ppds
pppd python qt3 qt4 quicktime readline reflection rtc sdl session skey sms sou
spell spl ssl svg symlink tcpd theora threads timidity tk truetype
truetype-fonts type1-fonts unicode vorbis wmp x264 xine xml xorg xv xvid xvmc
zlib" ALSA_CARDS="hda-intel usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy
dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear
meter mulaw multi null plug rate route share shm softvol" DVB_CARDS="nxt200x"
ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad
cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LIRC_DEVICES="kworld" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #45 From Clement Siuchung Cheung 2007-04-21 22:58:48 0000 -------
The root cause of the undefined references appears to be that in
qemu-qemu-kvm.c-14.patch, the new stuff are conditional on CONFIG_KVM. And due
to reasons I have not figured out yet, CONFIG_KVM is not defined on 64-bit
architectures.

------- Comment #46 From Gergan Penkov 2007-04-22 16:37:46 0000 -------
I have redone the patches, there indeed was a mistake in them, which prevented
building on amd64. As I'm lazy to upload this (with all the patches):

http://g-overlays.googlecode.com/svn/trunk/mozilla/app-emulation/kvm/

I have made little corrections to the build, to install some python scripts, to
install again qemu-img to not rename the binary and so on, as I didn't want to
install qemu. I haven't look at it still but the udev rule seems not to trigger
itself, so chown root:kvm /dev/kvm help in these cases should do it, without it
- it will segfault (this is because the qemu without kvm is broken with these
patches).
Installed win2000, started some images and  a gentoo cd - all seems to work
with this release - kvm-20...

------- Comment #47 From Matthew Schultz 2007-04-23 00:57:40 0000 -------
(In reply to comment #46)
> I have redone the patches, there indeed was a mistake in them, which prevented
> building on amd64. As I'm lazy to upload this (with all the patches):
> 
> http://g-overlays.googlecode.com/svn/trunk/mozilla/app-emulation/kvm/
> 
> I have made little corrections to the build, to install some python scripts, to
> install again qemu-img to not rename the binary and so on, as I didn't want to
> install qemu. I haven't look at it still but the udev rule seems not to trigger
> itself, so chown root:kvm /dev/kvm help in these cases should do it, without it
> - it will segfault (this is because the qemu without kvm is broken with these
> patches).
> Installed win2000, started some images and  a gentoo cd - all seems to work
> with this release - kvm-20...
> 

I have confirmed that these patches allows full compilation of kvm using gcc4
but when attempting to load the module with modprobe kvm-intel, it fails to
load.  What platform are you using? dmesg shows this:

kvm: disabled by bios
kvm_intel: Unknown symbol set_cr3
kvm_intel: Unknown symbol gfn_to_page
kvm_intel: Unknown symbol segment_base
kvm_intel: Unknown symbol kvm_get_msr_common
kvm_intel: Unknown symbol kvm_mmu_free_some_pages
kvm_intel: Unknown symbol load_msrs
kvm_intel: Unknown symbol kvm_write_guest
kvm_intel: Unknown symbol kvm_exit_arch
kvm_intel: Unknown symbol emulate_instruction
kvm_intel: Unknown symbol fx_init
kvm_intel: Unknown symbol set_cr4
kvm_intel: Unknown symbol lmsw
kvm_intel: Unknown symbol kvm_hypercall
kvm_intel: Unknown symbol kvm_init_arch
kvm_intel: Unknown symbol set_cr0
kvm_intel: Unknown symbol set_cr8
kvm_intel: Unknown symbol kvm_setup_pio
kvm_intel: Unknown symbol kvm_read_guest
kvm_intel: Unknown symbol kvm_emulate_cpuid
kvm_intel: Unknown symbol kvm_set_msr_common
kvm_intel: Unknown symbol save_msrs
kvm_intel: Unknown symbol kvm_resched


emerge --info:

Portage 2.1.2.2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0,
2.6.20-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.20-gentoo-r6 x86_64 Intel(R) Core(TM)2 CPU         T7200  @
2.00GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 22 Apr 2007 19:20:01 +0000
dev-java/java-config: 1.3.7, 2.0.31-r5
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.15-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/php/apache1-php5/ext-active/
/etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/
/etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/
http://gentoo.mirrors.easynews.com/linux/gentoo/
http://mirror.phy.olemiss.edu/mirror/gentoo"
LINGUAS="en ru"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac acpi adns alsa amd64 apache2 audiofile avi bcmath bdf berkdb
bitmap-fonts bzip2 calendar cdr cjk clamav cli cracklib crypt ctype cups curl
curlwrappers dbus dio directfb dlloader dri dts dvb dvd dvdread emu-linux-x86
encode exif fbcon ffmpeg flac foomaticdb fortran ftp gd gdbm gif gmp gnutls gpm
gsm gtk gtk2 hal hash iconv ieee1394 imagemagick imap imlib innodb ipv6 isdnlog
ithreads java javascript jpeg jpeg2k json kde lcms ldap ldap-sasl libg++
logrotate lzo mad matroska mcal mhash midi mime mjpeg mng mp3 mp4 mpeg msession
msn mysql mysqli ncurses network nls nptl nptlonly nsplugin nvidia ogg openal
opengl osc oss pam pcntl pcre pdf pdo pear perl php png posix postgres ppds
pppd python qt qt3support qt4 quicktime readline reflection samba sasl sdl
seamonkey session simplexml snmp soap sockets spl sqlite ssl subversion suhosin
svg tcpd theora threads tidy tiff tokenizer transcode truetype truetype-fonts
type1-fonts unicode usb v4l v4l2 vcd vorbis wddx wifi wxwindows x264 xforms
xine xml xorg xpm xv xvid zip zlib" ALSA_CARDS="ali5451 als4000 atiixp
atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801
hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem
ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug
file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate
route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse"
KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001
mtxorb ncurses text" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa
fbdev v4l"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #48 From Gergan Penkov 2007-04-23 07:04:32 0000 -------
Have you loaded kvm before this - as I always loaded it before kvm-intel, I'm
on Core 2 Duo with amd64 profile exactly as you.

------- Comment #49 From Benjamin Floering 2007-04-23 07:34:01 0000 -------
(In reply to comment #47)

> 
> kvm: disabled by bios

I had this same message and was able to fix it by booting to my BIOS and
enabling the CPU virtualization extensions and then POWERING DOWN.  (I have an
orig Core: Yonah though)  I rebooted after changing the setting for the first
time and was seeing the same exact symptoms.  Both modules now load and I'm
running QEMU/KVM and access to my wireless device works! (Something VMware
couldn't do)  -  Hope this helps

------- Comment #50 From Sander Sweers 2007-04-23 08:45:12 0000 -------
(In reply to comment #49)
> > kvm: disabled by bios
> 
> I had this same message and was able to fix it by booting to my BIOS and
> enabling the CPU virtualization extensions and then POWERING DOWN.

You are lucky as there are also bioses that do not provide this option. So if
someone can not find it, haunt the manufacturer for an update ;-)

------- Comment #51 From Matthew Schultz 2007-04-23 13:20:42 0000 -------
(In reply to comment #50)
> (In reply to comment #49)
> > > kvm: disabled by bios
> > 
> > I had this same message and was able to fix it by booting to my BIOS and
> > enabling the CPU virtualization extensions and then POWERING DOWN.
> 
> You are lucky as there are also bioses that do not provide this option. So if
> someone can not find it, haunt the manufacturer for an update ;-)
> 

You're right.  Looks like I have the bios right before they updated it with the
virtualization selection.  Looks like I'm going to have to do a bios update. 
Thanks for pointing that out. 

------- Comment #52 From Matthew Schultz 2007-04-24 04:03:09 0000 -------
Ok, after a bios update, I got winxp sp2 installed but I haven't figured out
how to get it to cooperate with a bridge using dhcp.  Does anyone have a
network setup that works?

------- Comment #53 From Matthew Schultz 2007-04-24 04:13:14 0000 -------
(In reply to comment #52)
> Ok, after a bios update, I got winxp sp2 installed but I haven't figured out
> how to get it to cooperate with a bridge using dhcp.  Does anyone have a
> network setup that works?
> 

NM, firewall was blocking it.  I have it working.

------- Comment #54 From Gergan Penkov 2007-04-28 12:05:10 0000 -------
http://g-overlays.googlecode.com/svn/trunk/mozilla/app-emulation/kvm/
updated to kvm-21, removed the kernel version checks, as there is no kernel
with modules, which support kvm-21.
linux-2.6.21 modules could be used with kvm-17
linux-2.6.20 modules could be used with kvm-13

------- Comment #55 From MATSUYAMA Tomohiro 2007-04-28 14:47:48 0000 -------
i tried to use kvm-21 with kernel 2.6.21 on core2.

emerging kvm was succeeded but /usr/bin/kvm failed like:

 insmod: can't read 'kernel/kvm.ko': No such file or directory
 insmod: can't read 'kernel/kvm-intel.ko': No such file or directory
 Traceback (most recent call last):
   File "/usr/bin/kvm", line 189, in ?
     raise Exception, 'Unable to determine eth0 mac address'
 Exception: Unable to determine eth0 mac address

kvm.ko and kvm-intel.ko are placed in /lib/modules/2.6.21-gentoo/extra in my
environment.

------- Comment #56 From Matthew Schultz 2007-04-28 14:52:57 0000 -------
(In reply to comment #55)
> i tried to use kvm-21 with kernel 2.6.21 on core2.
> 
> emerging kvm was succeeded but /usr/bin/kvm failed like:
> 
>  insmod: can't read 'kernel/kvm.ko': No such file or directory
>  insmod: can't read 'kernel/kvm-intel.ko': No such file or directory
>  Traceback (most recent call last):
>    File "/usr/bin/kvm", line 189, in ?
>      raise Exception, 'Unable to determine eth0 mac address'
>  Exception: Unable to determine eth0 mac address
> 
> kvm.ko and kvm-intel.ko are placed in /lib/modules/2.6.21-gentoo/extra in my
> environment.
> 

Yes I noticed that too.  That file really isn't necessary anyway because it's
just a bash script wrapper for qemu with trimmed down options no less.  Just
use /usr/bin/qemu-system-x86_64 or /usr/bin/qemu depending on what platform
you're on instead.   

------- Comment #57 From Matthew Schultz 2007-04-28 20:49:01 0000 -------
Created an attachment (id=117585) [details]
kvm-21.ebuild

New and improved kvm-21.ebuild.  I have added a new patch to allow the kvm
wrapper to work properly.  I added usermode-utilities as a dependency since it
is necessary for bringing up a tap interface in the qemu-ifup script.  I
improved the qemu-ifup script.  I updated and checked all the patches to make
sure they patch properly on this version.  I removed all reference to the
2.6.20 kernel.  I also added more configuration instructions after emerging the
package.

------- Comment #58 From Matthew Schultz 2007-04-28 20:49:36 0000 -------
Created an attachment (id=117587) [details]
kvm-configure-21.patch

------- Comment #59 From Matthew Schultz 2007-04-28 20:50:05 0000 -------
Created an attachment (id=117589) [details]
kvm-kvm-21.patch

------- Comment #60 From Matthew Schultz 2007-04-28 20:50:25 0000 -------
Created an attachment (id=117590) [details]
qemu-configure-21.patch

------- Comment #61 From Matthew Schultz 2007-04-28 20:50:46 0000 -------
Created an attachment (id=117592) [details]
qemu-helper.c-21.patch

------- Comment #62 From Matthew Schultz 2007-04-28 20:51:09 0000 -------
Created an attachment (id=117594) [details]
qemu-makefile.target-21.patch

------- Comment #63 From Matthew Schultz 2007-04-28 20:51:30 0000 -------
Created an attachment (id=117595) [details]
qemu-qemu-kvm.c-21.patch

------- Comment #64 From Matthew Schultz 2007-04-28 20:52:10 0000 -------
Created an attachment (id=117596) [details]
qemu-vl.c-21.patch

------- Comment #65 From Matthew Schultz 2007-04-28 20:52:30 0000 -------
Created an attachment (id=117597) [details]
scripts-qemu-ifup-21.patch

------- Comment #66 From MATSUYAMA Tomohiro 2007-04-30 06:47:42 0000 -------
It appears to be working fine but the wrapper still has a little problem. Here
is a patch for the patched wrapper.

--- kvm 2007-04-30 14:56:42.000000000 +0900
+++ /usr/bin/kvm        2007-04-30 15:36:51.000000000 +0900
@@ -137,7 +137,7 @@

 if not options.notap:
     mac = options.mac
-    if not mac:
+    if mac:
         for line in commands.getoutput('/sbin/ip link show
eth0').splitlines():
             m = re.match(r'.*link/ether (..:..:..:..:..:..).*', line)
             if m:
@@ -148,8 +148,8 @@
         mac_components[0] = 'a0'
         mac = ':'.join(mac_components)

-    qemu_args += ('-net', 'nic,macaddr=%s,model=rtl8139' % (mac,),
-                  '-net', 'tap,script=/etc/kvm/qemu-ifup',)
+        qemu_args += ('-net', 'nic,macaddr=%s,model=rtl8139' % (mac,))
+    qemu_args += ('-net', 'tap,script=/etc/kvm/qemu-ifup')

 if options.vnc:
     qemu_args += ('-vnc', str(options.vnc))

In addtion, there is no consistency between man kvm and kvm --help. I think
it's worth makeing a man for the wrapper if it is trivial.

------- Comment #67 From MATSUYAMA Tomohiro 2007-04-30 06:51:51 0000 -------
sorry i have mistaken. the wrapper is correct

------- Comment #68 From MATSUYAMA Tomohiro 2007-04-30 11:15:05 0000 -------
segment fault when I execute qemu (by the wrapper) with -no-kvm. it appears to
be failed by sjlj in cpu_exec.

------- Comment #69 From Gergan Penkov 2007-04-30 12:50:49 0000 -------
(In reply to comment #68)
> segment fault when I execute qemu (by the wrapper) with -no-kvm. it appears to
> be failed by sjlj in cpu_exec.
> 

Yes, this will not work, as the patches remove some of the no-kvm functions to
make qemu gcc-4 compatible. So no wonder that it segfaults.

------- Comment #70 From MATSUYAMA Tomohiro 2007-05-09 10:32:11 0000 -------
kvm --install can not work because qemu/qemu-img is not found.

/usr/bin/kvm:104
        'qemu/qemu-img create -f qcow2 "%s" 10G' % disk)

------- Comment #71 From Matthew Schultz 2007-05-16 16:54:22 0000 -------
Created an attachment (id=119450) [details]
kvm-kvm-24.patch

New patch for KVM-24 which will fix the errors with starting up.  Removed all
capabilities to disable kvm.

------- Comment #72 From Matthew Schultz 2007-05-16 16:56:04 0000 -------
Created an attachment (id=119452) [details]
qemu-qemu-kvm.c-24.patch

This patch didn't patch properly for KVM-24.  All other 21 patches that I
submitted will work with KVM-24.  You just need to change the file name suffix
from 21 to 24.

------- Comment #73 From Matthew Schultz 2007-05-16 16:56:48 0000 -------
Created an attachment (id=119454) [details]
kvm-24.ebuild

------- Comment #74 From Michele Schiavo 2007-05-18 19:16:56 0000 -------
plase where i can found  kvm-configure-24.patch ?

kvm-24.ebuild, line 52:   Called epatch
'/usr/local/portage/app-emulation/kvm/files/kvm-configure-24.patch'

Thank's

------- Comment #75 From Matthew Schultz 2007-05-18 19:46:58 0000 -------
(In reply to comment #74)
> plase where i can found  kvm-configure-24.patch ?
> 
> kvm-24.ebuild, line 52:   Called epatch
> '/usr/local/portage/app-emulation/kvm/files/kvm-configure-24.patch'
> 
> Thank's
> 

As I mentioned in my last comments, just download the 21 versions that aren't
obsoleted since they didn't need to be changed and change the number to 24 in
the filename.  I saw no point in uploading new files just to change the name of
the file since the patch hasn't changed.

------- Comment #76 From Luiz C. B. Mostaço-Guidolin 2007-05-24 02:34:27 0000 -------
(In reply to comment #75)
> (In reply to comment #74)
> > plase where i can found  kvm-configure-24.patch ?
> > 
> > kvm-24.ebuild, line 52:   Called epatch
> > '/usr/local/portage/app-emulation/kvm/files/kvm-configure-24.patch'
> > 
> > Thank's
> > 
> 
> As I mentioned in my last comments, just download the 21 versions that aren't
> obsoleted since they didn't need to be changed and change the number to 24 in
> the filename.  I saw no point in uploading new files just to change the name of
> the file since the patch hasn't changed.
> 

Hi, I have downloaded the qemu-configure-21.patch and changed the name to 24
and it failed to apply the patch when I tried to:

# ebuild kvm-24.ebuild unpack

with the following message:

 * checking kvm-24.tar.gz ;-) ...                                 [ ok ]
>>> Checking kvm-24.tar.gz's mtime...
>>> Not marked as unpacked; recreating WORKDIR...
>>> Unpacking source...
>>> Unpacking kvm-24.tar.gz to /var/tmp/portage/app-emulation/kvm-24/work
 * Applying kvm-configure-24.patch ...                            [ ok ]
 * Applying kvm-kvm-24.patch ...                                  [ ok ]
 * Applying qemu-configure-24.patch ...

 * Failed Patch: qemu-configure-24.patch !
 *  ( /srv/overlay/app-emulation/kvm/files/qemu-configure-24.patch )
 * 
 * Include in your bugreport the contents of:
 * 
 *  
/var/tmp/portage/app-emulation/kvm-24/temp/qemu-configure-24.patch-10018.out


!!! ERROR: app-emulation/kvm-24 failed.
Call stack:
  ebuild.sh, line 1615:   Called dyn_unpack
  ebuild.sh, line 752:   Called qa_call 'src_unpack'
  ebuild.sh, line 44:   Called src_unpack
  kvm-24.ebuild, line 54:   Called epatch
'/srv/overlay/app-emulation/kvm/files/qemu-configure-24.patch'
  eutils.eclass, line 341:   Called die

!!! Failed Patch: qemu-configure-24.patch!

The mentioned log file is in attachment.

thank you very much!
Guidolin
!!! If you need support, post the topmost build error, and the call stack if
relevant.
!!! A complete build log is located at
'/var/tmp/portage/app-emulation/kvm-24/temp/build.log'.

!!! This ebuild is from an overlay: '/srv/overlay'

------- Comment #77 From Luiz C. B. Mostaço-Guidolin 2007-05-24 02:36:55 0000 -------
Created an attachment (id=120155) [details]
Error log mentioned on comment 76

------- Comment #78 From MATSUYAMA Tomohiro 2007-05-24 05:33:36 0000 -------
Please try it again from
<http://gentoo.panicode.com/overlay/app-emulation/kvm/> if you want. But there
is NO WARRANTY.

------- Comment #79 From Matthew Schultz 2007-05-24 13:13:33 0000 -------
(In reply to comment #77)
> Created an attachment (id=120155) [edit] [details]
> Error log mentioned on comment 76
> 

I retested the patch and it patches fine on my end.  

------- Comment #80 From Luiz C. B. Mostaço-Guidolin 2007-05-25 03:10:21 0000 -------
(In reply to comment #78)
> Please try it again from
> <http://gentoo.panicode.com/overlay/app-emulation/kvm/> if you want. But there
> is NO WARRANTY.
> 

Hi,

I have downloaded all the files and emerged them. It worked for me!

Thank you!

------- Comment #81 From Luiz C. B. Mostaço-Guidolin 2007-05-25 03:11:24 0000 -------
(In reply to comment #79)
> (In reply to comment #77)
> > Created an attachment (id=120155) [edit] [details]
> > Error log mentioned on comment 76
> > 
> 
> I retested the patch and it patches fine on my end.  
> 

Hi,

I will try again and try to find out what was the problem on my machine!

Thank you anyway!

------- Comment #82 From Matthew Schultz 2007-05-25 13:48:45 0000 -------
Created an attachment (id=120283) [details]
kvm-25.ebuild

I added nomirror to restrict since I got tired of it hanging on mirrors that
don't have the file anyway.  Once again I have tested all previous patches
(they still work) and all they need is just a name change to the 25 version:

117587: kvm-configure-21.patch
117590: qemu-configure-21.patch
117592: qemu-helper.c-21.patch
117594: qemu-makefile.target-21.patch
117596: qemu-vl.c-21.patch
117597: scripts-qemu-ifup-21.patch
119450: kvm-kvm-24.patch
119452: qemu-qemu-kvm.c-24.patch

------- Comment #83 From MATSUYAMA Tomohiro 2007-05-28 02:17:02 0000 -------
kvm25 faild to compile with gcc 4.1.2 on git-sources 2.6.22-rc3.
please see a build.log.

------- Comment #84 From MATSUYAMA Tomohiro 2007-05-28 02:18:06 0000 -------
Created an attachment (id=120488) [details]
error log with gcc 4.1.2 on git-sources 2.6.22-rc3

------- Comment #85 From Matthew Schultz 2007-05-28 16:24:31 0000 -------
(In reply to comment #83)
> kvm25 faild to compile with gcc 4.1.2 on git-sources 2.6.22-rc3.
> please see a build.log.
> 

Considering 2.6.22-rc3 is beta software, I wouldn't worry about compilation
errors at this point since they go through multiple release candidates and that
version is by no means stable.

------- Comment #86 From Matthew Schultz 2007-05-28 18:02:27 0000 -------
I just tested out KVM-26.  Nothing needs to be changed for it.  Just change the
kvm-25.ebuild to kvm-26.ebuild and all the latest patches to 26.

------- Comment #87 From Stephen Bridges 2007-05-30 21:46:15 0000 -------
(In reply to comment #86)
> I just tested out KVM-26.  Nothing needs to be changed for it.  Just change the
> kvm-25.ebuild to kvm-26.ebuild and all the latest patches to 26.
> 

I also tested KVM-26 in this manner on my Athlon 64 x2 running ~amd64.  I can
provide a emerge --info (mail me).

------- Comment #88 From Florian Schroff 2007-06-03 18:33:04 0000 -------
Hi,
i tried kvm-26 as well and it seemed to work fine.

However, there is one thing which confuses me:

$kvm --image=/data/temp/xp.cow --install --cdrom=/dev/cdrom1 -m 384 --no-tap
Warning: No DNS servers found
Could not open '/dev/kqemu' - QEMU acceleration layer not activated

Why does it complain about /dev/kqemu??? is that alright or does it currently
not use acceleration. I thought kvm doesn't need/use kqemu, or does it just use
the same /dev???

cheers, and well done with the ebuild, hope it'll be in portage soon
florian

------- Comment #89 From Matthew Schultz 2007-06-04 00:13:58 0000 -------
(In reply to comment #88)
> Hi,
> i tried kvm-26 as well and it seemed to work fine.
> 
> However, there is one thing which confuses me:
> 
> $kvm --image=/data/temp/xp.cow --install --cdrom=/dev/cdrom1 -m 384 --no-tap
> Warning: No DNS servers found
> Could not open '/dev/kqemu' - QEMU acceleration layer not activated
> 
> Why does it complain about /dev/kqemu??? is that alright or does it currently
> not use acceleration. I thought kvm doesn't need/use kqemu, or does it just use
> the same /dev???
> 
> cheers, and well done with the ebuild, hope it'll be in portage soon
> florian
> 

I'm not sure how you're getting that error.  I am not getting that error with
those flags.  KVM comes with a modified version of qemu which has code for
kqemu in it but I'm not quite sure why it would be looking for kqemu.  Do an
lsmod and make sure kvm and kvm-intel or kvm-amd is loaded.  I haven't tried
this module with kqemu loaded as well and I'm not even sure if you can load
those modules at the same time but just make sure you don't have any conflicts
there.

------- Comment #90 From Matthew Schultz 2007-06-04 00:15:59 0000 -------
Good news!  I just tested the patches with KVM-27 and all the latest patches
work without modifications.  So just change the names of the patches and the
ebuild to have a 27 version number instead of 26 to upgrade.

changelog for KVM-27:

- use slab cache for mmu shadow pages
- make shadow pte updates atomic (for guest smp)
- general mmu cleanups

------- Comment #91 From Sander Sweers 2007-06-04 06:23:40 0000 -------
(In reply to comment #90)
> Good news!  I just tested the patches with KVM-27 and all the latest patches
> work without modifications.  So just change the names of the patches and the
> ebuild to have a 27 version number instead of 26 to upgrade.

Easier is to change the naming in the ebuild. The patched don't change so hard
code their names.

------- Comment #92 From Matthew Schultz 2007-06-04 17:57:15 0000 -------
Created an attachment (id=121167) [details]
kvm-27.ebuild

Removed patch versions from ebuild. 

------- Comment #93 From Matthew Schultz 2007-06-04 17:58:21 0000 -------
Created an attachment (id=121170) [details]
kvm-configure.patch

Removing version number.

------- Comment #94 From Matthew Schultz 2007-06-04 17:59:06 0000 -------
Created an attachment (id=121172) [details]
qemu-configure.patch

Removing version number.

------- Comment #95 From Matthew Schultz 2007-06-04 17:59:34 0000 -------
Created an attachment (id=121174) [details]
qemu-helper.c.patch

Removing version number.

------- Comment #96 From Matthew Schultz 2007-06-04 18:00:05 0000 -------
Created an attachment (id=121176) [details]
qemu-makefile.target.patch

Removing version number.

------- Comment #97 From Matthew Schultz 2007-06-04 18:00:42 0000 -------
Created an attachment (id=121177) [details]
qemu-vl.c.patch

Removing version number.

------- Comment #98 From Matthew Schultz 2007-06-04 18:01:18 0000 -------
Created an attachment (id=121179) [details]
scripts-qemu-ifup.patch

Removing version number.

------- Comment #99 From Matthew Schultz 2007-06-04 18:01:47 0000 -------
Created an attachment (id=121181) [details]
kvm-kvm.patch

Removing version number.

------- Comment #100 From Matthew Schultz 2007-06-04 18:02:19 0000 -------
Created an attachment (id=121183) [details]
qemu-qemu-kvm.c.patch

Removing version number.

------- Comment #101 From Julien Cassette 2007-06-08 14:11:19 0000 -------
16:04 [0] hazynrg $ kvm -m 400 --no-tap --cdrom=/dev/hda --image=winlsd.raw 
exception 13 (0)
rax 000000000000f001 rbx 000000000000d713 rcx 0000000000000001 rdx
0000000000000000
rsi 00000000ffff004c rdi 000000000008f7f4 rsp 000000000000ffb8 rbp
000000000000ffcc
r8  0000000000000000 r9  0000000000000000 r10 0000000000000000 r11
0000000000000000
r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15
0000000000000000
rip 0000000000000a45 rflags 00033002
cs f000 (000f0000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
es 07c0 (00007c00/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
tr 0000 (19850000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
gdt fa580/30
idt 0/3ff
cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00
Abandon
16:04 [134] hazynrg $ emerge --info
Portage 2.1.2.7 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.5-r2,
2.6.21-gentoo-r2 x86_64)
=================================================================
System uname: 2.6.21-gentoo-r2 x86_64 Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz
Gentoo Base System release 1.12.10
Timestamp of tree: Wed, 06 Jun 2007 17:20:01 +0000
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.4.4-r4, 2.5-r1
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17.50.0.16
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/
/etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/"
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LDFLAGS="-Wl,--hash-style=both"
LINGUAS="fr"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/enlightenment /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 bash-completion berkdb bitmap-fonts cairo cdr cli
cracklib crypt cups dbus dri dvd dvdr dvdread eds emacs encode fam firefox
fortran gdbm gif gpm gstreamer gtk hal hashstyle iconv ipv6 isdnlog jpeg
kerberos ldap libg++ midi mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg
opengl openmp pam pcre pdf perl png pppd python qt3 qt3support qt4 readline
reflection sdl session spell spl sse sse2 ssl svg tcpd tiff truetype
truetype-fonts type1-fonts unicode usb vorbis xml xorg xv zlib"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x
ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3
trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw
asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa
lfloat linear meter mulaw multi null plug rate route share shm softvol"
CAMERAS="kodak ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse"
KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001
mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #102 From Matthew Schultz 2007-06-08 14:26:17 0000 -------
(In reply to comment #101)
> 16:04 [0] hazynrg $ kvm -m 400 --no-tap --cdrom=/dev/hda --image=winlsd.raw 
> exception 13 (0)
> rax 000000000000f001 rbx 000000000000d713 rcx 0000000000000001 rdx
> 0000000000000000
> rsi 00000000ffff004c rdi 000000000008f7f4 rsp 000000000000ffb8 rbp
> 000000000000ffcc
> r8  0000000000000000 r9  0000000000000000 r10 0000000000000000 r11
> 0000000000000000
> r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15
> 0000000000000000
> rip 0000000000000a45 rflags 00033002
> cs f000 (000f0000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> es 07c0 (00007c00/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> tr 0000 (19850000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
> ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
> gdt fa580/30
> idt 0/3ff
> cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
> code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00
> Abandon
> 16:04 [134] hazynrg $ emerge --info
> Portage 2.1.2.7 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.5-r2,
> 2.6.21-gentoo-r2 x86_64)
> =================================================================
> System uname: 2.6.21-gentoo-r2 x86_64 Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz
> Gentoo Base System release 1.12.10
> Timestamp of tree: Wed, 06 Jun 2007 17:20:01 +0000
> dev-java/java-config: 1.3.7, 2.0.32
> dev-lang/python:     2.4.4-r4, 2.5-r1
> dev-python/pycrypto: 2.0.1-r5
> sys-apps/sandbox:    1.2.18.1
> sys-devel/autoconf:  2.13, 2.61
> sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
> sys-devel/binutils:  2.17.50.0.16
> sys-devel/gcc-config: 1.3.16
> sys-devel/libtool:   1.5.23b
> virtual/os-headers:  2.6.21
> ACCEPT_KEYWORDS="amd64 ~amd64"
> AUTOCLEAN="yes"
> CBUILD="x86_64-pc-linux-gnu"
> CFLAGS="-march=nocona -O2 -pipe"
> CHOST="x86_64-pc-linux-gnu"
> CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
> /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
> CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
> /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/
> /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
> CXXFLAGS="-march=nocona -O2 -pipe"
> DISTDIR="/usr/portage/distfiles"
> FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
> GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/"
> LANG="fr_FR.UTF-8"
> LC_ALL="fr_FR.UTF-8"
> LDFLAGS="-Wl,--hash-style=both"
> LINGUAS="fr"
> MAKEOPTS="-j3"
> PKGDIR="/usr/portage/packages"
> PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
> --force --whole-file --delete --delete-after --stats --timeout=180
> --exclude=/distfiles --exclude=/local --exclude=/packages
> --filter=H_**/files/digest-*"
> PORTAGE_TMPDIR="/var/tmp"
> PORTDIR="/usr/portage"
> PORTDIR_OVERLAY="/usr/portage/local/layman/enlightenment /usr/local/portage"
> SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
> USE="X acl acpi alsa amd64 bash-completion berkdb bitmap-fonts cairo cdr cli
> cracklib crypt cups dbus dri dvd dvdr dvdread eds emacs encode fam firefox
> fortran gdbm gif gpm gstreamer gtk hal hashstyle iconv ipv6 isdnlog jpeg
> kerberos ldap libg++ midi mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg
> opengl openmp pam pcre pdf perl png pppd python qt3 qt3support qt4 readline
> reflection sdl session spell spl sse sse2 ssl svg tcpd tiff truetype
> truetype-fonts type1-fonts unicode usb vorbis xml xorg xv zlib"
> ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x
> ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3
> trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw
> asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa
> lfloat linear meter mulaw multi null plug rate route share shm softvol"
> CAMERAS="kodak ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse"
> KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001
> mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="nvidia"
> Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS,
> PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
> 

It doesn't surprise me that that doesn't work.  I have yet to get kvm to start
up as anything but root and it looks like you're trying this as a regular user.
 Also it certainly can't help that you have ~amd64 in your keywords.  You're
just asking for problems when you always emerge testing packages if available.

------- Comment #103 From Radek Podgorny 2007-06-17 19:33:04 0000 -------
compiles fine on ~amd64 with 2.6.21.1 kernel, can't test yet...

------- Comment #104 From Guido Imperiale 2007-06-19 00:08:11 0000 -------
kvm-27.ebuild builds the kernel module against the currently running kernel,
while it should be supposed to build it against whatever kernel is present in
/usr/src/linux.

------- Comment #105 From Salman 2007-07-04 16:55:28 0000 -------
If anyone is interested, I modified the ebuild to be compatible with qemu (arm
development, anyone?) It doesn't install qemu-img and the docs, and it make use
of the existing files (/etc/qemu-ifup and /usr/share/qemu.)

The ebuild:
http://finiteless.net/~sio/misc/gentoo/kvm/kvm-28.ebuild

It uses most of the patches used in kvm-27.ebuild, plus these three:
http://finiteless.net/~sio/misc/gentoo/kvm/no-qemu-img.patch
http://finiteless.net/~sio/misc/gentoo/kvm/bin-names.patch
http://finiteless.net/~sio/misc/gentoo/kvm/kvm-bin-names.patch

The binary name on amd64 is qemu-system-x86_64-kvm, it should be qemu-kvm on
i386.

------- Comment #106 From Natanael Copa 2007-07-05 06:48:04 0000 -------
(In reply to comment #105)
> If anyone is interested, I modified the ebuild to be compatible with qemu (arm
> development, anyone?) It doesn't install qemu-img and the docs, and it make use
> of the existing files (/etc/qemu-ifup and /usr/share/qemu.)
> 
> The ebuild:
> http://finiteless.net/~sio/misc/gentoo/kvm/kvm-28.ebuild

This does not install bios.bin for some reason.

------- Comment #107 From Salman 2007-07-05 18:12:27 0000 -------
> This does not install bios.bin for some reason.

If you don't have /usr/share/qemu/bios.bin at all you should try to reemerge
app-emulation/qemu.

If you mean the Vista patch... well, let's say I "forgot" about it. :P
I'll look into this later today when I get back home. (or get something with
ssh)

------- Comment #108 From Rafal Boniecki 2007-07-05 22:40:06 0000 -------
(In reply to comment #105)
Your page does not work. Why not attach files to bugzilla?

------- Comment #109 From Guido Imperiale 2007-07-07 09:25:06 0000 -------
Networking doesn't work.
IP tunnelling is enabled as builtin in my kernel (2.6.21-gentoo-r3).
I'm using kvm-27.

(as root:)
# kvm
Bringing up interface tap0
TUNSETIFF: Device or resource busy
/etc/kvm/qemu-ifup: line 19: /sbin/brctl: No such file or directory
/etc/kvm/qemu-ifup: could not launch network script
Could not initialize device 'tap'

#ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:50:8D:95:85:FC  
          inet addr:192.168.52.1  Bcast:192.168.52.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:223950 errors:0 dropped:0 overruns:0 frame:0
          TX packets:214377 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:190609895 (181.7 Mb)  TX bytes:72415029 (69.0 Mb)
          Interrupt:23 Base address:0xa000 

eth1      Link encap:Ethernet  HWaddr 00:50:8D:95:85:FD  
          inet addr:10.0.0.1  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:22 Base address:0xc000 

eth2      Link encap:UNSPEC  HWaddr
00-50-8D-00-00-92-A5-3E-00-00-00-00-00-00-00-00  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:749 errors:0 dropped:0 overruns:0 frame:0
          TX packets:749 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:49943 (48.7 Kb)  TX bytes:49943 (48.7 Kb)

tunl0     Link encap:IPIP Tunnel  HWaddr   
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


(note that I have only 2 physical ethernet cards, I don't know what eth2 is
supposed to be).

------- Comment #110 From John M. Drescher 2007-07-07 12:07:53 0000 -------
(note that I have only 2 physical ethernet cards, I don't know what eth2 is
supposed to be).

It could easily be a 1994 (firewire) network connection. Basically if you have
a firewire port on your pc and you have the eth1394 module loaded you will get
an entry for a firewire network.

------- Comment #111 From Guido Imperiale 2007-07-07 15:32:38 0000 -------
(In reply to comment #110)
> It could easily be a 1994 (firewire) network connection. Basically if you have
> a firewire port on your pc and you have the eth1394 module loaded you will get
> an entry for a firewire network.

You're right, that must be it.

------- Comment #112 From Matthew Schultz 2007-07-15 19:14:44 0000 -------
Created an attachment (id=124934) [details]
kvm-29.ebuild

Version bump.  A few patches had to be updated.

------- Comment #113 From Matthew Schultz 2007-07-15 19:15:16 0000 -------
Created an attachment (id=124936) [details]
kvm-kvm.patch

------- Comment #114 From Matthew Schultz 2007-07-15 19:15:52 0000 -------
Created an attachment (id=124937) [details]
qemu-configure.patch

------- Comment #115 From Matthew Schultz 2007-07-15 19:16:28 0000 -------
Created an attachment (id=124939) [details]
qemu-qemu-kvm.c.patch

------- Comment #116 From Matthew Schultz 2007-07-15 19:18:11 0000 -------
Only 3 patches needed to be updated for KVM-29.  All other previous patches
will work with this version.

------- Comment #117 From Arne Stäcker 2007-07-17 07:22:21 0000 -------
Hi,
I installed the lastest linux-headers-2.6.22 and now I have a file collision
with /usr/include/linux/kvm.h. Both linux-headers and kvm wants to install this
file. Any idea?

------- Comment #118 From Rafal Boniecki 2007-07-21 19:58:50 0000 -------
Traceback (most recent call last):
  File "/usr/bin/kvm", line 20, in ?
    external_module = config.get('shell', 'want_module')
  File "/usr/lib/python2.4/ConfigParser.py", line 511, in get
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'shell'

------- Comment #119 From Scott Alfter 2007-07-22 04:23:34 0000 -------
(In reply to comment #118)
> Traceback (most recent call last):
>   File "/usr/bin/kvm", line 20, in ?
>     external_module = config.get('shell', 'want_module')
>   File "/usr/lib/python2.4/ConfigParser.py", line 511, in get
>     raise NoSectionError(section)
> ConfigParser.NoSectionError: No section: 'shell'
> 

I'm getting the same error here.  I've fallen back to kvm-27, but now I'm
getting this:

Traceback (most recent call last):
  File "/usr/bin/kvm", line 138, in ?
    raise Exception, 'Unable to determine eth0 mac address'
Exception: Unable to determine eth0 mac address

Digging into the kvm script, it looks like it's trying to run /sbin/ip,
whatever that is.  If it wants to get eth0's MAC address, shouldn't it use some
invocation of /sbin/ifconfig instead?  As an alternative, what ebuild provides
/sbin/ip?

------- Comment #120 From Scott Alfter 2007-07-22 06:36:08 0000 -------
(In reply to my previous comment)
> Digging into the kvm script, it looks like it's trying to run /sbin/ip,
> whatever that is.

Turns out it's part of sys-apps/iproute2, which (along with
net-misc/bridge-utils) should be marked in the ebuilds as dependencies.

------- Comment #121 From Matthew Schultz 2007-07-22 16:19:45 0000 -------
They weren't marked as dependencies because you don't need network access to
run kvm.  It also requires extra configuration that the ebuild doesn't cover to
set up a bridge interface.

------- Comment #122 From Evan Wagner 2007-07-24 19:23:10 0000 -------
Created an attachment (id=125905) [details]
KVM 32 ebuild works GCC 4.2 and module build

Tested with GCC 4.1 and 4.2 on 2.6.22-gentoo-r1 kernel with -inkernel use flag.
User space tools and kernel modules worked on this setup.

------- Comment #123 From Matthew Schultz 2007-07-25 15:23:03 0000 -------
Created an attachment (id=125989) [details]
kvm-33.ebuild

Old gcc patches not necessary anymore.  Other patches have been redone where
necessary.

------- Comment #124 From Matthew Schultz 2007-07-25 15:23:31 0000 -------
Created an attachment (id=125991) [details]
kvm-kvm.patch

------- Comment #125 From Matthew Schultz 2007-07-25 15:23:50 0000 -------
Created an attachment (id=125993) [details]
qemu-configure.patch

------- Comment #126 From Matthew Schultz 2007-07-25 15:24:10 0000 -------
Created an attachment (id=125994) [details]
qemu-vl.c.patch

------- Comment #127 From Matthew Schultz 2007-07-25 15:24:33 0000 -------
Created an attachment (id=125996) [details]
scripts-qemu-ifup.patch

------- Comment #128 From Julien Cassette 2007-07-25 18:05:08 0000 -------
In kvm-32.ebuild, I think you should enclose "linux-mod_src_install" with a "if
! use inkernel; then ... fi".

Also, why the kvm-33 ebuild is so different from the kvm-32 one?

------- Comment #129 From Matthew Schultz 2007-07-25 21:06:18 0000 -------
(In reply to comment #128)
> In kvm-32.ebuild, I think you should enclose "linux-mod_src_install" with a "if
> ! use inkernel; then ... fi".
> 
> Also, why the kvm-33 ebuild is so different from the kvm-32 one?
> 

The better question would be why 32 is different from 29.  It was missing
necessary patches and dependencies among other things.  This ebuild can't be
built with the module that comes with the kernel as no kernel uses this version
of kvm and if you tried, kvm would compile but crash when you try to use it
(probably due to the version mismatch). 

------- Comment #130 From Julien Cassette 2007-07-26 08:30:12 0000 -------
kvm-32 compiles and works fine on ~amd64, 2.6.22-gentoo-r1 kernel with
kvm-intel hardcoded. I used USE=inkernel.

I'm going to test kvm-33 with the pkg_setup command removed, as it is weird
imho.

------- Comment #131 From Matthew Schultz 2007-07-26 14:09:02 0000 -------
Created an attachment (id=126072) [details]
kvm-33.ebuild

ebuild wasn't dying when kvm was built-in or the kernel modules were compiled.  

------- Comment #132 From Jochen Schlick 2007-08-05 14:20:44 0000 -------
Hi,
I use kvm-33.ebuild with a ~amd linux-2.6.22-gentoo-r2 kernel but I had to
comment out the first part of the src_unpack to get it working.

src_unpack() {
#       #Don't continue if the KVM modules that come with the kernel are
compiled
#       if linux_chkconfig_present KVM ; then
#               eerror "kvm-${PV} doesn't work with the kernel modules"
#               die "kvm module is included in the kernel"
#       fi


Are there some known issues with vde ? default uml network works fine but using
tap0 via "vde qemu-system-x86_64 ..." produce a hang up of the guest in my env.


------- Comment #133 From Jochen Schlick 2007-08-11 13:25:26 0000 -------
After one week of running some guests (mainly 32bit fedora rawhide) in my AMD64
qemu/kvm-33/linux-2.6.22-gentoo-r1/2 environment I can say it works but not as
fine as I hoped. 
The first problem is the time in the guests. It seems that the guests clock
speed is only 70% of the hosts clock speed. I played around a little bit with
the hosts kernel options 300/1000HZ and the io-schedulers but no success.
Perhaps qemu/kvm + guest have problems with the dynamic cpu speed.  

The second problem I have is still the network. I use now routed vde/tap
configuration which works fine for transferring some hundreds of megabytes from
guest to host/net vice versa. But when I try to transfer some gigabytes using
scp the connection hangs (wireshark shows no longer packets for the interface)
and I have to restart the guest's interface. Perhaps this is also a
timer/scheduling problem...or a bug in vde ...  

------- Comment #134 From Jochen Schlick 2007-08-24 00:54:51 0000 -------
- the time problem is more or less a guest kernel problem. My fedora guest
system has now the same time as the host after setting "acpi=force" for the
guest kernel (vanilla 2.6.22.1). The the guest's clock source is no longer pit.
It's now acpi_pm
according to /sys/devices/system/clocksource/clocksource0/current_clocksource.

here the concerning thread from the kvm list: 
http://www.mail-archive.com/kvm-devel@lists.sourceforge.net/msg05440.html

------- Comment #135 From Octavio Ruiz (Ta^3) 2007-08-29 15:11:37 0000 -------
Just bumped kvm-33.ebuild to kvm-36.ebuild, works as expected.

Matthew:

Why die if KVM kernel module is built in?
Where is the option to use just the userspace utils?
Why not just notice that modules are not going to build because detected
built-in modules and continue building?

kvm-33 did'nt work for me (can't boot any OS) so I use kvm-33 userspace and
(gentoo-sources 2.6.22-r{4,5}) built-in modules without any problem.

http://www.flickr.com/photos/tacvbo/1266924511/

------- Comment #136 From Matthew Schultz 2007-08-29 16:37:44 0000 -------
(In reply to comment #135)
> Just bumped kvm-33.ebuild to kvm-36.ebuild, works as expected.
> 
> Matthew:
> 
> Why die if KVM kernel module is built in?
> Where is the option to use just the userspace utils?
> Why not just notice that modules are not going to build because detected
> built-in modules and continue building?
> 
> kvm-33 did'nt work for me (can't boot any OS) so I use kvm-33 userspace and
> (gentoo-sources 2.6.22-r{4,5}) built-in modules without any problem.
> 
> http://www.flickr.com/photos/tacvbo/1266924511/
> 

I suppose you've noticed that the ebuild is built with compiling only the
userspace utilities in mind if you comment out the die.  The reason why the die
is still there is similar to comment #129 at this point.  I have just tested
KVM-36 with 2.6.22 (uses KVM-22) and it does not work.  Right now it does not
even compile where at least it compiled before but gave me a segfault when I
attempted to run the kvm userspace utility which is really just a patched qemu.

I have consistently been using the kvm module (not built into the kernel) since
kvm-14 and it has not had any problems booting.  My hardware consists of a
64-bit Intel Core 2 Duo using kvm-intel (I don't have an AMD-V processor to
test with).  I have also tested kvm-intel on a 32-bit Intel Core Processor and
I can confirm that works as well.  If you're having problems using the module,
you're either misconfiguring something or there is a bug in kvm with whatever
hardware/os you're using.

------- Comment #137 From Carlo Marcelo Arenas Belon 2007-09-09 10:19:19 0000 -------
(In reply to comment #136)
> (In reply to comment #135)
> > Why die if KVM kernel module is built in?
> The reason why the die
> is still there is similar to comment #129 at this point.  I have just tested
> KVM-36 with 2.6.22 (uses KVM-22) and it does not work.  Right now it does not
> even compile where at least it compiled before but gave me a segfault when I
> attempted to run the kvm userspace utility which is really just a patched qemu.

the reason why kvm-36 wouldn't compile is that there is a slight change in the
ABI  for that version which is not reflected in kernel 2.6.22 or even 2.6.23
(currently in RC) as explained here :

http://sourceforge.net/mailarchive/message.php?msg_id=20070825172144.GA13727%40dreamland.darkstar.lan

the problem is self inflicted though, because the ebuild uses incorrectly
--with-patched-kernel to override the compilation process to use the system
headers instead of the ones that match the user space tools

------- Comment #138 From Mike Arthur 2007-09-09 10:38:50 0000 -------
(In reply to comment #137)

Sorry, so how can we get kvm-36 compiling and working?
I'm getting the same segfault and don't have KVM build in to my kernel
(2.6.22).

------- Comment #139 From Matthew Schultz 2007-09-09 17:54:32 0000 -------
(In reply to comment #137)
> (In reply to comment #136)
> > (In reply to comment #135)
> > > Why die if KVM kernel module is built in?
> > The reason why the die
> > is still there is similar to comment #129 at this point.  I have just tested
> > KVM-36 with 2.6.22 (uses KVM-22) and it does not work.  Right now it does not
> > even compile where at least it compiled before but gave me a segfault when I
> > attempted to run the kvm userspace utility which is really just a patched qemu.
> 
> the reason why kvm-36 wouldn't compile is that there is a slight change in the
> ABI  for that version which is not reflected in kernel 2.6.22 or even 2.6.23
> (currently in RC) as explained here :
> 
> http://sourceforge.net/mailarchive/message.php?msg_id=20070825172144.GA13727%40dreamland.darkstar.lan
> 
> the problem is self inflicted though, because the ebuild uses incorrectly
> --with-patched-kernel to override the compilation process to use the system
> headers instead of the ones that match the user space tools
> 

The short answer is KVM is changing so quickly that you shouldn't count on the
userspace tools from one version working with a previous version of a kvm
module.  So the die will remain there for the foreseeable future and it will
not make use of --with-patched-kernel as a result.  So as far as I can tell,
the only time you could comment out the die would be if the kvm userspace tools
were the exact same version as the version in the kernel.

------- Comment #140 From Carlo Marcelo Arenas Belon 2007-09-11 13:46:05 0000 -------
(In reply to comment #139)
> (In reply to comment #137)
> > (In reply to comment #136)
> > > (In reply to comment #135)
> > > > Why die if KVM kernel module is built in?
> > > The reason why the die
> > > is still there is similar to comment #129 at this point.  I have just tested
> > > KVM-36 with 2.6.22 (uses KVM-22) and it does not work.  Right now it does not
> > > even compile where at least it compiled before but gave me a segfault when I
> > > attempted to run the kvm userspace utility which is really just a patched qemu.
> > 
> > the reason why kvm-36 wouldn't compile is that there is a slight change in the
> > ABI  for that version which is not reflected in kernel 2.6.22 or even 2.6.23
> > (currently in RC) as explained here :
> > 
> > http://sourceforge.net/mailarchive/message.php?msg_id=20070825172144.GA13727%40dreamland.darkstar.lan
> > 
> > the problem is self inflicted though, because the ebuild uses incorrectly
> > --with-patched-kernel to override the compilation process to use the system
> > headers instead of the ones that match the user space tools
> > 
> 
> The short answer is KVM is changing so quickly that you shouldn't count on the
> userspace tools from one version working with a previous version of a kvm
> module.

agree, even though there is a binary compatibility version (KVM_API_VERSION)
which should prevent incompatible changes to break in these cases as shown in
kvm.h

both: kvm-36 user space tools and gentoo-sources-2.6.22-r5 use version 12 and
therefore are able to work together.

sadly, even in that case you are probably better of by using the kvm module
that cames with the kvm package as there is going to be missing functionality
otherwise (using kvm-36 with 2.6.22-r5's module won't allow for SMP guests for
example)

> So the die will remain there for the foreseeable future and it will
> not make use of --with-patched-kernel as a result.  So as far as I can tell,
> the only time you could comment out the die would be if the kvm userspace
> tools were the exact same version as the version in the kernel.

the use of --with-patched-kernel is only valid when the kernel used is the
kvm.git repository itself, so it shouldn't be there.

the die is also not valid, as it enforces a recommendation which otherwise
would work fine.

------- Comment #141 From Carlo Marcelo Arenas Belon 2007-09-11 13:55:28 0000 -------
Created an attachment (id=130577) [details]
an ebuild for kvm-37 and all supporting patches in files

to use untar in your local overlay and then run :

  ebuild kvm-37.ebuild manifest
  emerge -Duv kvm

add "app-emulation/kvm kvm" to /etc/portage/package.use if you want it also to
build the kernel module instead of using the one in the currently installed
kernel (recommended in most cases)

this has been tested stable in amd64 using gcc-3.4.6-r2 for the qemu part
(referenced by the ebuild but not as a dependency as per ebuild policies, so
that needs to be installed independently for it to work)

------- Comment #142 From Carlo Marcelo Arenas Belon 2007-09-11 14:34:07 0000 -------
some additional comments about the attached kvm-37 ebuild (which has a
different objective than the one being used here, as it is complimentary to
qemu instead of conflicting with it, and is not meant to be considered
"official" but hope at least useful to some of you)

1) all the qemu system emulations generated are now named kvm-*
(kvm-system-i386 and kvm-system-x86_64) instead of qemu-* to prevent conflicts
and let you use qemu as well for all cases where it is more stable/faster.
2) there is no qemu-img so you would need qemu-img from qemu-softmmu to manage
disk images
3) /usr/bin/kvm doesn't work so use kvm-system-* directly after loading the
right kernel modules, I might fix it as it is a nice wrapper, but for now i'd
rather keep the dependency list lean
4) it requires gcc-3.4 to compile (at least the qemu part of it) and will use
it directly by name so no need to change your system CC, alsa is optional as
per the corresponding use flag
5) the generated kernel modules will be in /lib/modules/`uname -r`/misc so
insmod those if you want to use them instead of the ones from your kernel (if
there is only 1 copy of them modprobe would be probably easier to use and this
is recommended), remember to insmod kvm.ko fist before your CPU specific module
(kvm-intel.ko or kvm-amd.ko)

and some about kvm-37 itself :

1) since kvm-36 there is a buggy BIOS included which will break windows 2000
when using ACPI and windows vista at least (partially reverted in git already)
and that has broken SMP support, this is not yet fixed upstream and could be
worked around by using -no-acpi or using qemu's BIOS files in some cases.
2) qemu requires gcc 3.4 (at least to compile the dyngen code that it uses for
emulation), this is still not fixed upstream even if some improvements had been
done recently to improve the quality of gcc-4 generated code, but is still
going to mean a performance issue at the least and a source for crashes in the
most common cases.
3) kvm code is IMHO more unstable than qemu and because of the forked status
might be missing important patches like qemu-0.9.0-atapi-hsm.patch which is
required for guests using libata, so falling back to qemu using kqemu as a
speedy replacement if needed is IMHO a must have for any kvm ebuild, and at
least until kvm finishes merging their modified qemu upstream (it would seem
that kvm is actually forking more parts of qemu instead at least for now, so
this could take a while)

------- Comment #143 From Radek Podgorny 2007-09-11 15:15:47 0000 -------
I'm also all in for a coexistence of both qemu and kvm. Please consider using
this method in future ebuilds... Thanks...

------- Comment #144 From Matthew Schultz 2007-09-11 16:18:36 0000 -------
(In reply to comment #142)
> some additional comments about the attached kvm-37 ebuild (which has a
> different objective than the one being used here, as it is complimentary to
> qemu instead of conflicting with it, and is not meant to be considered
> "official" but hope at least useful to some of you)
> 
> 1) all the qemu system emulations generated are now named kvm-*
> (kvm-system-i386 and kvm-system-x86_64) instead of qemu-* to prevent conflicts
> and let you use qemu as well for all cases where it is more stable/faster.
> 2) there is no qemu-img so you would need qemu-img from qemu-softmmu to manage
> disk images
> 3) /usr/bin/kvm doesn't work so use kvm-system-* directly after loading the
> right kernel modules, I might fix it as it is a nice wrapper, but for now i'd
> rather keep the dependency list lean
> 4) it requires gcc-3.4 to compile (at least the qemu part of it) and will use
> it directly by name so no need to change your system CC, alsa is optional as
> per the corresponding use flag
> 5) the generated kernel modules will be in /lib/modules/`uname -r`/misc so
> insmod those if you want to use them instead of the ones from your kernel (if
> there is only 1 copy of them modprobe would be probably easier to use and this
> is recommended), remember to insmod kvm.ko fist before your CPU specific module
> (kvm-intel.ko or kvm-amd.ko)
> 
> and some about kvm-37 itself :
> 
> 1) since kvm-36 there is a buggy BIOS included which will break windows 2000
> when using ACPI and windows vista at least (partially reverted in git already)
> and that has broken SMP support, this is not yet fixed upstream and could be
> worked around by using -no-acpi or using qemu's BIOS files in some cases.
> 2) qemu requires gcc 3.4 (at least to compile the dyngen code that it uses for
> emulation), this is still not fixed upstream even if some improvements had been
> done recently to improve the quality of gcc-4 generated code, but is still
> going to mean a performance issue at the least and a source for crashes in the
> most common cases.
> 3) kvm code is IMHO more unstable than qemu and because of the forked status
> might be missing important patches like qemu-0.9.0-atapi-hsm.patch which is
> required for guests using libata, so falling back to qemu using kqemu as a
> speedy replacement if needed is IMHO a must have for any kvm ebuild, and at
> least until kvm finishes merging their modified qemu upstream (it would seem
> that kvm is actually forking more parts of qemu instead at least for now, so
> this could take a while)
> 

Apparently you haven't read all the comments to this bug.  No one is interested
in using gcc-3.4.6 to compile kvm.  By removing qemu-img from the standard kvm
build, you just created a dependency for gcc-3.4.6 because most people are
going to need qemu-img.  Due to the differences of the qemu bundled with kvm, I
wouldn't count on any part of the upstream qemu working with kvm because you
don't necessarily know what they changed and it's too much of a PITA to track
every little change and update a bunch of patches as evidenced above.  This is
also the case with changing the name of the binary.  So kvm should continue to
block qemu until either kvm permanently forks from qemu (doubt it) or the kvm
changes get merged into upstream and in this case, the ebuild will change from
installing a module and userspace tools to just a module.

------- Comment #145 From Mike Arthur 2007-09-11 17:30:15 0000 -------
There is no technical reason why they need to block each other. Your other
comments are fair enough but blocking each other is unnecessary if you just
rename the binaries etc. Ubuntu takes this approach and it works fine.

------- Comment #146 From Richard Simpson 2007-09-12 23:00:37 0000 -------
Can anyone help with this error?

  CC [M]  /var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel/lapic.o
  CC [M]  /var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel/ioapic.o
/var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel/ioapic.c: In function
'ioapic_deliver':
/var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel/ioapic.c:204: error:
'dest_LowestPrio' undeclared (first use in this function)
/var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel/ioapic.c:204: error:
(Each undeclared identifier is reported only once
/var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel/ioapic.c:204: error:
for each function it appears in.)
/var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel/ioapic.c:215: error:
'dest_Fixed' undeclared (first use in this function)
make[2]: ***
[/var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel/ioapic.o] Error 1
make[1]: *** [_module_/var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel]
Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.21-gentoo-r4'
make: *** [all] Error 2

!!! ERROR: app-emulation/kvm-37 failed.
Call stack:
  ebuild.sh, line 1638:   Called dyn_compile
  ebuild.sh, line 985:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  kvm-37.ebuild, line 72:   Called linux-mod_src_compile
  linux-mod.eclass, line 516:   Called die

!!! Unable to make   all.
!!! If you need support, post the topmost build error, and the call stack if
relevant.
!!! A complete build log is located at
'/var/tmp/portage/app-emulation/kvm-37/temp/build.log'.

--------------------------- ACCESS VIOLATION SUMMARY
---------------------------
LOG FILE = "/var/log/sandbox/sandbox-app-emulation_-_kvm-37-27889.log"

open_wr:   /usr/src/linux-2.6.21-gentoo-r4/-.gcda
--------------------------------------------------------------------------------

Thanks

------- Comment #147 From Carlo Marcelo Arenas Belon 2007-09-19 11:23:32 0000 -------
(In reply to comment #146)
> Can anyone help with this error?
> 
>   CC [M]  /var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel/lapic.o
>   CC [M]  /var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel/ioapic.o
> /var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel/ioapic.c: In function
> 'ioapic_deliver':
> /var/tmp/portage/app-emulation/kvm-37/work/kvm-37/kernel/ioapic.c:204: error:
> 'dest_LowestPrio' undeclared (first use in this function)

your kernel (if using x86 at least) should be built with CONFIG_X86_IO_APIC=yes
and CONFIG_SMP=yes

or apply the following patch (included in kvm-41)

http://git.kernel.org/?p=linux/kernel/git/avi/kvm.git;a=commitdiff;h=1196dd4e2e6f09053335b0a91e3cc793808c00a7

------- Comment #148 From Carlo Marcelo Arenas Belon 2007-09-19 15:04:21 0000 -------
Created an attachment (id=131298) [details]
an ebuild for kvm-41 (evolved from the unofficial kvm-37)

to install and download all related files (including this ebuild) you can use
layman :

  layman -f -o http://tapir.sajinet.com.pe/gentoo/layman.xml -a sajinet
  emerge -DNvu kvm

if you don't have layman or would rather get the files the old fashioned way
they are all available from :

  http://www.sajinet.com.pe/gentoo/portage/app-emulation/kvm/files/

you'll need to have gcc-3 installed to build the qemu part of it, but if you
don't really want to emerge =sys-devel/gcc-3.4.6-r2 (there is no need to change
the system gcc) there are also binary packages available from :

  http://www.sajinet.com.pe/gentoo/packages/

------- Comment #149 From Carlo Marcelo Arenas Belon 2007-09-19 15:37:37 0000 -------
(In reply to comment #148)
> Created an attachment (id=131298) [edit] [details]

and some comments on the ebuild :

1) the qemu system binary has been renamed as kvm-system-x86_64 so that it
won't conflict with qemu's; qemu-img will be installed as part of this package
or not depending on the USE='qemu' flag and will block or depend on
qemu-softmmu as required.
2) the /usr/bin/kvm wrapper has been fixed so you can use it to load your
modules and start your VM in some simple cases but it was never meant to be
used out of a developer environment and therefore has very rough edges.  use
the kvm-system-x86_64 directly better and ensure your modules and other system
emulation requirements (like bridges) are covered through gentoo native tools
as suggested by upstream (who might even remove it in future versions)
3) the USE='kvm' flag lets you use the external module (recommended) or the one
provided with your own kernel (it will only work for kernel 2.6.22 or higher)

and some comments in the kvm-41 release :

1) most of the problems with the BIOS has been fixed, so SMP should work better
now, but if you get problems use -no-acpi or -no-kvm-irqchip to disable ACPI or
APIC kvm emulated implementations
2) problems with the APIC could result in lost interrupts or crashes, so
consider -no-kvm-irqchip your friend until the APIC issues get sorted out; for
linux guests the use of the "nolapic" boot parameter can help as well.
3) expect frequent releases and updates (which is why i recommended to use the
overlay so you can be also in the bleeding edge), if all you want is stability
kvm-36 is probably your best bet as well as keeping away from SMP guests.

------- Comment #150 From Torsten Grote 2007-10-02 09:37:57 0000 -------
paludis complains over the kvm-41 ebuild, that is has no whitespace after '('
and before ')' in the DEPEND String.

------- Comment #151 From Sander Sweers 2007-10-02 11:04:24 0000 -------
Created an attachment (id=132381) [details]
kvm-45-qemu-configure.patch

new configure patch

------- Comment #152 From Sander Sweers 2007-10-02 11:05:18 0000 -------
Created an attachment (id=132382) [details]
kvm-45-qemu-no-img.patch

updated qemu-no-img patch

------- Comment #153 From Sander Sweers 2007-10-02 11:06:56 0000 -------
I just posted 2 new patches for kvm-45 which synced with qemu cvs. The ide
patch is not needed anymore as it was already fixed in the cvs snapshot.

------- Comment #154 From Mike Arthur 2007-10-02 12:10:39 0000 -------
(In reply to comment #153)
> I just posted 2 new patches for kvm-45 which synced with qemu cvs. The ide
> patch is not needed anymore as it was already fixed in the cvs snapshot.
Which ebuild is this for?
It isn't clear...

------- Comment #155 From Sander Sweers 2007-10-02 12:17:58 0000 -------
(In reply to comment #154)
> Which ebuild is this for?
> It isn't clear...

No ebuild as this does not require major changing. The 2 patches replace the
old ones.
kvm-36-qemu-split.patch -> kvm-45-qemu-configure.patch
kvm-36-qemu-no-img.patch -> kvm-45-qemu-no-img.patch

------- Comment #156 From Mike Arthur 2007-10-02 12:28:59 0000 -------
Sorry, I still don't understand. There are (at least) 2 sets of ebuilds in this
bug, from Carlos and Matthew. I can't see kvm-36-* in this bug at all.

------- Comment #157 From Sander Sweers 2007-10-02 13:05:52 0000 -------
(In reply to comment #156)
> Sorry, I still don't understand. There are (at least) 2 sets of ebuilds in 
> this bug, from Carlos and Matthew. I can't see kvm-36-* in this bug at all.

Use either one I don't care and it also does not matter. If you had bothered to
look at the actual patches you would know what they are for and which they
replace. Anyway, I got the naming from the kvm-41 ebuild Carlos posted (Which
you obviously have not looked at either).

All the <whatever version>-no-img and <whatever version>-doc/-configure/-split
patches dot not work on kvm-45 for the reason I already explained.

so:
<whatever version>-no-img.patch -> kvm-45-qemu-no-img.patch
<whatever version>-doc/-configure/-split.patch -> kvm-45-qemu-configure.patch

There is absolutely no sane reason for posting yet another complete new ebuild
just because 2 patches needed updating and 1 had to be removed.

------- Comment #158 From Matthew Schultz 2007-10-02 20:59:38 0000 -------
Created an attachment (id=132422) [details]
kvm-45.ebuild

I'm taking an even more minimalist approach here by patching less and not
renaming anything.  This will block qemu but then again, if you're using kvm,
why would you want to use qemu?  The only patching that is involved now is to
remove the ability to disable kvm (kvm-kvm.patch).  I'm not sure why anyone
would want to install kvm and not use it.  It won't work when it's disabled
anyway.   The scripts-qemu-ifup.patch is something I wrote a while back to fix
their broken interface script.  You need to have a bridge interface set up for
this.  I'm providing and updated ebuild without the former patches for you lazy
ones who don't want to edit files. ;-)

------- Comment #159 From Sander Sweers 2007-10-02 21:36:07 0000 -------
(In reply to comment #158)
> I'm taking an even more minimalist approach here by patching less and not
> renaming anything.  This will block qemu but then again, if you're using kvm,
> why would you want to use qemu?

qemu has more options and features than kvm uses/enables. Plus we do not know
if the kvm changes to qemu will break qemu in some weird and wonderfull way ;-) 

> I'm not sure why anyone would want to install kvm and not use it.  It won't 
> work when it's disabled

Because some will only want the userland tools as they use the in kernel
version of kvm.

------- Comment #160 From Fortunato Ventre 2007-10-03 19:34:41 0000 -------
i'm trieing to get both of your approaches merged in one ebuild only, just
adding some USE flags.

It's rude for now, but it's usefull to know if this is an acceptable way to
install kvm.

Please let me know what you think about it :-)

------- Comment #161 From Fortunato Ventre 2007-10-03 19:38:25 0000 -------
Created an attachment (id=132486) [details]
kvm-45.ebuild with both approaches in

------- Comment #162 From Carlo Marcelo Arenas Belon 2007-10-07 09:03:40 0000 -------
(In reply to comment #153)
> I just posted 2 new patches for kvm-45 which synced with qemu cvs. The ide
> patch is not needed anymore as it was already fixed in the cvs snapshot.
> 
thanks Sanders, uploaded both to the overlay (had to change 1 line in
kvm-45-qemu-no-img.patch though as there was a missing closing parenthesis that
was making the tarbin target).

the ide-cd patch was dropped in kvm-44 (an ebuild available in the overlay)
when the patch was backported from qemu CVS and re-imported as shown by :

http://git.kernel.org/?p=virt/kvm/kvm-userspace.git;a=commitdiff;h=667f2deff8cea6327f0c832afea2f4952b8f199e

Carlo (without "S")

------- Comment #163 From Carlo Marcelo Arenas Belon 2007-10-07 22:02:49 0000 -------
Created an attachment (id=132866) [details]
ebuild for kvm-45 with qemu compatibility

tested in ~amd64 and ~x86 and adding the following changes :

* the qemu provided binary is now named kvm (regardless of architecture) to
prevent conflicts with qemu and to follow debian's naming and avoid unneeded
confusion (plus help retiring the wrapper).
* the kvm wrapper and kvm_stat script is now installed in /etc/kvm/utils (as
done in debian) and eventhough kvm was fixed to work its use is discouraged
(upstream never intended for it to be used in production)
* avoid conflicts with kernel-headers (reported in comment #117)
* fixes to /etc/kvm/qemu-ifup and /etc/kvm/utils/kvm to allow for setting up a
bridge (reported in comment #118 to comment #120 and other)
* add spaces to DEPEND to avoid paludis problem (reported in comment #150)
* using rebased patches for kvm-45 from Sander (reported in comment #153)

------- Comment #164 From Carlo Marcelo Arenas Belon 2007-10-08 10:02:49 0000 -------
(In reply to comment #160)
> i'm trieing to get both of your approaches merged in one ebuild only, just
> adding some USE flags.

the compatible with qemu ebuild was based on the one from Matthew but just
trying to wrap some of the alternatives with USE flags as you suggested, with
the only one left to be support for gcc4 (which was just added to kvm-45-r1.

> It's rude for now, but it's usefull to know if this is an acceptable way to
> install kvm.

from what I remember on gentoo ebuild policy, you can't depend on a gcc version
(no idea why though since it definitely makes more sense that way) but the only
options is "autodetect" (which is frowned upon as you can see in qemu's ebuild)
or abort and force you to change your system CC (which is IMHO even worst and
very difficult to do for kvm)

------- Comment #165 From Carlo Marcelo Arenas Belon 2007-10-08 10:21:41 0000 -------
Created an attachment (id=132899) [details]
kvm-45-r1.ebuild

the following changes :

* added USE="gcc4" to use gcc4 when gcc3 can't be installed (use of gcc3 is
recommended)
* general cleanup

as usual, the ebuild and all dependent patches available from the overlay

------- Comment #166 From Fortunato Ventre 2007-10-08 17:44:27 0000 -------
(In reply to comment #164)
>
> from what I remember on gentoo ebuild policy, you can't depend on a gcc version
> (no idea why though since it definitely makes more sense that way) but the only
> options is "autodetect" (which is frowned upon as you can see in qemu's ebuild)
> or abort and force you to change your system CC (which is IMHO even worst and
> very difficult to do for kvm)
> 

Sorry, i didnt know about that policy restriction.

Anyway, i think your last ebuild is the best approach for giving choices to
final users about all of the aspects of the installation.
I've just added your overlay to my favourite ones list ;-)

------- Comment #167 From Jakub Moc (RETIRED) 2007-10-08 20:25:41 0000 -------
(In reply to comment #166)
> Sorry, i didnt know about that policy restriction.

That's not a policy restriction; that's a pure and simple fact that depending
on some gcc version will NOT make sure that you are actually using it. The only
'policy' thing here is that you won't switch gcc version on unsuspecting users
in ebuilds via gcc-config or whatnot...

------- Comment #168 From Fortunato Ventre 2007-10-08 22:00:02 0000 -------
Ok, i've got the point :-)

But in this specific case we only need to be sure that gcc3 is emerged, we
don't switch to it in a "subtle way" on unsuspecting users...

Anyway, it may be even better to force this ebuild to compile with gcc4, while
continuing to preserve the compatibility with the qemu ebuild... in this way we
can have both installed at the same time (tbh, i don't understand why to use
this ebuild without really using kvm... qemu is a better choice for that)

------- Comment #169 From Carlo Marcelo Arenas Belon 2007-10-11 16:34:35 0000 -------
Created an attachment (id=133157) [details]
updated kvm (python wrapper) patch for kvm 46

the default disk size is now defined to be 30GB instead of 10GB upstream so old
patch will conflict.  use of kvm (python wrapper) is discouraged though

------- Comment #170 From Carlo Marcelo Arenas Belon 2007-10-15 07:57:43 0000 -------
Created an attachment (id=133510) [details]
ebuild for kvm 46

with the following changes :

* added USE="gnutls" and corresponding dependency if qemu is to be compiled
with support for TLS enabled VNC connections (as supported by the qemu version
included since kvm-45)
* removed dependency to >=sys-fs/e2fsprogs-1.39 which was obsoleted since
>=app-emulation/kvm-29
* added build dependency for =sys-devel/gcc-3.4.6 which is stable in both amd64
and x86 if USE!="gcc4" and that is the recommended and supported compiler for
qemu (suggested in comment #161 and confirmed valid in comment #167).  ebuild
with autodetect it and use it once it is available to build qemu.

------- Comment #171 From Carlo Marcelo Arenas Belon 2007-10-15 08:21:44 0000 -------
Created an attachment (id=133515) [details]
ebuild for kvm 46

replaced the original ebuild uploaded which should had add a dependency to
gcc-3.4.6-r2 instead of gcc-3.4.6 and which was used to test it for "amd64" and
"x86".

all supporting patches and this ebuild available as usual from the overlay

------- Comment #172 From Julien Cassette 2007-10-15 20:09:16 0000 -------
I don't understand how this ebuild works any more.
Should we use the kernel drivers or the ebuild's one?
Why it does need gcc-3 whereas a previous version compiles with gcc-4?
Please help me ;(

------- Comment #173 From Fortunato Ventre 2007-10-15 20:25:52 0000 -------
imho, using the ebuild's kernel modules is a better choice because you'll be
sure that you'll have no compatibility problems between kernel modules and
userspace utilities.
Compiling with gcc3 gives you the ability to run kvm without kvm kernel
modules; gcc4 compiled kvm can only work with kernel modules (imho, this is the
more logical choice).
Anyway, just set use flags for your needs.

Thanks again to Carlo Marcelo Arenas Belon for this ebuild, keep this good work
up! :-)

------- Comment #174 From Carlo Marcelo Arenas Belon 2007-10-19 04:20:52 0000 -------
Created an attachment (id=133859) [details]
ebuild for kvm 48

tested in ~amd64 and ~x86.

important changes :

* removed use alsa and gnutls patches (merged upstream)
* add USE="sdl" to enable SDL support (used to be there by default)

all patches and this ebuild (as well as one for kvm-47) available from the
overlay.

a description of all USE flags follows (recommended flags marked with +) :

 - - alsa         : Adds support for media-libs/alsa-lib (Advanced Linux Sound
Architecture)
 - - gcc4         : Add support for gcc 4
 - - gnutls       : Adds support for net-libs/gnutls
 + + kvm          : Enables the kernel module
 + + qemu         : Use QEMU's qemu-img
 + + sdl          : Adds support for Simple Direct Layer (media library)

------- Comment #175 From Carlo Marcelo Arenas Belon 2007-10-19 16:16:04 0000 -------
(In reply to comment #172)
> I don't understand how this ebuild works any more.

Hopefully the following documentation could help you in this case :

  http://gentoo-wiki.com/HOWTO_KVM

> Should we use the kernel drivers or the ebuild's one?
> Why it does need gcc-3 whereas a previous version compiles with gcc-4?

It depends of what your environment is like, but if you are using gentoo stable
(amd64 or x86) on your workstation with a gentoo-sources kernel then what I'd
found that fits me better is: "kvm qemu sdl"

------- Comment #176 From Guido Imperiale 2007-11-21 04:56:50 0000 -------
I'm building kvm-53 with a renamed kvm-48 ebuild but
kvm-45-user-no-kernel.patch doesn't apply any more, so I get this collision:

/usr/include/linux/kvm.h

------- Comment #177 From Carlo Marcelo Arenas Belon 2007-11-21 08:00:22 0000 -------
(In reply to comment #176)
> I'm building kvm-53 with a renamed kvm-48 ebuild

there are actually tested and complete ebuilds for kvm up to 53 in the overlay,
but I haven't been posting them here as there had been quite a number of
changes in the codebase and the ebuilds themselves as patches had been
adjusting and being upstreamed.

------- Comment #178 From Chris Slycord 2007-11-25 21:03:03 0000 -------
(In reply to comment #174)
> Created an attachment (id=133859) [edit] [details]
> ebuild for kvm 48
> 
> tested in ~amd64 and ~x86.
> 
> important changes :
> 
> * removed use alsa and gnutls patches (merged upstream)
> * add USE="sdl" to enable SDL support (used to be there by default)
> 
> all patches and this ebuild (as well as one for kvm-47) available from the
> overlay.
> 
> a description of all USE flags follows (recommended flags marked with +) :
> 
>  - - alsa         : Adds support for media-libs/alsa-lib (Advanced Linux Sound
> Architecture)
>  - - gcc4         : Add support for gcc 4
>  - - gnutls       : Adds support for net-libs/gnutls
>  + + kvm          : Enables the kernel module
>  + + qemu         : Use QEMU's qemu-img
>  + + sdl          : Adds support for Simple Direct Layer (media library)
> 

With !gcc4 it depends on "=sys-devel/gcc-3.4.6-r2".

Shouldn't it instead depend on "<sys-devel/gcc-4"? 

------- Comment #179 From Carlo Marcelo Arenas Belon 2007-11-28 02:32:10 0000 -------
(In reply to comment #178)
> (In reply to comment #174)
> >  - - gcc4         : Add support for gcc 4
> 
> With !gcc4 it depends on "=sys-devel/gcc-3.4.6-r2".

yes, because that compiler has been validated to work in both x86 and amd64
with the imported qemu.

> Shouldn't it instead depend on "<sys-devel/gcc-4"? 

ideally, but qemu doesn't work with all compilers that match that criteria and
since the ebuild isn't changing the default gcc you are using but using one
directly by name, it needs to know what name to look for specifically, hence
why it is just easier to depend on 1 specific version of gcc which is known to
work in all cases and that we know the name for which can be hardcoded in the
ebuild.

------- Comment #180 From Carlo Marcelo Arenas Belon 2007-11-28 02:45:04 0000 -------
Created an attachment (id=137185) [details]
ebuild for kvm-54

as usual the ebuild and all supporting patches available from the overlay which
also now includes a Changelog starting from kvm-50 and which hopefully would
help tracking and documenting all required patches as they are being upstreamed

------- Comment #181 From Manfred Knick 2007-11-29 18:51:28 0000 -------
(In reply to comment #180)

> as usual the ebuild and all supporting patches available from the overlay 

Could you please be so kind to point to it's URL / where to get it from ?

Thank you!


------- Comment #182 From Carlo Marcelo Arenas Belon 2007-11-29 23:27:58 0000 -------
(In reply to comment #181)
> (In reply to comment #180)
> 
> > as usual the ebuild and all supporting patches available from the overlay 
> 
> Could you please be so kind to point to it's URL / where to get it from ?

sorry, I thought not to be repeating myself and get everyone bored everytime
with the same explanation which was originally posted in comment 148.

in any case, if you want some more documentation about the ebuild head to :

  http://gentoo-wiki.com/HOWTO_KVM

if you want to get the ebuild and patches using http go to :

  http://www.sajinet.com.pe/gentoo/portage/app-emulation/kvm/

I would recommend though installing the overlay and syncing it periodically, as
KVM releases are frequent (indeed there were 2 more just yesterdays with
important fixes if running OpenSolaris or FreeBSD guests)

Carlo

------- Comment #183 From Manfred Knick 2007-11-30 10:00:57 0000 -------
Thank you so much!
Sorry; I had searched all these pages for "overlay" but not for "layman" too.

------- Comment #184 From Carlo Marcelo Arenas Belon 2007-12-04 19:27:17 0000 -------
Created an attachment (id=137723) [details]
ebuild for kvm 55

ebuild for kvm-55 :

* removes unused BLOBs and adds USE="bios" for rebuilding your BIOS (not
recommended)

as for kvm-55 :

* lots of fixes to regressions in different guest OS and stabilization work
from the new BIOS and in kernel APIC and IMHO one of the most stable releases
since kvm-36

------- Comment #185 From Tim Dodge 2007-12-06 12:31:01 0000 -------
I've noticed that modules are being built for the currently running kernel,
rather than the kernel pointed to by /usr/src/linux.

I think that something like "--kerneldir=$KV_DIR" should be added to conf_opts.

(Thanks for the overlay, BTW!)

------- Comment #186 From Carlo Marcelo Arenas Belon 2007-12-07 06:05:19 0000 -------
(In reply to comment #185)
> I've noticed that modules are being built for the currently running kernel,
> rather than the kernel pointed to by /usr/src/linux.
> 
> I think that something like "--kerneldir=$KV_DIR" should be added to conf_opts.

yes, tested kvm-55-r2.ebuild with a fix and uploaded it to the overlay.

> (Thanks for the overlay, BTW!)

thanks for helping on making it better for everyone.

------- Comment #187 From Carlo Marcelo Arenas Belon 2007-12-07 06:10:04 0000 -------
Created an attachment (id=137946) [details]
ebuild for kvm 55

updated ebuild for kvm-55 :

* adds a configuration flag to report where is the kernel located as reported
by gentoo's kernel eclass so it uses the eselected kernel instead of trying to
guess for a valid one (reported in comment 185)

------- Comment #188 From Markus Rothe 2007-12-17 16:14:44 0000 -------
A few comments on your ebuild:

- I see that there are dozens of patches. Have those been sent to the kvm
developers?

- you can check if you are using gcc4 with the following command (taken from
qemu ebuild):

if [ "$(gcc-major-version)" == "4" ]; then ...

This makes the gcc4 useflag useless.

- does econf not work? If not then document in the ebuild that it's not
working.

- take a look at use_enable. this avoids constructs like "if ! use gnutls; then
conf_opts="$conf_opts --disable-vnc-tls"; fi"

- *maybe* it's better to use 'module' instead of 'kvm' to build the kernel
modules? It might be easier to understand for our users.

- I think that ebuilds shouldn't set the compiler (i.e. do not set a vanilla
compiler when the compiler is hardened). Just error out and let the user know
why it's failing.

- the install path for ${S}/kvm and ${S}/kvm_stat looks strange
(/etc/kvm/utils/). Should these belong there?

Thanks for the work you have put into this ebuild.

------- Comment #189 From Carlo Marcelo Arenas Belon 2007-12-26 03:55:34 0000 -------
(In reply to comment #188)
> - I see that there are dozens of patches. Have those been sent to the kvm
> developers?

yes

> - you can check if you are using gcc4 with the following command (taken from
> qemu ebuild):
> 
> if [ "$(gcc-major-version)" == "4" ]; then ...
> 
> This makes the gcc4 useflag useless.

no, the gcc4 useflag is to tell the ebuild that you really want to use gcc4 to
build kvm/qemu and so it does in a way that is consistent with what upstream
will expect of qemu when compiled with gcc4 and gives you a more or less stable
environment.

I personally think that trying to force the use of gcc4 has no real value as
gentoo gives you the flexibility to have gcc-3.x installed in a very simple way
and like no other distribution (ask anyone using SuSE), but is there for anyone
that would want that and understands the consequences.

> - does econf not work? If not then document in the ebuild that it's not
> working.

kvm and qemu's configure are not generated from autotools, so econf is not the
right way to manage them and adds no value.

> - take a look at use_enable. this avoids constructs like "if ! use gnutls; then
> conf_opts="$conf_opts --disable-vnc-tls"; fi"

use_enable won't work because configure doesn't have both --disable and
--enable flags for each option as it doesn't come from autoconf.

qemu's ebuild will break in the next release because of that if that is what
you are looking as a reference. 

> - *maybe* it's better to use 'module' instead of 'kvm' to build the kernel
> modules? It might be easier to understand for our users.

when trying to find a suitable USE flag, I looked at the full list from the
ones available in the global use.desc and the ones from use.local.desc
(including several overlays) and couldn't find one that was clearly defined to
mean "kernel module" so I assumed that using "kvm" would be OK and descriptive
enough as kqemu uses "kqemu".

if you have any better option, please provide some references with your
argument to why that would be better, but to help with the current use flags
defined I provide a use.local.desc with the overlay which will be of use if it
weren't for bug 138622 which has a patch for equery but no one looking at it
from gentoo's development team.

> - I think that ebuilds shouldn't set the compiler (i.e. do not set a vanilla
> compiler when the compiler is hardened). Just error out and let the user know
> why it's failing.

the hardened correction is yet incomplete as it doesn't cover all angles and
requires more testing but is useful as it is now (validated in amd64) and is
technically the same logic as used by --filter-flags when some compiler options
are not supported, but including the changes that are required in the compiler
setup; with an ebuild version of the proposal in bug 166392 (for a more
complete setup look at the qemu ebuilds provided in the overlay)

it is important to note that since the compiler is being autodetected in most
cases, it is not possible (or simple) for the user to change that setup without
having to eselect a different system kernel to begin with, and therefore that
is better avoided as it is fragile and prone to human error.

> - the install path for ${S}/kvm and ${S}/kvm_stat looks strange
> (/etc/kvm/utils/). Should these belong there?

/etc/kvm/kvm is an script that is used upstream for testing and was never meant
to be used in production or even get installed but sadly the first ebuild that
was published here used it, so it was kept there for backward compatibility and
following the filesystem layout that debian uses (they made the same mistake).

kvm_stat is a helper script which should be instead on /usr/bin or be thrown
away (which is basically what going temporarily to /etc/kvm/utils/ unless
someone using it complained was meant to do).

since this probably qualifies as a complain will move them around, but I really
suspect that no one is really using them

------- Comment #190 From Carlo Marcelo Arenas Belon 2007-12-26 04:11:22 0000 -------
Created an attachment (id=139324) [details]
ebuild for kvm 57

includes :

* backward compatibility fixes for old kernels and non-smp configurations
* some logic to try to prevent failed builds if using a hardened compiler (not
supported upstream)
* overall ebuild cleanup

beware that kvm-57 includes a new version of qemu and is more likely to have
problems than previous versions because of that, so if you don't want to risk
your virtual machines to the bleeding edge use kvm-56-r1 instead.

kvm-58 will most likely include initial support for ia64, so if you have some
of that hardware and are willing to do some testing for the greater good this
will be your once on a life opportunity to do so

------- Comment #191 From Carlo Marcelo Arenas Belon 2007-12-28 08:48:03 0000 -------
Created an attachment (id=139488) [details]
ebuild for kvm 58

includes:

* initial support for USE="test"
* masked keyword for ia64 (not tested yet)

------- Comment #192 From Danny Brain 2008-01-08 10:12:39 0000 -------
(In reply to comment #191)
> Created an attachment (id=139488) [edit] [details]
> ebuild for kvm 58
> 
> includes:
> 
> * initial support for USE="test"
> * masked keyword for ia64 (not tested yet)
> 

Could you please attach the patches this ebuild requires? Thanks :)

------- Comment #193 From Carlo Marcelo Arenas Belon 2008-01-14 04:23:39 0000 -------
Created an attachment (id=140913) [details]
ebuild for kvm 59

Important changes :

* Moved kvm_stat to /usr/bin, and discarded the python kvm wrapper that used to
be in /etc/kvm/utils/kvm
* A more complete workaround for hardened toolchain

------- Comment #194 From Carlo Marcelo Arenas Belon 2008-01-14 04:45:16 0000 -------
(In reply to comment #192)
>
> Could you please attach the patches this ebuild requires? Thanks :)

The last ebuild has 18 patches, and there had been some ebuilds with up to 23
of them.

The patch list changes frequently and gets adapted as they are slowly
upstreamed and new releases require new ones or rebased patches in some cases,
so uploading them all in this ticket and keeping the ticket updated in each
release will require too many ticket updates with will spam the long list that
is CC here.

KVM does releases frequently and if you look at the Changelog you are going to
see that the ebuild and patches could change daily as well (I indeed don't
upload all ebuilds but only the important ones, and sometimes forget to update
the ChangeLog when doing updates that don't require a version bump), which is
why I suggested using the overlay instead which will usually have the day of
the upstream release a masked ebuild and will have its patch list adapted and
stabilized from there as the new package is tested.

If you want to get the files through http you can also use the http interface
for the overlay with the files located in :

  http://tapir.sajinet.com.pe/gentoo/portage/app-emulation/kvm/files/

And if you feel so strongly about having them attached into this ticket then
feel free to upload them as well

------- Comment #195 From Cristi Magherusan 2008-04-10 00:42:29 0000 -------
any news about the inclusion into the portage tree?

------- Comment #196 From Enrico 'nekrad' Weigelt 2008-05-07 18:13:30 0000 -------
At my site it hangs the whole machine on booting :(
(tested w/ win2k and plan9)

------- Comment #197 From Matthias Langer 2008-05-14 01:57:06 0000 -------
Well, this stuff seems to work very well for me; i've just installed 

app-emulation/kvm-68  USE="alsa gcc4 ncurses sdl -bios -gnutls -kvm -qemu
-test"

and was able to setup win-xp on top of linux with it. Thanks a lot Carlo!

Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0,
2.6.24-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r7 x86_64 Intel(R) Core(TM)2 Duo CPU E6550 @
2.33GHz
Timestamp of tree: Tue, 13 May 2008 08:35:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf
/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c
/etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/var/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict
unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://gd.tuwien.ac.at/opsys/linux/gentoo/
http://mirror.uni-c.dk/pub/gentoo/ http://trumpetti.atm.tut.fi/gentoo/ "
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LINGUAS="en de"
MAKEOPTS="-j3"
PKGDIR="/var/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --stats --timeout=180 --exclude=/distfiles
--exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/portage/repos/gentoo"
PORTDIR_OVERLAY="/var/portage/repos/layman/sajinet /var/portage/repos/private"
SYNC="rsync://192.168.0.1/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acpi alsa amd64 berkdb bzip2 cairo caps cddb
cdparanoia cdr cli cracklib crypt cups dbus djvu dri dvd dvdr dvdread eds
emboss encode evo exif fam ffmpeg firefox flac fortran gd gdbm gif gimp gnome
gnome-keyring gphoto2 gpm gstreamer gtk hal hddtemp iconv icu ipod ipv6 isdnlog
java jpeg jpeg2k lcms ldap libnotify lm_sensors mad matroska midi mikmod mmap
mmx mmxext mono mp3 mpeg mudflap musicbrainz ncurses nls nptl nptlonly nvidia
ogg opengl openmp pam pcre pdf perl plotutils png pppd pulseaudio python
qt3support quicktime readline reflection ruby sdl session spell spl sse sse2
ssl ssse3 svg tcpd tetex theora threads tiff tracker truetype unicode usb vcd
vim-syntax vorbis xattr xine xml xorg xv xvid zlib" ALSA_PCM_PLUGINS="adpcm
alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa
lfloat linear meter mulaw multi null plug rate route share shm softvol"
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm
authn_default authn_file authz_dbm authz_default authz_groupfile authz_host
authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir
disk_cache env expires ext_filter file_cache filter headers include info
log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling
status unique_id userdir usertrack vhost_alias" CAMERAS="canon konica ptp2
kodak" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux"
LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS,
PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #198 From Stan Behrens 2008-05-24 11:25:54 0000 -------
Hi, with the release of kvm-69 it's better to have CONFIG_PREEMPT_NOTIFIERS=y
in kernel-config. This is only possible if you compile the kernel-internal-kvm
as a module or buildin, but if you want to use the external modules the ebuild
won't let you.

dirty fix:
--- kvm-69.ebuild       2008-05-24 13:19:16.000000000 +0200
+++ kvm-69.ebuild.orig  2008-05-23 04:27:05.000000000 +0200
@@ -74,7 +74,7 @@
                if use kvm; then
                        eerror "kvm module can't be used if your kernel is
already"
                        eerror "kvm enabled"
-                       #die "incompatible module configuration, reconfig or
USE='-kvm'"
+                       die "incompatible module configuration, reconfig or
USE='-kvm'"
                else
                        ewarn "using the kernel provided module"
                        ewarn "some features may only be available in newer
releases"

------- Comment #199 From Carlo Marcelo Arenas Belon 2008-05-24 20:01:28 0000 -------
(In reply to comment #198)
> Hi, with the release of kvm-69 it's better to have CONFIG_PREEMPT_NOTIFIERS=y
> in kernel-config. This is only possible if you compile the kernel-internal-kvm
> as a module or buildin,

that is a bug in the kernel because as you said prevent you to have
PREEMPT_NOTIFIERS enabled if using the external module.  the easiest workaround
some distributions have adopted is to patch kvm into the kernel (instead of
using the external module) but that is tricky to do with an unoficial package
;)

> but if you want to use the external modules the ebuild
> won't let you.

it is a protection mechanism to avoid doing exactly that, which will otherwise
result in conflicts resolving all needed symbols in the kernel for KVM.

if you want to use the KVM that comes with your kernel then USE="-kvm" so you
will only compile the userspace application.  if you want to use the last
module then you need to disable KVM in the kernel configuration and USE="kvm".

> dirty fix:

this is just overriding the protection, and if you compiled your kernel with
KVM="y" will leave you with an extra module that can't be used, while if you
use KVM="m" then will leave you with 2 sets of kvm modules (in different
locations) and then force you to insmod the right one by hand (modprobe could
get confused) as there are duplicated symbols that could lead into a broken
kernel if the wrong mix is loaded.

------- Comment #200 From Stan Behrens 2008-05-26 19:30:35 0000 -------
In my opinion, i think you should fix the ebuild, because its not dangerous to
have 2 sets of kvm, because you can't mix the modules (yes i am loading via
insmod)

------- Comment #201 From Daniel Gryniewicz 2008-07-09 13:40:59 0000 -------
KVM is in the tree now.

------- Comment #202 From Carlo Marcelo Arenas Belon 2008-07-12 08:22:03 0000 -------
(In reply to comment #201)
> KVM is in the tree now.

For everyone that was using the unofficial overlay packages and documentation. 
Stop.

I had updated the wiki page in gentoo-wiki to reflect the official package
instead, but I assume it won't be needed in the long run as well as the overlay
since it might seem that now Gentoo got finally a "Virtualization Team" (IMHO:
about time, since even Debian has one already that even got kvm backported
to stable)

Thanks for all great feedback and for making this such a fun ride and for
helping stabilize kvm for the greater good.

Be careful with KVM-70 as that is the first ever KVM release that has no more a
dependency in the old gcc and is therefore rough in the edges (which is why I
never felt like unleashing since its Jun 18 release and it will never be) but
be also confident that whatever problems you might find will be promptly
resolved.

So long and thank for all the fish

------- Comment #203 From Arsen Shnurkov 2008-09-17 16:18:36 0000 -------
Where I can find /etc/init.d/kvmd script ?

------- Comment #204 From Stan Behrens 2008-09-17 17:53:05 0000 -------
Nowhere, just add kvm-intel or kvm-amd to /etc/modules.autoload.d/kernel-2.6 if
you build them as modules and run your virtual machines with /usr/bin/kvm.

First Last Prev Next    No search results available      Search page      Enter new bug