From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: [PATCH] KVM on VMI Date: Wed, 09 Jul 2008 09:57:55 +0200 Message-ID: <48746F83.2020702@suse.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090404000600090309040800" To: kvm@vger.kernel.org Return-path: Received: from mx2.suse.de ([195.135.220.15]:45869 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752314AbYGIItb (ORCPT ); Wed, 9 Jul 2008 04:49:31 -0400 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 8C07844F9C for ; Wed, 9 Jul 2008 10:49:30 +0200 (CEST) Sender: kvm-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------090404000600090309040800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I more or less accidently stumbled across a problem when compiling KVM on the VMI-enabled kernel. Even though that's pretty much useless right now, I think there might be a day, VMware will emulate VM extensions, in VMs, so we should probably not keep KVM from running under VMI. The problem is that usually load_ldt is #defined, while in VMI it's a static void function. This clashes with the way KVM detects if load_ldt is defined already. To circumvent this, I just extended the check so we're not redefining load_ldt when VMI is activated. Signed-off-by: Alexander Graf --------------090404000600090309040800 Content-Type: text/x-patch; name="kvm-vmi.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="kvm-vmi.patch" --- kernel/include/asm-x86/kvm_host.h 2008-07-09 08:02:20.000000000 +0000 +++ kernel/include/asm-x86/kvm_host.h 2008-07-09 08:02:58.000000000 +0000 @@ -597,7 +597,7 @@ asm("mov %0, %%gs" : : "rm"(sel)); } -#ifndef load_ldt +#if !(defined(load_ldt) || defined(CONFIG_X86_VMI)) static inline void load_ldt(u16 sel) { asm("lldt %0" : : "rm"(sel)); --------------090404000600090309040800--