The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
To: Salah Triki <salah.triki@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kvm: preemption must be disabled when calling smp_call_function_many
Date: Mon, 9 Jun 2025 11:22:11 +0800	[thread overview]
Message-ID: <6e162be6-0ab0-4cfe-a9f4-fad4f605e16b@linux.intel.com> (raw)
In-Reply-To: <aEQW81I9kO5-eyrg@pc>


On 6/7/2025 6:39 PM, Salah Triki wrote:
> {Disable, Enable} preemption {before, after} calling
> smp_call_function_many().
>
> Signed-off-by: Salah Triki <salah.triki@gmail.com>
> ---
>  virt/kvm/kvm_main.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index eec82775c5bf..ab9593943846 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -209,7 +209,10 @@ static inline bool kvm_kick_many_cpus(struct cpumask *cpus, bool wait)
>  	if (cpumask_empty(cpus))
>  		return false;
>  
> +	preempt_disable();
>  	smp_call_function_many(cpus, ack_kick, NULL, wait);
> +	preempt_enable();
> +
>  	return true;
>  }
>  

Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>



  reply	other threads:[~2025-06-09  3:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-07 10:39 [PATCH] kvm: preemption must be disabled when calling smp_call_function_many Salah Triki
2025-06-09  3:22 ` Mi, Dapeng [this message]
2025-06-09  6:39 ` Manali Shukla

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=6e162be6-0ab0-4cfe-a9f4-fad4f605e16b@linux.intel.com \
    --to=dapeng1.mi@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=salah.triki@gmail.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