From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) (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 9269B3CBE75 for ; Tue, 16 Jun 2026 10:54:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781607267; cv=none; b=cYGeLHlPTEDtXjqv5UmRv7hIKEf4y0FuTqpP/+k8/Zoo5j7E4aSJKu7L8P40iaDur1hsH/0XgFevzugASToaF/swIRoo5y/uAbmLpIObmSj/jZwq1X4Ycqsx3pUifVAztd0LBISeoy7yQ7nogt5rjtLrgTIUjQDnK8uQfvU8OwY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781607267; c=relaxed/simple; bh=yo1C7Hud/AvWo2PT1z8B4266fJtRMwiYiQVNqQO5DeI=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=uiryJ+jeGCzytjUtPbXMFSHUUKYf5f8zVnzsoTWIFUhOZLLA4Q1Da4aKgC8LyRFZQDXzimDs06rKRgqilKR46Vs6wImbkasMNVEOsJgSQXwl511evMo6xYQCtjfN0gm9MreRYiCyV5TtB1X3SypFF+NBeOekyOAJOS2FNfv0m0g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--sebastianene.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=GYXAvhzS; arc=none smtp.client-ip=209.85.221.74 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=flex--sebastianene.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="GYXAvhzS" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-45ef697092fso3140186f8f.1 for ; Tue, 16 Jun 2026 03:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1781607263; x=1782212063; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=FV02eNruyFpNY0VqdlUhlXmfFOP3V4dDqxbZnj7/URY=; b=GYXAvhzSteO2Rk0u/g1ibLM4ptluksbG3rIeEX+BMbRWrWPq7lnUIPXnMOGCiM5fbR LDy3v4kNFT9+oyNyjvauj7mdf+AxMVtlNGJ6nKDeolgVF+BRvitzjCBw6i+cEmrNOd4i Sytl+nduP86bsW3r26kw4gVzXyyxkHdJNw5ORwjlAcG8SsJXmgOALHA563zC+ETRVWgg vzYfVJFjzvUU6gmsNI9lLtKHLBuFK88rIW+W6ZNFIL6aQDEBK/8Xqw4iJ4P27K4eQxi0 LJ3+OVl9d7kk3LTG7Trpny6GVRTL3vJA4haHQeMHNxTONtizFlwa+rG8kCTvbpvvnuUl Micg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781607263; x=1782212063; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=FV02eNruyFpNY0VqdlUhlXmfFOP3V4dDqxbZnj7/URY=; b=RHEc5axCYvX7g60tQadz1fk7weVnBMFBQY//gNFsPvipcpt3pYQtCUaC+pKJk7q+Ck 661rBE86pcny3FbRvkkT5JxLpyP2d1++1Q0CSYh1H7DzcYWtow121xuh0PA8nKNFSMA/ b4Zx3tR3M9Zce2GPw9YAWksp1uxnK+TydXhNUJGenRam3Nb+kc0KEA2GmQ6ozp0NbARZ uIpqJ3qKp8D5pRn1JOJ9ZX6QATcqt6mZ/PgvLzTXtOzt9gqdL7+oGUeJtSgLhxk0oIoD qnNifqJLWZ8Wkrmo0GiiU1LPj9G/+yf81b97kQoulLES9JMk6Q0M3rTGUH0/uWeAbU0r /ZQw== X-Forwarded-Encrypted: i=1; AFNElJ/Up2eqWu3+Lb3Ocr4+IZJQvSYtoGopdwdWZ/tL/KDSgSAhZ2/P9bmH2T0s1rsNWmkceOhcX1TBnuDDlx8=@vger.kernel.org X-Gm-Message-State: AOJu0Yy2U1jKuHX+K8Ih1y/Z6j3PrqZfB/vIKis98qj5m2aHd1rpWuPA Pc64zPXlnoaJUH/QyBcphJ6KxIapSJfhkdW5DinEooMSeRHQXR68uppuf6pZw8i28U/AATlwuAa jnDcVrMDHuVpOXnHlwkc+JgrtVTobOA== X-Received: from wrqd7.prod.google.com ([2002:adf:f847:0:b0:451:e1c2:5b4b]) (user=sebastianene job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2883:b0:45e:f8d0:d22c with SMTP id ffacd0b85a97d-4606dbde14emr27992139f8f.25.1781607262521; Tue, 16 Jun 2026 03:54:22 -0700 (PDT) Date: Tue, 16 Jun 2026 10:54:07 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.54.0.1136.gdb2ca164c4-goog Message-ID: <20260616105417.2578670-1-sebastianene@google.com> Subject: [PATCH v3 0/7] KVM: arm64: Forward FFA_NOTIFICATION* calls to TrustZone From: Sebastian Ene To: catalin.marinas@arm.com, maz@kernel.org, oupton@kernel.org, will@kernel.org Cc: 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, sebastianene@google.com, suzuki.poulose@arm.com, vdonnefort@google.com, yuzenghui@huawei.com Content-Type: text/plain; charset="UTF-8" Remove the FFA_NOTIFICATION* calls from the blocklist used by the pKVM FF-A proxy. This restriction was preventing the use of asynchronous signaling mechanisms defined by the Arm FF-A specification to communicate with the secure services. While these calls are markes as optional, there is no reason why the hypervisor proxy would block them because: 1. Host is the Sole Non-Secure Endpoint: The Host operates as the only Non-Secure VM ID (VM ID 0) recognized by the Secure World. Because all forwarded notifications are inherently attributed to the Host by the SPMC, there is no risk of VM ID spoofing originating from the Normal World. 2. No Memory Pointers or Addresses: The FFA_NOTIFICATION_* ABIs operate strictly via register-based parameters, passing only VM IDs, VCPU IDs, flags, and bitmaps. Because these calls do not contain memory addresses, offsets, or pointers, forwarding them doesn't pose a risk of memory-based confused deputy attack (e.g., tricking the SPMC into overwriting protected memory). While the pKVM proxy behaves as a relayer, it doesn't currently have its own FF-A ID(only the host has the ID 0). The behavior of the setup flow is covered by the spec in the: '10.9 Notification support without a Hypervisor'. --- Changes in v3: - applied Will's suggestion to use the introduced method ffa_check_unused_args_sbz for existing calls and added a new patch in the beggining of the series to do this. - merged the handling of FFA_NOTIFICATION_BITMAP_CREATE/FFA_NOTIFICATION_BITMAP_DESTROY into one patch as Vincent suggested and create one handler for both. Changes in v2: - enforce the MBZ/SBZ fields - split the calls into separate patches - rebase on 7.1-rc7 Link to v2: https://lore.kernel.org/all/20260608165549.1479409-1-sebastianene@google.com/ Link to v1: https://lore.kernel.org/all/20260501114447.2389222-2-sebastianene@google.com/ Sebastian Ene (7): KVM: arm64: Enforce strict SBZ checks in the FF-A proxy KVM: arm64: Forward FFA_NOTIFICATION_BITMAP calls to Trustzone KVM: arm64: Support FFA_NOTIFICATION_BIND in host handler KVM: arm64: Support FFA_NOTIFICATION_UNBIND in host handler KVM: arm64: Support FFA_NOTIFICATION_SET in host handler KVM: arm64: Support FFA_NOTIFICATION_GET in host handler KVM: arm64: Support FFA_NOTIFICATION_INFO_GET in host handler arch/arm64/kvm/hyp/nvhe/ffa.c | 205 ++++++++++++++++++++++++++++++++-- 1 file changed, 197 insertions(+), 8 deletions(-) -- 2.54.0.1136.gdb2ca164c4-goog