public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM on VMI
@ 2008-07-09  7:57 Alexander Graf
  2008-07-10 13:55 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Graf @ 2008-07-09  7:57 UTC (permalink / raw)
  To: kvm

[-- Attachment #1: Type: text/plain, Size: 605 bytes --]

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 <agraf@suse.de>



[-- Attachment #2: kvm-vmi.patch --]
[-- Type: text/x-patch, Size: 354 bytes --]

--- 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));

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] KVM on VMI
  2008-07-09  7:57 [PATCH] KVM on VMI Alexander Graf
@ 2008-07-10 13:55 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-07-10 13:55 UTC (permalink / raw)
  To: Alexander Graf; +Cc: kvm

Alexander Graf wrote:
> 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.
>

I fixed this in another way, by renaming prefixing load_ldt (and a bunch 
of other functions) with kvm_.


-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-10 13:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-09  7:57 [PATCH] KVM on VMI Alexander Graf
2008-07-10 13:55 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox