diff options
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 9ab1a77941ef..f032806a212f 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -2178,7 +2178,7 @@ static void kvm_sched_out(struct preempt_notifier *pn, | |||
2178 | kvm_arch_vcpu_put(vcpu); | 2178 | kvm_arch_vcpu_put(vcpu); |
2179 | } | 2179 | } |
2180 | 2180 | ||
2181 | int kvm_init(void *opaque, unsigned int vcpu_size, | 2181 | int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, |
2182 | struct module *module) | 2182 | struct module *module) |
2183 | { | 2183 | { |
2184 | int r; | 2184 | int r; |
@@ -2228,8 +2228,9 @@ int kvm_init(void *opaque, unsigned int vcpu_size, | |||
2228 | goto out_free_4; | 2228 | goto out_free_4; |
2229 | 2229 | ||
2230 | /* A kmem cache lets us meet the alignment requirements of fx_save. */ | 2230 | /* A kmem cache lets us meet the alignment requirements of fx_save. */ |
2231 | kvm_vcpu_cache = kmem_cache_create("kvm_vcpu", vcpu_size, | 2231 | if (!vcpu_align) |
2232 | __alignof__(struct kvm_vcpu), | 2232 | vcpu_align = __alignof__(struct kvm_vcpu); |
2233 | kvm_vcpu_cache = kmem_cache_create("kvm_vcpu", vcpu_size, vcpu_align, | ||
2233 | 0, NULL); | 2234 | 0, NULL); |
2234 | if (!kvm_vcpu_cache) { | 2235 | if (!kvm_vcpu_cache) { |
2235 | r = -ENOMEM; | 2236 | r = -ENOMEM; |