From: Paolo Bonzini <pbonzini@redhat.com>
To: Jacob Xu <jacobhxu@google.com>,
Sean Christopherson <seanjc@google.com>,
Jim Mattson <jmattson@google.com>,
Oliver Upton <oupton@google.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kvm: svm: de-allocate svm_cpu_data for all cpus in svm_cpu_uninit()
Date: Fri, 4 Dec 2020 09:47:59 +0100 [thread overview]
Message-ID: <e5a132a0-4085-a5d5-eca9-d054f5375afd@redhat.com> (raw)
In-Reply-To: <20201203205939.1783969-1-jacobhxu@google.com>
On 03/12/20 21:59, Jacob Xu wrote:
> 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>
> ---
> arch/x86/kvm/svm/svm.c | 4 ++--
> 1 file 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);
>
Queued, thanks.
Paolo
next prev parent reply other threads:[~2020-12-04 8:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 20:59 [PATCH] kvm: svm: de-allocate svm_cpu_data for all cpus in svm_cpu_uninit() Jacob Xu
2020-12-04 8:47 ` Paolo Bonzini [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-12-03 20:56 Jacob Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5a132a0-4085-a5d5-eca9-d054f5375afd@redhat.com \
--to=pbonzini@redhat.com \
--cc=jacobhxu@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oupton@google.com \
--cc=seanjc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).