From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0iJ6-0000Hq-Cx for qemu-devel@nongnu.org; Thu, 13 Nov 2008 14:56:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0iJ5-0000HF-8A for qemu-devel@nongnu.org; Thu, 13 Nov 2008 14:56:48 -0500 Received: from [199.232.76.173] (port=33316 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0iJ5-0000H8-2B for qemu-devel@nongnu.org; Thu, 13 Nov 2008 14:56:47 -0500 Received: from yw-out-1718.google.com ([74.125.46.152]:7950) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L0iJ4-0000dp-P6 for qemu-devel@nongnu.org; Thu, 13 Nov 2008 14:56:46 -0500 Received: by yw-out-1718.google.com with SMTP id 6so453100ywa.82 for ; Thu, 13 Nov 2008 11:56:45 -0800 (PST) Message-ID: <491C8679.2080507@codemonkey.ws> Date: Thu, 13 Nov 2008 13:56:41 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [5627] Add KVM support to QEMU References: <20081112104215.GA11733@lst.de> In-Reply-To: <20081112104215.GA11733@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Christoph Hellwig 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 <> +#include >> +#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 >> +#endif >> > > The 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 > >