From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <kernellwp@gmail.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: Sean Christopherson <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Nadav Amit <namit@vmware.com>
Subject: Re: [PATCH] KVM: X86: Fix missing local pCPU when executing wbinvd on all dirty pCPUs
Date: Thu, 18 Mar 2021 18:55:30 +0100 [thread overview]
Message-ID: <4c37a4f6-8b73-9285-0aa5-2e86350b3b06@redhat.com> (raw)
In-Reply-To: <1615517151-7465-1-git-send-email-wanpengli@tencent.com>
On 12/03/21 03:45, Wanpeng Li wrote:
> From: Wanpeng Li <wanpengli@tencent.com>
>
> We should execute wbinvd on all dirty pCPUs when guest wbinvd exits
> to maintain datat consistency in order to deal with noncoherent DMA.
> smp_call_function_many() does not execute the provided function on
> the local core, this patch replaces it by on_each_cpu_mask().
>
> Reported-by: Nadav Amit <namit@vmware.com>
> Cc: Nadav Amit <namit@vmware.com>
> Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
> ---
> arch/x86/kvm/x86.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 012d5df..aa6d667 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -6638,7 +6638,7 @@ static int kvm_emulate_wbinvd_noskip(struct kvm_vcpu *vcpu)
> int cpu = get_cpu();
>
> cpumask_set_cpu(cpu, vcpu->arch.wbinvd_dirty_mask);
> - smp_call_function_many(vcpu->arch.wbinvd_dirty_mask,
> + on_each_cpu_mask(vcpu->arch.wbinvd_dirty_mask,
> wbinvd_ipi, NULL, 1);
> put_cpu();
> cpumask_clear(vcpu->arch.wbinvd_dirty_mask);
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2021-03-18 17:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-12 2:45 Wanpeng Li
2021-03-18 17:55 ` Paolo Bonzini [this message]
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=4c37a4f6-8b73-9285-0aa5-2e86350b3b06@redhat.com \
--to=pbonzini@redhat.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namit@vmware.com \
--cc=seanjc@google.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.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
all inboxes | Powered by JetHome®