diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 14:41:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 14:41:11 -0500 |
commit | 597b0d21626da4e6f09f132442caf0cc2b0eb47c (patch) | |
tree | 13c0074bb20f7b05a471e78d4ff52c665a10266a /arch/s390 | |
parent | 2640c9a90fa596871e142f42052608864335f102 (diff) | |
parent | 87917239204d67a316cb89751750f86c9ed3640b (diff) |
Merge branch 'kvm-updates/2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'kvm-updates/2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (140 commits)
KVM: MMU: handle large host sptes on invlpg/resync
KVM: Add locking to virtual i8259 interrupt controller
KVM: MMU: Don't treat a global pte as such if cr4.pge is cleared
MAINTAINERS: Maintainership changes for kvm/ia64
KVM: ia64: Fix kvm_arch_vcpu_ioctl_[gs]et_regs()
KVM: x86: Rework user space NMI injection as KVM_CAP_USER_NMI
KVM: VMX: Fix pending NMI-vs.-IRQ race for user space irqchip
KVM: fix handling of ACK from shared guest IRQ
KVM: MMU: check for present pdptr shadow page in walk_shadow
KVM: Consolidate userspace memory capability reporting into common code
KVM: Advertise the bug in memory region destruction as fixed
KVM: use cpumask_var_t for cpus_hardware_enabled
KVM: use modern cpumask primitives, no cpumask_t on stack
KVM: Extract core of kvm_flush_remote_tlbs/kvm_reload_remote_mmus
KVM: set owner of cpu and vm file operations
anon_inodes: use fops->owner for module refcount
x86: KVM guest: kvm_get_tsc_khz: return khz, not lpj
KVM: MMU: prepopulate the shadow on invlpg
KVM: MMU: skip global pgtables on sync due to cr3 switch
KVM: MMU: collapse remote TLB flushes on root sync
...
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 8b00eb2ddf57..be8497186b96 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -113,8 +113,6 @@ long kvm_arch_dev_ioctl(struct file *filp, | |||
113 | int kvm_dev_ioctl_check_extension(long ext) | 113 | int kvm_dev_ioctl_check_extension(long ext) |
114 | { | 114 | { |
115 | switch (ext) { | 115 | switch (ext) { |
116 | case KVM_CAP_USER_MEMORY: | ||
117 | return 1; | ||
118 | default: | 116 | default: |
119 | return 0; | 117 | return 0; |
120 | } | 118 | } |
@@ -185,8 +183,6 @@ struct kvm *kvm_arch_create_vm(void) | |||
185 | debug_register_view(kvm->arch.dbf, &debug_sprintf_view); | 183 | debug_register_view(kvm->arch.dbf, &debug_sprintf_view); |
186 | VM_EVENT(kvm, 3, "%s", "vm created"); | 184 | VM_EVENT(kvm, 3, "%s", "vm created"); |
187 | 185 | ||
188 | try_module_get(THIS_MODULE); | ||
189 | |||
190 | return kvm; | 186 | return kvm; |
191 | out_nodbf: | 187 | out_nodbf: |
192 | free_page((unsigned long)(kvm->arch.sca)); | 188 | free_page((unsigned long)(kvm->arch.sca)); |
@@ -196,13 +192,33 @@ out_nokvm: | |||
196 | return ERR_PTR(rc); | 192 | return ERR_PTR(rc); |
197 | } | 193 | } |
198 | 194 | ||
195 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) | ||
196 | { | ||
197 | VCPU_EVENT(vcpu, 3, "%s", "free cpu"); | ||
198 | free_page((unsigned long)(vcpu->arch.sie_block)); | ||
199 | kvm_vcpu_uninit(vcpu); | ||
200 | kfree(vcpu); | ||
201 | } | ||
202 | |||
203 | static void kvm_free_vcpus(struct kvm *kvm) | ||
204 | { | ||
205 | unsigned int i; | ||
206 | |||
207 | for (i = 0; i < KVM_MAX_VCPUS; ++i) { | ||
208 | if (kvm->vcpus[i]) { | ||
209 | kvm_arch_vcpu_destroy(kvm->vcpus[i]); | ||
210 | kvm->vcpus[i] = NULL; | ||
211 | } | ||
212 | } | ||
213 | } | ||
214 | |||
199 | void kvm_arch_destroy_vm(struct kvm *kvm) | 215 | void kvm_arch_destroy_vm(struct kvm *kvm) |
200 | { | 216 | { |
201 | debug_unregister(kvm->arch.dbf); | 217 | kvm_free_vcpus(kvm); |
202 | kvm_free_physmem(kvm); | 218 | kvm_free_physmem(kvm); |
203 | free_page((unsigned long)(kvm->arch.sca)); | 219 | free_page((unsigned long)(kvm->arch.sca)); |
220 | debug_unregister(kvm->arch.dbf); | ||
204 | kfree(kvm); | 221 | kfree(kvm); |
205 | module_put(THIS_MODULE); | ||
206 | } | 222 | } |
207 | 223 | ||
208 | /* Section: vcpu related */ | 224 | /* Section: vcpu related */ |
@@ -213,8 +229,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) | |||
213 | 229 | ||
214 | void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) | 230 | void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) |
215 | { | 231 | { |
216 | /* kvm common code refers to this, but does'nt call it */ | 232 | /* Nothing todo */ |
217 | BUG(); | ||
218 | } | 233 | } |
219 | 234 | ||
220 | void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | 235 | void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) |
@@ -308,8 +323,6 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, | |||
308 | VM_EVENT(kvm, 3, "create cpu %d at %p, sie block at %p", id, vcpu, | 323 | VM_EVENT(kvm, 3, "create cpu %d at %p, sie block at %p", id, vcpu, |
309 | vcpu->arch.sie_block); | 324 | vcpu->arch.sie_block); |
310 | 325 | ||
311 | try_module_get(THIS_MODULE); | ||
312 | |||
313 | return vcpu; | 326 | return vcpu; |
314 | out_free_cpu: | 327 | out_free_cpu: |
315 | kfree(vcpu); | 328 | kfree(vcpu); |
@@ -317,14 +330,6 @@ out_nomem: | |||
317 | return ERR_PTR(rc); | 330 | return ERR_PTR(rc); |
318 | } | 331 | } |
319 | 332 | ||
320 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) | ||
321 | { | ||
322 | VCPU_EVENT(vcpu, 3, "%s", "destroy cpu"); | ||
323 | free_page((unsigned long)(vcpu->arch.sie_block)); | ||
324 | kfree(vcpu); | ||
325 | module_put(THIS_MODULE); | ||
326 | } | ||
327 | |||
328 | int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) | 333 | int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) |
329 | { | 334 | { |
330 | /* kvm common code refers to this, but never calls it */ | 335 | /* kvm common code refers to this, but never calls it */ |