mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Huang, Kai" <kai.huang@intel.com>
To: "seanjc@google.com" <seanjc@google.com>,
	"nicoyip.dev@gmail.com" <nicoyip.dev@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"bp@alien8.de" <bp@alien8.de>, "x86@kernel.org" <x86@kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"Zhao, Yan Y" <yan.y.zhao@intel.com>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"tglx@kernel.org" <tglx@kernel.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: x86/mmu: Protect noncoherent DMA zaps with SRCU
Date: Mon, 24 Aug 2026 21:36:13 +0000	[thread overview]
Message-ID: <303eb59af516335e288647c19254928f89fa833a.camel@intel.com> (raw)
In-Reply-To: <aoyEMBz-SYLigbGp@google.com>

On Mon, 2026-08-24 at 10:49 -0700, Sean Christopherson wrote:
> Alternatively, what if we have kvm_zap_gfn_range() acquire SRCU?  Nesting "locks"
> is a-ok, and two of the three users of kvm_zap_gfn_range() have had this bug (see
> commit 074c00800719 ("KVM: x86: Use SRCU to protect zap in
> __kvm_set_or_clear_apicv_inhibit()").

kvm_vcpu_srcu_read_lock() doesn't allow nesting lock of KVM's SRCU.  Doesn't
seem to be a problem for this particular case, though, because
sev_handle_rmp_fault() calls kvm_zap_gfn_range() after kvm_vcpu_srcu_read_lock()
is called.

  reply	other threads:[~2026-08-24 21:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-22 19:02 Chengfeng Ye
2026-08-24  9:50 ` Huang, Kai
2026-08-24 17:49 ` Sean Christopherson
2026-08-24 21:36   ` Huang, Kai [this message]
2026-08-24 21:49     ` Sean Christopherson
2026-08-24 22:15       ` Huang, Kai

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=303eb59af516335e288647c19254928f89fa833a.camel@intel.com \
    --to=kai.huang@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nicoyip.dev@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    --cc=yan.y.zhao@intel.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®