|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [5627] Add KVM support to QEMU |
Date: | Thu, 13 Nov 2008 13:56:41 -0600 |
User-agent: | Thunderbird 2.0.0.17 (X11/20080925) |
Christoph Hellwig wrote:
On Wed, Nov 05, 2008 at 04:04:33PM +0000, Anthony Liguori wrote:+# kvm probe +if test "$kvm" = "yes" ; then + cat > $TMPC <<EOF +#include <linux/kvm.h> +#if !defined(KVM_API_VERSION) || \ + KVM_API_VERSION < 12 || \ + KVM_API_VERSION > 12 || \ + !defined(KVM_CAP_USER_MEMORY) || \ + !defined(KVM_CAP_SET_TSS_ADDR) +#error Invalid KVM version +#endifThe installed linux/kvm.h has no relatation at all to the currently running kernel. Please ship a current max API version kvm.h with qemu and always build against that one, and handle lower API versions at runtime. Please don't turn mainline qemu kvm support into the same bloody mess as the kvm userspace repository.
There are multiple places in QEMU that depend on kernel headers. I don't want to stick kvm headers in QEMU while depending on external headers for USB pass through. If someone wants to put together a patch to make QEMU no longer depend on external headers, I'd happily review/apply it. I expect it to be tested on various kernel versions though. Some less than wonderful kernel subsystems have not always been good about making interface changes backwards compatible. linux-aio is a good example of an interface that makes it exceedingly difficult to detect whether a new feature is supported on any given kernel version without doing a compile test.
Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |