11 #include <linux/export.h>
12 #include <linux/sched.h>
17 #include <asm/cputable.h>
21 #define KVM_LINEAR_RMA 0
22 #define KVM_LINEAR_HPT 1
41 static unsigned long kvm_rma_size = 64 << 20;
42 static unsigned long kvm_rma_count;
46 static inline int lpcr_rmls(
unsigned long rma_size)
70 static int __init early_parse_rma_size(
char *
p)
81 static int __init early_parse_rma_count(
char *p)
90 early_param(
"kvm_rma_count", early_parse_rma_count);
100 kvm_release_linear(ri);
112 static unsigned long kvm_hpt_count;
114 static int __init early_parse_hpt_count(
char *p)
123 early_param(
"kvm_hpt_count", early_parse_hpt_count);
133 kvm_release_linear(li);
158 for (i = 0; i <
count; ++
i) {
160 pr_info(
"Allocated KVM %s at %p (%ld MB)\n", typestr, linear,
182 spin_lock(&linear_lock);
184 if (ri->
type != type)
193 spin_unlock(&linear_lock);
200 spin_lock(&linear_lock);
202 spin_unlock(&linear_lock);
223 if (!kvm_rma_size || !kvm_rma_count)
227 if (lpcr_rmls(kvm_rma_size) < 0) {
228 pr_err(
"RMA size of 0x%lx not supported\n", kvm_rma_size);