aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-10 12:08:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-10 12:08:21 -0400
commitc67723ebbb2d6f672a0e9e5b1a8d1a2442942557 (patch)
tree3518799ec3b4e5a8529de39ca8342fde50907952 /virt/kvm
parentec6671589a07d9b27ff5832138ff435b3a3c9b09 (diff)
parent326f578f7e1443bac2333712dd130a261ec15288 (diff)
Merge tag 'kvm-3.10-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm fixes from Gleb Natapov: "Most of the fixes are in the emulator since now we emulate more than we did before for correctness sake we see more bugs there, but there is also an OOPS fixed and corruption of xcr0 register." * tag 'kvm-3.10-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: emulator: emulate SALC KVM: emulator: emulate XLAT KVM: emulator: emulate AAM KVM: VMX: fix halt emulation while emulating invalid guest sate KVM: Fix kvm_irqfd_init initialization KVM: x86: fix maintenance of guest/host xcr0 state
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/kvm_main.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index ae88b719bd2e..302681c4aa44 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -3105,13 +3105,21 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
3105 int r; 3105 int r;
3106 int cpu; 3106 int cpu;
3107 3107
3108 r = kvm_irqfd_init();
3109 if (r)
3110 goto out_irqfd;
3111 r = kvm_arch_init(opaque); 3108 r = kvm_arch_init(opaque);
3112 if (r) 3109 if (r)
3113 goto out_fail; 3110 goto out_fail;
3114 3111
3112 /*
3113 * kvm_arch_init makes sure there's at most one caller
3114 * for architectures that support multiple implementations,
3115 * like intel and amd on x86.
3116 * kvm_arch_init must be called before kvm_irqfd_init to avoid creating
3117 * conflicts in case kvm is already setup for another implementation.
3118 */
3119 r = kvm_irqfd_init();
3120 if (r)
3121 goto out_irqfd;
3122
3115 if (!zalloc_cpumask_var(&cpus_hardware_enabled, GFP_KERNEL)) { 3123 if (!zalloc_cpumask_var(&cpus_hardware_enabled, GFP_KERNEL)) {
3116 r = -ENOMEM; 3124 r = -ENOMEM;
3117 goto out_free_0; 3125 goto out_free_0;
@@ -3186,10 +3194,10 @@ out_free_1:
3186out_free_0a: 3194out_free_0a:
3187 free_cpumask_var(cpus_hardware_enabled); 3195 free_cpumask_var(cpus_hardware_enabled);
3188out_free_0: 3196out_free_0:
3189 kvm_arch_exit();
3190out_fail:
3191 kvm_irqfd_exit(); 3197 kvm_irqfd_exit();
3192out_irqfd: 3198out_irqfd:
3199 kvm_arch_exit();
3200out_fail:
3193 return r; 3201 return r;
3194} 3202}
3195EXPORT_SYMBOL_GPL(kvm_init); 3203EXPORT_SYMBOL_GPL(kvm_init);