diff options
author | Alexander Graf <agraf@suse.de> | 2009-09-15 05:37:46 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-12-03 02:32:10 -0500 |
commit | 10474ae8945ce08622fd1f3464e55bd817bf2376 (patch) | |
tree | d390843b5107e600fbbf745eb24d85d745fe449f /include/linux | |
parent | e8b3433a5c062e94e34cadb6144c10689a497bc3 (diff) |
KVM: Activate Virtualization On Demand
X86 CPUs need to have some magic happening to enable the virtualization
extensions on them. This magic can result in unpleasant results for
users, like blocking other VMMs from working (vmx) or using invalid TLB
entries (svm).
Currently KVM activates virtualization when the respective kernel module
is loaded. This blocks us from autoloading KVM modules without breaking
other VMMs.
To circumvent this problem at least a bit, this patch introduces on
demand activation of virtualization. This means, that instead
virtualization is enabled on creation of the first virtual machine
and disabled on destruction of the last one.
So using this, KVM can be easily autoloaded, while keeping other
hypervisors usable.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/kvm_host.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index c0a1cc35f080..b985a29d8175 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -345,7 +345,7 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu); | |||
345 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu); | 345 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu); |
346 | 346 | ||
347 | int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu); | 347 | int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu); |
348 | void kvm_arch_hardware_enable(void *garbage); | 348 | int kvm_arch_hardware_enable(void *garbage); |
349 | void kvm_arch_hardware_disable(void *garbage); | 349 | void kvm_arch_hardware_disable(void *garbage); |
350 | int kvm_arch_hardware_setup(void); | 350 | int kvm_arch_hardware_setup(void); |
351 | void kvm_arch_hardware_unsetup(void); | 351 | void kvm_arch_hardware_unsetup(void); |