aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index bcf71c7730f0..2d63f2c0137c 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -16,6 +16,7 @@
16#include <linux/mm.h> 16#include <linux/mm.h>
17#include <linux/preempt.h> 17#include <linux/preempt.h>
18#include <linux/msi.h> 18#include <linux/msi.h>
19#include <linux/slab.h>
19#include <asm/signal.h> 20#include <asm/signal.h>
20 21
21#include <linux/kvm.h> 22#include <linux/kvm.h>
@@ -441,7 +442,19 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu);
441 442
442void kvm_free_physmem(struct kvm *kvm); 443void kvm_free_physmem(struct kvm *kvm);
443 444
444struct kvm *kvm_arch_create_vm(void); 445#ifndef __KVM_HAVE_ARCH_VM_ALLOC
446static inline struct kvm *kvm_arch_alloc_vm(void)
447{
448 return kzalloc(sizeof(struct kvm), GFP_KERNEL);
449}
450
451static inline void kvm_arch_free_vm(struct kvm *kvm)
452{
453 kfree(kvm);
454}
455#endif
456
457int kvm_arch_init_vm(struct kvm *kvm);
445void kvm_arch_destroy_vm(struct kvm *kvm); 458void kvm_arch_destroy_vm(struct kvm *kvm);
446void kvm_free_all_assigned_devices(struct kvm *kvm); 459void kvm_free_all_assigned_devices(struct kvm *kvm);
447void kvm_arch_sync_events(struct kvm *kvm); 460void kvm_arch_sync_events(struct kvm *kvm);