All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Madhavan Srinivasan <maddy@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org,
	Nicholas Piggin <npiggin@gmail.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
	"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
	kvm-ppc@vger.kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Gautam Menghani <gautam@linux.ibm.com>,
	Harsh Prateek Bora <harshpb@linux.ibm.com>,
	R Nageswara Sastry <rnsastry@linux.ibm.com>,
	Alexander Graf <agraf@suse.de>,
	linux-hardening@vger.kernel.org, stable@vger.kernel.org,
	Avi Kivity <avi@redhat.com>
Subject: Re: [PATCH v2 2/3] KVM: PPC: Book3S HV: Add preempt_disable() around virtual-mode HPTE bit-lock users
Date: Tue, 6 Oct 2026 08:31:21 +0530	[thread overview]
Message-ID: <ad91f624-ea6f-441f-995e-14fd4fd30ebe@linux.ibm.com> (raw)
In-Reply-To: <20261005234024.20213ac7-78-amachhiw@linux.ibm.com>



On 10/5/26 11:57 PM, Amit Machhiwal wrote:
> Hi Shrikanth,
> 
> Thanks for the review.  Please find my responses inline below.
> 

>> I don't like this sprinkling of preempt disable/enable.
>> Is there not a way to embedd this in try_lock_hpte/unlock_hpte?
> 
> I understand the scattering of preempt_disable()/preempt_enable() looks ugly.
> But there are two blockers for that approach:
> 
> 1. The real-mode hcall dispatch table (hcall_real_table in
>     book3s_hv_rmhandlers.S) calls kvmppc_h_enter(), kvmppc_h_remove(),
>     kvmppc_h_bulk_remove() and others in book3s_hv_rm_mmu.c, which all call
>     try_lock_hpte() from real mode.  Adding preempt_disable() inside
>     try_lock_hpte() would affect those real-mode callers, which brings us to your
>     second point.
> 

Fair enough.

Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>


  reply	other threads:[~2026-10-06  3:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 17:37 [PATCH v2 0/3] KVM: PPC: Fixes for Book3S HV HPT locking and paired-single decoding Amit Machhiwal
2026-09-30 17:37 ` [PATCH v2 1/3] KVM: PPC: Book3S HV: Add SRCU protection for virtual-mode HPT hcalls Amit Machhiwal
2026-09-30 17:37 ` [PATCH v2 2/3] KVM: PPC: Book3S HV: Add preempt_disable() around virtual-mode HPTE bit-lock users Amit Machhiwal
2026-09-30 17:52   ` sashiko-bot
2026-10-05 17:57     ` Amit Machhiwal
2026-10-05 14:28   ` Shrikanth Hegde
2026-10-05 18:27     ` Amit Machhiwal
2026-10-06  3:01       ` Shrikanth Hegde [this message]
2026-09-30 17:37 ` [PATCH v2 3/3] KVM: PPC: Fix get_d_signext() 12-bit displacement for paired-single D-form Amit Machhiwal
2026-10-06  3:27   ` Shrikanth Hegde

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=ad91f624-ea6f-441f-995e-14fd4fd30ebe@linux.ibm.com \
    --to=sshegde@linux.ibm.com \
    --cc=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=chleroy@kernel.org \
    --cc=gautam@linux.ibm.com \
    --cc=harshpb@linux.ibm.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=ritesh.list@gmail.com \
    --cc=rnsastry@linux.ibm.com \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.