Anything and everything.
Xen and the Art of Patience
I’ve spent the better part of two days trying to get Xen working properly. It’s been a frustrating exercise in futility. I’ve tried the official 4.0.1 tarball as well as unstable and testing checked out via Mercurial.
Every time I try to build Xen, it barfs part-way through with the following:
... make: Entering directory `/usr/src/xen/xen-4.0-testing.hg/tools/ioemu-remote/i386-dm' CC i386-dm/kvm.o /usr/src/xen/xen-4.0-testing.hg/tools/ioemu-dir/target-i386/kvm.c: In function 'kvm_arch_init_vcpu': /usr/src/xen/xen-4.0-testing.hg/tools/ioemu-dir/target-i386/kvm.c:47:5: warning: implicit declaration of function 'cpu_x86_cpuid' /usr/src/xen/xen-4.0-testing.hg/tools/ioemu-dir/target-i386/kvm.c: In function 'kvm_has_msr_star': /usr/src/xen/xen-4.0-testing.hg/tools/ioemu-dir/target-i386/kvm.c:159:49: error: 'MSR_STAR' undeclared (first use in this function) /usr/src/xen/xen-4.0-testing.hg/tools/ioemu-dir/target-i386/kvm.c:159:49: note: each undeclared identifier is reported only once for each function it appears in /usr/src/xen/xen-4.0-testing.hg/tools/ioemu-dir/target-i386/kvm.c: In function 'set_seg': /usr/src/xen/xen-4.0-testing.hg/tools/ioemu-dir/target-i386/kvm.c:219:27: error: 'DESC_TYPE_SHIFT' undeclared (first use in this function) /usr/src/xen/xen-4.0-testing.hg/tools/ioemu-dir/target-i386/kvm.c:220:29: error: 'DESC_P_MASK' undeclared (first use in this function) /usr/src/xen/xen-4.0-testing.hg/tools/ioemu-dir/target-i386/kvm.c:222:25: error: 'DESC_B_SHIFT' undeclared (first use in this function) /usr/src/xen/xen-4.0-testing.hg/tools/ioemu-dir/target-i386/kvm.c:223:23: error: 'DESC_S_MASK' undeclared (first use in this function) /usr/src/xen/xen-4.0-testing.hg/tools/ioemu-dir/target-i386/kvm.c:224:24: error: 'DESC_L_SHIFT' undeclared (first use in this function) /usr/src/xen/xen-4.0-testing.hg/tools/ioemu-dir/target-i386/kvm.c:225:23: error: 'DESC_G_MASK' undeclared (first use in this function) ...
Using Google to try to figure out what’s screwed is equally frustrating. The only “answer” I’ve managed to find are that Xen is attempting to include something that really shouldn’t be included any more.
I think the bug is that the Xen build system is failing to disable KVM support in ioemu. There is no point in that support and it will only cause trouble. If you look at "xen-setup" in the qemu tree you'll probably find that you can just add --disable-xen to the configure line. If that works please send us a patch :-).
(The suggestion to add –disable-xen didn’t help).
I know how frustrating it is to find references to the specific issue I’m having, but being unable to find a working solution or even reasonable explanation. So if you’re having this problem, I’ll save you some time and tell you now I spent two days looking for a fix, and didn’t find squat.