From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 1CFDE3AFAFA for ; Wed, 10 Jun 2026 08:53:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781081613; cv=none; b=Y3WWL95e53rQg0+EI7mAhPlSVFLYQmLp9zYA+szUnodgffwWRH5ZnD0hjl+t5OboM9NicGW9EFDg4JCtWJIt50pRZr+5Wx+SggLUI+twUSWQns+2In+E8c+/zIZBTtkO+Or0zxBiNHPHQQRzuwAKAtqK/OrYHTxqfF2feopRkS4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781081613; c=relaxed/simple; bh=5L9xLoN6772geBFt3Kjxn2zs2N6kNqKg+GZZ1XJXXRs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qXVoEQ4O12Y95GtH7f99mvTmnWatMxXykjSqAmX/nP6lWwoD30tPXjbq7ItkjE6E1pITgUPXElCZnj+L1j2RFLlh8CfHdg90Nn2bJb5w6ATwuCZSnDjYtDHsLiYH8NPiAIjeBQbki0i94y2axT7UHdfSiH3bnLKcXq/VeMsJGM8= 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=QG0cscWC; arc=none smtp.client-ip=209.85.218.50 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="QG0cscWC" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-befee9e5ef7so778060066b.0 for ; Wed, 10 Jun 2026 01:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1781081609; x=1781686409; 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=69R1izJHdq6eU+4kabS2mn4P5ih6+n31cQPINhDIjLU=; b=QG0cscWCVe6A6UG32tcgFFrSNdw2Q+Q3MjdYkL763XmGVyJ/T+/3dLGBseRE9xrU5q aSH6F1D5y46qYZRGWsdgKvwTt756j/L9kEgCAaDfgBnj/KTD1GQf9jQuzx1mTXBDdmun ryTzyfuyvYJFLMATcIxjwr6jRuUt7graAr2mvCei9VCRtZuzdvreZi46rt088en3Hs00 HgNc/i5Nia4bJKu+FEBnG4lq88TYIEI7i9WulfM8We8FYoztfyA2PAy6Wlp0t5bc8VIy tOzh27ipWHIdrqDIuWP7BZeYUoWc9j1msnnJ5RO4oeL90XaUDYVsUAdWIjDzTrfe8Ewc 39Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781081609; x=1781686409; 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=69R1izJHdq6eU+4kabS2mn4P5ih6+n31cQPINhDIjLU=; b=iqr+AM4euL+rcqHe8Fw6Um546LnzXoVj9u46Cy+2R0kuYLY8iMY5cvpXKl+KHI3fHy UfJq74L/agPYJhPvrKQGwYev8anR6eq6wMLIYRw3QQI7cwvMpAyhngPI70ySlUYOFKgi quAqO+qYoRAO+vsUu/kTnnPBgIyA3+tFJXHaXbcF7ynEF/CBpfJeuY25KEqs+spFowTs OOfVANA3sd9cLRwqgDNDRpiKUnl2MH7SjO/f2uV9vEwZlvfP2wOUqz3z6DPnk+GOt4NW HR5A053iF3eewyXOWJVIluKOZ8onsh79YpDXf7cp6uuhPcI9nDjOaoTtO78p1tuGsxDo l1+Q== X-Forwarded-Encrypted: i=1; AFNElJ+4IOOkuYd3R5ogLVLDBF6wFrm8OhB4OijY22aG3AaJh4r95gC9gv0tLy6wdVVxudSOu7HweONa37nB5D8=@vger.kernel.org X-Gm-Message-State: AOJu0YxQ5wd3J2TWaahXmM7dBEjO5ilzmdtcjcwXsTShhX+SdZAu9rWt 0BqpeELBY2tsm6HQtiXuGHhYQ0FuOMrj5IeG4TrjnsFLoCeoV2fxHyo5SwCMLrMHDg== X-Gm-Gg: Acq92OGGkULUPi7djhyZT1vy4zs4WizR+VlM8NaW9esF6bpI79+/HTRTDbmwy6APCZq 0ZL4ayiZGX5F1djpFB1OVRct3clvT+Yj0TRpc+hLHEkTAckKUQ93w3FR5XHcxHAUSRh9YhseGhH PMTbGsehGoJ5B2DQiCUo+4fBkO2LCO58TYVPCqDT30XyULcphzD5SoUay2wy9XdwTUHdIM9mryM k3hVuv+FfIzguzuVMUMLwEQWhc80/+SwnjbALU8/o2YfMDDezyKog6RBwnZp/FGUn0VWuu/Ksgi MnbTAqdN5/tn1kYd0KTEeVFFEsT149WN5FefCLgpyoRrte2V02U1tpEZJkPLKosuGSdrtKj0oFG Wblvgi7MzmcFod36be3GXcwfb8uu4AGYrMHv/bwrNC2vLrNYNOlRzVf8yAQfXGH3acypHA04sQO VVtVT3H4qzluY1OQf0d9SMmqxFfw/zXAlK/BEu47aDefg8n0MUyeG013BuVqt+NV8PtjKfGsg78 xbpmP50uTnG4YII X-Received: by 2002:a17:906:4fcd:b0:bec:436f:1857 with SMTP id a640c23a62f3a-bf3702817e4mr1205610366b.7.1781081608995; Wed, 10 Jun 2026 01:53:28 -0700 (PDT) Received: from google.com (135.91.155.104.bc.googleusercontent.com. [104.155.91.135]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bf0553040a7sm1153912066b.50.2026.06.10.01.53.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 01:53:28 -0700 (PDT) Date: Wed, 10 Jun 2026 09:53:24 +0100 From: Vincent Donnefort To: Sebastian Ene Cc: catalin.marinas@arm.com, maz@kernel.org, oupton@kernel.org, will@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, yuzenghui@huawei.com Subject: Re: [PATCH v2 2/7] KVM: arm64: Support FFA_NOTIFICATION_BITMAP_DESTROY in host handler Message-ID: References: <20260608165549.1479409-1-sebastianene@google.com> <20260608165549.1479409-3-sebastianene@google.com> 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: <20260608165549.1479409-3-sebastianene@google.com> On Mon, Jun 08, 2026 at 04:55:44PM +0000, Sebastian Ene wrote: > Allow FF-A notification bitmap destruction messages to be forwarded to > Trustzone from the host. > > Signed-off-by: Sebastian Ene > --- > arch/arm64/kvm/hyp/nvhe/ffa.c | 24 +++++++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/kvm/hyp/nvhe/ffa.c b/arch/arm64/kvm/hyp/nvhe/ffa.c > index c20d45191085..91e89d889c44 100644 > --- a/arch/arm64/kvm/hyp/nvhe/ffa.c > +++ b/arch/arm64/kvm/hyp/nvhe/ffa.c > @@ -688,7 +688,6 @@ static bool ffa_call_supported(u64 func_id) > case FFA_MEM_DONATE: > case FFA_MEM_RETRIEVE_REQ: > /* Optional notification interfaces added in FF-A 1.1 */ > - case FFA_NOTIFICATION_BITMAP_DESTROY: > case FFA_NOTIFICATION_BIND: > case FFA_NOTIFICATION_UNBIND: > case FFA_NOTIFICATION_SET: > @@ -893,6 +892,26 @@ static void do_ffa_notif_bitmap_create(struct arm_smccc_1_2_regs *res, > arm_smccc_1_2_smc(args, res); > } > > +static void do_ffa_notif_bitmap_destroy(struct arm_smccc_1_2_regs *res, > + struct kvm_cpu_context *ctxt) > +{ > + DECLARE_REG(u32, vmid, ctxt, 1); > + struct arm_smccc_1_2_regs *args; > + > + if (ffa_check_unused_args_sbz(ctxt, 2)) { > + ffa_to_smccc_res(res, FFA_RET_INVALID_PARAMETERS); > + return; > + } > + > + if (vmid != HOST_FFA_ID) { > + ffa_to_smccc_res(res, FFA_RET_INVALID_PARAMETERS); > + return; > + } > + > + args = (void *)&ctxt->regs.regs[0]; > + arm_smccc_1_2_smc(args, res); > +} Sounds exactly like do_ffa_notif_bitmap_create. Could we use a single one "do_ffa_notif_bitmap" ? > + > bool kvm_host_ffa_handler(struct kvm_cpu_context *host_ctxt, u32 func_id) > { > struct arm_smccc_1_2_regs res; > @@ -954,6 +973,9 @@ bool kvm_host_ffa_handler(struct kvm_cpu_context *host_ctxt, u32 func_id) > case FFA_NOTIFICATION_BITMAP_CREATE: > do_ffa_notif_bitmap_create(&res, host_ctxt); > goto out_handled; > + case FFA_NOTIFICATION_BITMAP_DESTROY: > + do_ffa_notif_bitmap_destroy(&res, host_ctxt); > + goto out_handled; > } > > if (ffa_call_supported(func_id)) > -- > 2.54.0.1064.gd145956f57-goog >