diff options
author | Alexander Graf <agraf@suse.de> | 2012-01-16 13:12:11 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-03-05 07:57:28 -0500 |
commit | d2a1b483a4a3f4bbb5fec1877f716c15ac7fa405 (patch) | |
tree | 3c1e6162250afb6c79f846749d91d71d2ccc0712 /arch/powerpc/include/asm/kvm_ppc.h | |
parent | b7f5d0114c708d6efd264a2c5e5a31cf292a9cec (diff) |
KVM: PPC: Add HPT preallocator
We're currently allocating 16MB of linear memory on demand when creating
a guest. That does work some times, but finding 16MB of linear memory
available in the system at runtime is definitely not a given.
So let's add another command line option similar to the RMA preallocator,
that we can use to keep a pool of page tables around. Now, when a guest
gets created it has a pretty low chance of receiving an OOM.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_ppc.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_ppc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h index 1c37a2f8d0f4..9d6dee0f7d48 100644 --- a/arch/powerpc/include/asm/kvm_ppc.h +++ b/arch/powerpc/include/asm/kvm_ppc.h | |||
@@ -130,6 +130,8 @@ extern long kvm_vm_ioctl_allocate_rma(struct kvm *kvm, | |||
130 | struct kvm_allocate_rma *rma); | 130 | struct kvm_allocate_rma *rma); |
131 | extern struct kvmppc_linear_info *kvm_alloc_rma(void); | 131 | extern struct kvmppc_linear_info *kvm_alloc_rma(void); |
132 | extern void kvm_release_rma(struct kvmppc_linear_info *ri); | 132 | extern void kvm_release_rma(struct kvmppc_linear_info *ri); |
133 | extern struct kvmppc_linear_info *kvm_alloc_hpt(void); | ||
134 | extern void kvm_release_hpt(struct kvmppc_linear_info *li); | ||
133 | extern int kvmppc_core_init_vm(struct kvm *kvm); | 135 | extern int kvmppc_core_init_vm(struct kvm *kvm); |
134 | extern void kvmppc_core_destroy_vm(struct kvm *kvm); | 136 | extern void kvmppc_core_destroy_vm(struct kvm *kvm); |
135 | extern int kvmppc_core_prepare_memory_region(struct kvm *kvm, | 137 | extern int kvmppc_core_prepare_memory_region(struct kvm *kvm, |