Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Justin He <Justin.He@arm.com>
Cc: "sashiko-reviews@lists.linux.dev"
	<sashiko-reviews@lists.linux.dev>,
	"kvmarm@lists.linux.dev" <kvmarm@lists.linux.dev>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Oliver Upton <oupton@kernel.org>
Subject: Re: [PATCH v4 4/4] KVM: arm64: nv: Allow the L1 VNCR page in cacheable PFNMAP memory
Date: Fri, 04 Dec 2026 10:24:24 +0000	[thread overview]
Message-ID: <86zeulwdgn.wl-maz@kernel.org> (raw)
In-Reply-To: <AS2PR08MB97869313823395285097E872F74A2@AS2PR08MB9786.eurprd08.prod.outlook.com>

On Fri, 04 Dec 2026 02:59:07 +0000,
Justin He <Justin.He@arm.com> wrote:
> 
> 
> 
> > -----Original Message-----
> > From: sashiko-bot@kernel.org <sashiko-bot@kernel.org>
> > Sent: Thursday, December 3, 2026 7:16 PM
> > To: Justin He <Justin.He@arm.com>
> > Cc: kvmarm@lists.linux.dev; kvm@vger.kernel.org; Oliver Upton
> > <oupton@kernel.org>; Marc Zyngier <maz@kernel.org>
> > Subject: Re: [PATCH v4 4/4] KVM: arm64: nv: Allow the L1 VNCR page in
> > cacheable PFNMAP memory
> >
> > Thank you for your contribution! Sashiko AI review found 1 potential
> > issue to consider:
> > - [High] KVM: arm64: vncr_pfn_is_cacheable() checks VMA prot instead of
> >   PTE prot
> > --
> 
> Make sense to me. Inspecting vma->vm_page_prot can indeed misclassify a
> VM_PFNMAP mapping whose per-PTE attributes were overridden with
> vmf_insert_pfn_prot().
> 
> vncr_pfn_is_cacheable() will resolve the actual host PTE pgprot
> via follow_pfnmap_start() and check it with kvm_pgprot_is_cacheable()
> instead of relying on vma->vm_page_prot.
> 
> I'll give it another day for any further comments before sending v5.

Honestly, I'm starting to question whether this is worth the
complexity. I can see the appeal for memory that lives outside of the
kernel's view, but having to deal with devices on the VNCR path is
absolutely deadly.

	M.

-- 
Without deviation from the norm, progress is not possible.

      reply	other threads:[~2026-12-04 10:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 10:58 [PATCH v4 0/4] KVM: arm64: nv: VNCR page mapping fixes Jia He
2026-12-03 10:58 ` [PATCH v4 1/4] KVM: arm64: nv: Locate the VNCR page in the host page from its PA Jia He
2026-12-03 10:58 ` [PATCH v4 2/4] KVM: arm64: nv: Inject an SEA when the VNCR walk cannot set the AF Jia He
2026-12-03 10:58 ` [PATCH v4 3/4] KVM: arm64: selftests: Add a test for VNCR_EL2 translation faults Jia He
2026-12-03 11:16   ` sashiko-bot
2026-12-04  1:46     ` Justin He
2026-12-04  9:12       ` Marc Zyngier
2026-12-04  9:51         ` Justin He
2026-12-03 10:58 ` [PATCH v4 4/4] KVM: arm64: nv: Allow the L1 VNCR page in cacheable PFNMAP memory Jia He
2026-12-03 11:16   ` sashiko-bot
2026-12-04  2:59     ` Justin He
2026-12-04 10:24       ` Marc Zyngier [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=86zeulwdgn.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=Justin.He@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=oupton@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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