diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 13:14:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 13:14:24 -0500 |
commit | 55065bc52795faae549abfb912aacc622dd63876 (patch) | |
tree | 63683547e41ed459a2a8747eeafb5e969633d54f /arch/powerpc/kvm | |
parent | 008d23e4852d78bb2618f2035f8b2110b6a6b968 (diff) | |
parent | e5c301428294cb8925667c9ee39f817c4ab1c2c9 (diff) |
Merge branch 'kvm-updates/2.6.38' of git://git.kernel.org/pub/scm/virt/kvm/kvm
* 'kvm-updates/2.6.38' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (142 commits)
KVM: Initialize fpu state in preemptible context
KVM: VMX: when entering real mode align segment base to 16 bytes
KVM: MMU: handle 'map_writable' in set_spte() function
KVM: MMU: audit: allow audit more guests at the same time
KVM: Fetch guest cr3 from hardware on demand
KVM: Replace reads of vcpu->arch.cr3 by an accessor
KVM: MMU: only write protect mappings at pagetable level
KVM: VMX: Correct asm constraint in vmcs_load()/vmcs_clear()
KVM: MMU: Initialize base_role for tdp mmus
KVM: VMX: Optimize atomic EFER load
KVM: VMX: Add definitions for more vm entry/exit control bits
KVM: SVM: copy instruction bytes from VMCB
KVM: SVM: implement enhanced INVLPG intercept
KVM: SVM: enhance mov DR intercept handler
KVM: SVM: enhance MOV CR intercept handler
KVM: SVM: add new SVM feature bit names
KVM: cleanup emulate_instruction
KVM: move complete_insn_gp() into x86.c
KVM: x86: fix CR8 handling
KVM guest: Fix kvm clock initialization when it's configured out
...
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/book3s.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 20 |
2 files changed, 4 insertions, 20 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index e316847c08c0..badc983031b3 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c | |||
@@ -1307,12 +1307,10 @@ struct kvm_vcpu *kvmppc_core_vcpu_create(struct kvm *kvm, unsigned int id) | |||
1307 | int err = -ENOMEM; | 1307 | int err = -ENOMEM; |
1308 | unsigned long p; | 1308 | unsigned long p; |
1309 | 1309 | ||
1310 | vcpu_book3s = vmalloc(sizeof(struct kvmppc_vcpu_book3s)); | 1310 | vcpu_book3s = vzalloc(sizeof(struct kvmppc_vcpu_book3s)); |
1311 | if (!vcpu_book3s) | 1311 | if (!vcpu_book3s) |
1312 | goto out; | 1312 | goto out; |
1313 | 1313 | ||
1314 | memset(vcpu_book3s, 0, sizeof(struct kvmppc_vcpu_book3s)); | ||
1315 | |||
1316 | vcpu_book3s->shadow_vcpu = (struct kvmppc_book3s_shadow_vcpu *) | 1314 | vcpu_book3s->shadow_vcpu = (struct kvmppc_book3s_shadow_vcpu *) |
1317 | kzalloc(sizeof(*vcpu_book3s->shadow_vcpu), GFP_KERNEL); | 1315 | kzalloc(sizeof(*vcpu_book3s->shadow_vcpu), GFP_KERNEL); |
1318 | if (!vcpu_book3s->shadow_vcpu) | 1316 | if (!vcpu_book3s->shadow_vcpu) |
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 38f756f25053..99758460efde 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -145,18 +145,12 @@ void kvm_arch_check_processor_compat(void *rtn) | |||
145 | *(int *)rtn = kvmppc_core_check_processor_compat(); | 145 | *(int *)rtn = kvmppc_core_check_processor_compat(); |
146 | } | 146 | } |
147 | 147 | ||
148 | struct kvm *kvm_arch_create_vm(void) | 148 | int kvm_arch_init_vm(struct kvm *kvm) |
149 | { | 149 | { |
150 | struct kvm *kvm; | 150 | return 0; |
151 | |||
152 | kvm = kzalloc(sizeof(struct kvm), GFP_KERNEL); | ||
153 | if (!kvm) | ||
154 | return ERR_PTR(-ENOMEM); | ||
155 | |||
156 | return kvm; | ||
157 | } | 151 | } |
158 | 152 | ||
159 | static void kvmppc_free_vcpus(struct kvm *kvm) | 153 | void kvm_arch_destroy_vm(struct kvm *kvm) |
160 | { | 154 | { |
161 | unsigned int i; | 155 | unsigned int i; |
162 | struct kvm_vcpu *vcpu; | 156 | struct kvm_vcpu *vcpu; |
@@ -176,14 +170,6 @@ void kvm_arch_sync_events(struct kvm *kvm) | |||
176 | { | 170 | { |
177 | } | 171 | } |
178 | 172 | ||
179 | void kvm_arch_destroy_vm(struct kvm *kvm) | ||
180 | { | ||
181 | kvmppc_free_vcpus(kvm); | ||
182 | kvm_free_physmem(kvm); | ||
183 | cleanup_srcu_struct(&kvm->srcu); | ||
184 | kfree(kvm); | ||
185 | } | ||
186 | |||
187 | int kvm_dev_ioctl_check_extension(long ext) | 173 | int kvm_dev_ioctl_check_extension(long ext) |
188 | { | 174 | { |
189 | int r; | 175 | int r; |