public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* VMX ideas
@ 2008-10-29 14:52 Alexander Graf
  2008-10-29 15:01 ` Joerg Roedel
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Alexander Graf @ 2008-10-29 14:52 UTC (permalink / raw)
  To: KVM list

Hi list,

I really do like KVM and would love to make using it a complete no- 
brainer user experience. For the average user, loading a kernel module  
(and unloading it) isn't really one of the most common tasks.

So I was considering to automatically load kvm-intel and kvm-amd on  
bootup, when the CPU has a CPUID flag. Unfortunately it doesn't work  
that easily. VMX enters Root mode, setting a page to use for the VMCS.  
KVM sets up this page when the kvm-intel module gets loaded. This  
means, as soon as kvm-intel is modprobe'd, vmware, virtual box,  
parallels and the like are screwed.
 From a distribution perspective, this isn't exactly an ideal situation.

So I was thinking hard on what to do to circumvent this problem and  
came up with several approaches:

1. Export some functions that could be used by 3rd party hypervisors  
to "occupy" the VMCS region

This would mean, that the others' kernel modules have dependencies on  
KVM. I don't think that's really desirable. Furthermore it wouldn't  
work with kvm compiled as external module.


2. Create a root mode base framework

This is the Mac OS X approach. They have a small piece of code in the  
kernel, that sets up the root mode, handles suspend/resume and  
maintains a ref counter on its usage. Since the root mode is set on  
bootup, all hypervisors would need to make use of that framework.

While I like that approach for its simplicity, it does not allow for  
parallel execution of VMs with different hypervisors. Is this a real  
problem?


3. Create a root mode bloat framework

Taking approach 2. we could also export functions to handle VPID  
management and VMXPTRLD, which would make it possible for multiple  
hypervisors to run concurrently. This is the most elegant approach  
IMHO, but also needs the most maintenance, as new revisions of VMX  
could possibly break the whole concept.


I started working on 2. and wanted to put in some parts of 3.,  
realizing that it's more work and code change than I'd like. Any  
comments on these ideas? I'd really love to have KVM always loaded  
somehow.

Alex

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

end of thread, other threads:[~2008-11-03 10:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-29 14:52 VMX ideas Alexander Graf
2008-10-29 15:01 ` Joerg Roedel
2008-10-29 15:11   ` Alexander Graf
2008-10-29 15:36 ` Gerd Hoffmann
2008-10-29 15:45   ` Anthony Liguori
2008-10-29 17:15     ` Alexander Graf
2008-10-29 17:18   ` Alexander Graf
2008-11-02 10:28   ` Avi Kivity
2008-11-03  7:32     ` Alexander Graf
2008-11-02 10:26 ` Avi Kivity
2008-11-02 16:11   ` Daniel P. Berrange
2008-11-02 16:15     ` Avi Kivity
2008-11-02 16:18       ` Avi Kivity
2008-11-02 23:36         ` Glauber Costa
2008-11-03  7:24           ` Alexander Graf
2008-11-03 10:26             ` Daniel P. Berrange

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