diff options
author | Jacob Xu <jacobhxu@google.com> | 2020-12-03 12:59:39 -0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-12-04 03:47:58 -0500 |
commit | a2b2d4bf5076832339762556b816eec58ca38f77 (patch) | |
tree | 8ca639b7b303bf01af423087725dd81325326908 | |
parent | 0c55f867f0c96dff93d4e0b5973975d65afb26d8 (diff) | |
download | linux-a2b2d4bf5076832339762556b816eec58ca38f77.tar.gz linux-a2b2d4bf5076832339762556b816eec58ca38f77.tar.bz2 linux-a2b2d4bf5076832339762556b816eec58ca38f77.zip |
kvm: svm: de-allocate svm_cpu_data for all cpus in svm_cpu_uninit()
The cpu arg for svm_cpu_uninit() was previously ignored resulting in the
per cpu structure svm_cpu_data not being de-allocated for all cpus.
Signed-off-by: Jacob Xu <jacobhxu@google.com>
Message-Id: <20201203205939.1783969-1-jacobhxu@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/svm/svm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 79b3a564f1c9..da7eb4aaf44f 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -530,12 +530,12 @@ static int svm_hardware_enable(void) static void svm_cpu_uninit(int cpu) { - struct svm_cpu_data *sd = per_cpu(svm_data, raw_smp_processor_id()); + struct svm_cpu_data *sd = per_cpu(svm_data, cpu); if (!sd) return; - per_cpu(svm_data, raw_smp_processor_id()) = NULL; + per_cpu(svm_data, cpu) = NULL; kfree(sd->sev_vmcbs); __free_page(sd->save_area); kfree(sd); |