From 8e40c7ea29ae9c2b2896c63ee367db337126d482 Mon Sep 17 00:00:00 2001 From: Zachary Amsden Date: Tue, 29 Sep 2009 11:38:37 -1000 Subject: [PATCH] --- yaml --- r: 172289 b: refs/heads/master c: 3230bb4707278dba25e24cd0a11ea7b2337678ee h: refs/heads/master i: 172287: f95a71c45e4727f6d3e87027a383d0209cd61fa7 v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/svm.c | 4 ++-- trunk/arch/x86/kvm/vmx.c | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index dcb0ca9df0f4..f75289a00a2a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e6732a5af9dfcc87078706a1598df0efe5010f73 +refs/heads/master: 3230bb4707278dba25e24cd0a11ea7b2337678ee diff --git a/trunk/arch/x86/kvm/svm.c b/trunk/arch/x86/kvm/svm.c index d1036ce8917e..02a4269be645 100644 --- a/trunk/arch/x86/kvm/svm.c +++ b/trunk/arch/x86/kvm/svm.c @@ -482,7 +482,7 @@ static __init int svm_hardware_setup(void) kvm_enable_efer_bits(EFER_SVME); } - for_each_online_cpu(cpu) { + for_each_possible_cpu(cpu) { r = svm_cpu_init(cpu); if (r) goto err; @@ -516,7 +516,7 @@ static __exit void svm_hardware_unsetup(void) { int cpu; - for_each_online_cpu(cpu) + for_each_possible_cpu(cpu) svm_cpu_uninit(cpu); __free_pages(pfn_to_page(iopm_base >> PAGE_SHIFT), IOPM_ALLOC_ORDER); diff --git a/trunk/arch/x86/kvm/vmx.c b/trunk/arch/x86/kvm/vmx.c index a187570e4837..97f4265cda38 100644 --- a/trunk/arch/x86/kvm/vmx.c +++ b/trunk/arch/x86/kvm/vmx.c @@ -1350,15 +1350,17 @@ static void free_kvm_area(void) { int cpu; - for_each_online_cpu(cpu) + for_each_possible_cpu(cpu) { free_vmcs(per_cpu(vmxarea, cpu)); + per_cpu(vmxarea, cpu) = NULL; + } } static __init int alloc_kvm_area(void) { int cpu; - for_each_online_cpu(cpu) { + for_each_possible_cpu(cpu) { struct vmcs *vmcs; vmcs = alloc_vmcs_cpu(cpu);