diff options
-rw-r--r-- | arch/x86/kvm/svm.c | 4 | ||||
-rw-r--r-- | arch/x86/kvm/vmx.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index d1036ce8917e..02a4269be645 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -482,7 +482,7 @@ static __init int svm_hardware_setup(void) | |||
482 | kvm_enable_efer_bits(EFER_SVME); | 482 | kvm_enable_efer_bits(EFER_SVME); |
483 | } | 483 | } |
484 | 484 | ||
485 | for_each_online_cpu(cpu) { | 485 | for_each_possible_cpu(cpu) { |
486 | r = svm_cpu_init(cpu); | 486 | r = svm_cpu_init(cpu); |
487 | if (r) | 487 | if (r) |
488 | goto err; | 488 | goto err; |
@@ -516,7 +516,7 @@ static __exit void svm_hardware_unsetup(void) | |||
516 | { | 516 | { |
517 | int cpu; | 517 | int cpu; |
518 | 518 | ||
519 | for_each_online_cpu(cpu) | 519 | for_each_possible_cpu(cpu) |
520 | svm_cpu_uninit(cpu); | 520 | svm_cpu_uninit(cpu); |
521 | 521 | ||
522 | __free_pages(pfn_to_page(iopm_base >> PAGE_SHIFT), IOPM_ALLOC_ORDER); | 522 | __free_pages(pfn_to_page(iopm_base >> PAGE_SHIFT), IOPM_ALLOC_ORDER); |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a187570e4837..97f4265cda38 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -1350,15 +1350,17 @@ static void free_kvm_area(void) | |||
1350 | { | 1350 | { |
1351 | int cpu; | 1351 | int cpu; |
1352 | 1352 | ||
1353 | for_each_online_cpu(cpu) | 1353 | for_each_possible_cpu(cpu) { |
1354 | free_vmcs(per_cpu(vmxarea, cpu)); | 1354 | free_vmcs(per_cpu(vmxarea, cpu)); |
1355 | per_cpu(vmxarea, cpu) = NULL; | ||
1356 | } | ||
1355 | } | 1357 | } |
1356 | 1358 | ||
1357 | static __init int alloc_kvm_area(void) | 1359 | static __init int alloc_kvm_area(void) |
1358 | { | 1360 | { |
1359 | int cpu; | 1361 | int cpu; |
1360 | 1362 | ||
1361 | for_each_online_cpu(cpu) { | 1363 | for_each_possible_cpu(cpu) { |
1362 | struct vmcs *vmcs; | 1364 | struct vmcs *vmcs; |
1363 | 1365 | ||
1364 | vmcs = alloc_vmcs_cpu(cpu); | 1366 | vmcs = alloc_vmcs_cpu(cpu); |