From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 784743D0BE5 for ; Mon, 8 Jun 2026 14:22:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780928550; cv=none; b=eJpn7EptoQ0hyWDu2DexCuq1gwuC1m0u2zzAKVsEMgVrolEIoR+3untXBcBxQUA2MNEq5TTI1PojzjxEBUtMofx0ifx1hFxLcuVnHp2TGz/Pzyavd50g+uhyryg9CcNjgafAluFFIxGUyVd58rXdR0Y8HKe5r8nXM7PQNTdLP0o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780928550; c=relaxed/simple; bh=Rlbk9tEGqeQ9ZsVb8Vxb0S3BBhDQl+53BntceG8nbck=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mVqA4GesiMwDP30bXVMxVFK4h4OL0IHwY+c/Oh7CsGwj++RIDPTw647GFXlVSNZsr2RqJBzml7BVbLXQfmgHoN9r2gp26KYjIgwAfDE+p6n9SQbBuwKkRLxnXfbVVd0DtkPHvz8PaLKxVt1LsLPjHneflYyrUqHlZqeDJ0F5GOQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=mnRXXKmR; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mnRXXKmR" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-490bd64ca95so197115e9.0 for ; Mon, 08 Jun 2026 07:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1780928548; x=1781533348; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=NMlTDtSQVCRaIScLdU5LnPoxCDDHCuJqXKf3DYv7eY4=; b=mnRXXKmRdJyjVG0RfE3bjNQ4TlgczBKsrtCNel6OSYt4dlDhutqbx+KIgWX9n/b3gD 6HC+ROvEFUQAVvrM6fWV6NTlj4ysBbGnkAk9aYkSjsCouoMZEAiP/vnX3gzFE1yoUen7 reaEbcvBqeae4eOYo/uPqlnqojQEQNehp+XNbQ/obidLIC1YiGRFrqHK84ns9Eu2wpx2 hV7e74ah9OOxKlJFTuAuj9GU9LNTzx9Rw8COrwcpIhJrtuJnWL+5MQqfAq+IhbOpaCiF WvAk+gq2zWdP5jrgcqcqKfmhLyAd0AkciZbtAXWmgUTU0kfL9vlgtDPpsDa0lx95Aw/G +sKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780928548; x=1781533348; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NMlTDtSQVCRaIScLdU5LnPoxCDDHCuJqXKf3DYv7eY4=; b=EGeIPfUJm1ILd5GgXDNeLTOSy71389iAwNDLfFW8L7qPH2ljYytVshhKLFDO6YRVqw WGQCDUsEHlaFjS1OhkDvEjUjx+SkDSLWCuyhelyyuulMcCjVNmhpx9RyCoGWmeVkqYQF +HQYRJ+VLWKV679i2o40HVDrwClNtajclVpO/QyfPIVq5w0XbG39ZJqPC39LAHGHy2v6 LYnrhz7qT5dEIzJLVDKmdDmCVjeA+MSNnWKrVICzoytnHjVNBIDC/2dtGZI5NwD1I4qG jAHlxuTHxHR4Xtg0d3ODIViL16p/HasR6GP3I+fvJ74TlxJ/z6i1Yj3IgvbtdcnFKX6Q 25/g== X-Forwarded-Encrypted: i=1; AFNElJ/saztuLpAI+EYsm+kDOmqkpp/DZUpGgUqgZHMxdrgyBfS/Aa/biGwmOFDS3IIUN65/4aye3rUhnznIMTY=@vger.kernel.org X-Gm-Message-State: AOJu0YzJfvIeCmLfc35kONhv+f2IBoaMjrml8aeOaWtNsdAfS2vdciH0 cSiE1zETa3xfb2tbhg8pEnilpPMrTmHGzxhidnVyw7CoAI5QKtZqVmxT/sA/WFsD/A== X-Gm-Gg: Acq92OGY3N2sA+cmJXwZpqXIEUoUze60IiPZvRKiKQ1cDC5vkZa7ttCrjuhlnZbnFGO zgMfFlzUpO+XArjv/3va1dSq0PVHwCw4mvO4FVbzInXLgZsD/Oo6WVEATopM+dN5eDc/VmujD5g a2snWfAd7xX1pAMR0uXUr2Cg6Pf2bo12EPhiJk3eSPae7DHPYh4XKiLpAq6CB5t1p1XyqXUW53F di8DTItNH2oNBjyg8AjXtJbGD1sU3zj1G+N7KGO7OVj4gJHieX1nhP/O9IB3BFiB+S4xEtN9jL1 eiO+X3L9fFm5sg40+uEYgg8n/W+FCxjXrysN/sjGfu6lFkQ7syvNDJ8zwnLx9DnQPEUmRPE3eOB HovWzA0J+a6G9RIVFkE9B3U0HwGqPYqGQPUIefhCFYPj/HgVC+ZVxHVjuWl0OALxY9K8R+8uN8o YNVWOhY0t1kfkQ5KN3FFvNMGKSBNN6k1KM9kQrXc3uHxBabiGujRGAFNOtd+5dL/2TW7KOlTEUs MaVu8oz X-Received: by 2002:a05:600c:3299:b0:490:c2b6:de6c with SMTP id 5b1f17b1804b1-490c2c96beemr2993835e9.13.1780928547315; Mon, 08 Jun 2026 07:22:27 -0700 (PDT) Received: from google.com (143.11.148.146.bc.googleusercontent.com. [146.148.11.143]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f344541sm49486271f8f.22.2026.06.08.07.22.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2026 07:22:26 -0700 (PDT) Date: Mon, 8 Jun 2026 14:22:22 +0000 From: Sebastian Ene To: Will Deacon Cc: Marc Zyngier , 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 Subject: Re: [PATCH] KVM: arm64: Forward FFA_NOTIFICATION* calls to TrustZone Message-ID: References: <20260501114447.2389222-2-sebastianene@google.com> <86wlxgy00t.wl-maz@kernel.org> <86se83xrwx.wl-maz@kernel.org> <86qznnxptx.wl-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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