All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Ene <sebastianene@google.com>
To: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>,
	catalin.marinas@arm.com, oupton@kernel.org, joey.gouly@arm.com,
	korneld@google.com, kvmarm@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, android-kvm@google.com,
	mrigendra.chaubey@gmail.com, perlarsen@google.com,
	suzuki.poulose@arm.com, vdonnefort@google.com,
	yuzenghui@huawei.com, Sudeep Holla <sudeep.holla@kernel.org>
Subject: Re: [PATCH] KVM: arm64: Forward FFA_NOTIFICATION* calls to TrustZone
Date: Mon, 8 Jun 2026 14:22:22 +0000	[thread overview]
Message-ID: <aibQHiYimPP1ylk3@google.com> (raw)
In-Reply-To: <ahmxiFXXTupafbXw@willie-the-truck>

On Fri, May 29, 2026 at 04:32:24PM +0100, Will Deacon wrote:
> On Fri, May 08, 2026 at 01:04:27PM +0000, Sebastian Ene wrote:
> > While at it I discovered that none of the FF-A calls in the proxy
> > currently check for these SBZ registers. Would you be ok with a diff that
> > fixes this before the patch with the notifications ?

Hi Will,

> 
> I'd probably structure it as a separate patch per call, tbh. That way,
> the commit message can talk about the specific fields that are reserved
> for a given call. See below.
> 
> > Refactor the handling logic in pKVM FF-A proxy to support checking for
> > SBZ/MBZ values. While at it, drop the do_ffa_mem_xfer macro and replace
> > it with two functions that make it clear that we re-write the
> > function-id with a 64-bit variant, to keep the same behavior as before.
> > Keep each handler in an array of structures together with a mask that
> > corresponds to the SBZ registers the spec expects.
> 
> Although I agree that we should be enforcing SBZ/MBZ paramaters (because
> we have no idea what they might do in future versions of the spec), I
> also think that doing this at the register level is too coarse.
> 
> For example, the VM ID parameter to FFA_NOTIFICATION_BITMAP_CREATE has bits
> 31:16 as MBZ. So I think we probably need to do the checking on a
> per-function basis, like Per is doing in his series:
> 
> https://lore.kernel.org/r/20260501-host-direct-messages-v6-0-3f4af727ed85@google.com
> 

For the newly added calls like FFA_NOTIFICATION_* we can do that in a
separate functions, but what about the other existing calls that have
MBZ registers ? that was the reason for the inline proposal in :
https://lore.kernel.org/all/af3fW468-f1KXCrC@google.com/
(to avoid duplicate checks).

> Will

Thanks,
Sebastian

  reply	other threads:[~2026-06-08 14:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-01 11:44 [PATCH] KVM: arm64: Forward FFA_NOTIFICATION* calls to TrustZone Sebastian Ene
2026-05-06 16:29 ` Marc Zyngier
2026-05-07 10:48   ` Sebastian Ene
2026-05-07 13:36     ` Marc Zyngier
2026-05-07 14:13       ` Sebastian Ene
2026-05-07 14:21         ` Marc Zyngier
2026-05-08 13:04           ` Sebastian Ene
2026-05-08 16:57             ` Sudeep Holla
2026-05-29 15:32             ` Will Deacon
2026-06-08 14:22               ` Sebastian Ene [this message]
2026-06-08 14:40                 ` Will Deacon
2026-06-08 14:51                   ` Sebastian Ene

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=aibQHiYimPP1ylk3@google.com \
    --to=sebastianene@google.com \
    --cc=android-kvm@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=korneld@google.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=mrigendra.chaubey@gmail.com \
    --cc=oupton@kernel.org \
    --cc=perlarsen@google.com \
    --cc=sudeep.holla@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=vdonnefort@google.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.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 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.