Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp162826lqo; Wed, 15 May 2024 10:24:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjxMXYDxn6tSbFTwRhm4oDHONR65J47to7z4GDi9sMYDdAXXpegup8G+JA1UiLS8qGl1sWWkSMCTbuokUkb5hE/EfT8qtuE7T2F6jh9w== X-Google-Smtp-Source: AGHT+IGze48lVAzdcemV2jJ3ZnpBQAvUJwrCpPZCa6JTlF5eVg0tz9Xm7qvpNjZr/KmR3Yd4Xn+S X-Received: by 2002:a19:2d04:0:b0:51c:778f:b569 with SMTP id 2adb3069b0e04-5220fe7931fmr11467050e87.29.1715793853865; Wed, 15 May 2024 10:24:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715793853; cv=pass; d=google.com; s=arc-20160816; b=hPIwWIwOUVv96gAgn2w8s3u5+3Pt/HUJ/voGg/PajSnYrOHGS3CPWh2rUNKML2M2e7 BfZURpmOpE8H7FZ22qG3cDsXJbGZOU3GYKJ2+oE9NLnow/TuLtnRxJipm9/+JD/FZFBX HbAnGIlvA+dahuSmWiRGNDrx0TvYhn+jxUxF/2Mxgc0DO9zOhzNnshNcG4n+vlnIu63i n1W9wl0zqbSF7h/V0cYTG4A/kRPk5L/fgvIL4jJfphWyhG+TLZKS4biTlWqPdx59HnAB u7MAets5+Y+j0U7L4kE6qvrDsvl3GjRTZLe1QdS72An0jEgZ0iUMPH6Vl8aAFPhTBeXQ ZfBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=B0DAehK5iEGC7D6F2LaIGrwd7yaT6oZGo7c2srRK8ao=; fh=J9fiy3FYCPTK1e5G9PkLXUKPkO8ZlZyH1TcwfXVz4oM=; b=k7DXfNHFuobT5vX0ujiDRjpCrXwbtuCI7ogGAN97ECldSYo9wcacoByDqmS8MQ5sQB 5s/YwESfs1lXKoK7lhTtz5NV50fxE2a2d0veJzyogPediYJFDicvLj32d20LLCdbxyMW TYR57r6n8tL1gFTmXd/amb3V2E0PAc6reaje10F5IW2rKV9slYWHJGl4MNBSaU5dc48d +TSf0+8jHO7X4drK+p8NrIE90VobHVa85wJs7nWot6+1vZ2y2VCYQXry59/2Ax5dB2WI isUlH72kWy2w3mBiG/JT0x3+cbpGUr4a3xcLfM9CuIGsxdvPbaS8yKKGSkU0jzUJ9GKV Tv1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=F6H06BBm; arc=pass (i=1 spf=pass spfdomain=flex--sebastianene.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-180206-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180206-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17be68f0si784721166b.753.2024.05.15.10.24.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 10:24:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180206-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=F6H06BBm; arc=pass (i=1 spf=pass spfdomain=flex--sebastianene.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-180206-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180206-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8394A1F219B0 for ; Wed, 15 May 2024 17:24:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07300156F5C; Wed, 15 May 2024 17:23:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="F6H06BBm" Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (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 96A2F156C5E for ; Wed, 15 May 2024 17:23:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715793798; cv=none; b=ufNXCG3kg+83CTrsnf66oBu131d2Qir1B+FNCA7E8/zC/tYykmGpSASHrPnvILitCnGYt4Tvxpzsi8EcBWqPmFvlDGcxIsL4DJE1eUP/5IfClNREKuAtiLWl7qqqPAIlfSznlfPlJFsKG1YfxDfLtd9TiLyJb1cPRHasQ8rJ+DI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715793798; c=relaxed/simple; bh=27Ez01frh80qv0dCLE2nqGawXWJ0QpQYbc9jTyic+yQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Do3p64NrTAlqsZBYqinPMSsfgEjnHJT0GinbgCgjYP8aVs3rvRBpkuag1HWlUYFgdk5KeNolDQtt9XakdFN7qCMqukiZTGU4gYT/lSpGXqjezXhrTN9BtVuyv2LA25wYOoLg7Ge7ukqvg6nYCl8wP65wNo4UFTa6ziUNCaQQj9M= 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=F6H06BBm; arc=none smtp.client-ip=209.85.221.73 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 Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-351c67dbc8dso1280406f8f.2 for ; Wed, 15 May 2024 10:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715793795; x=1716398595; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=B0DAehK5iEGC7D6F2LaIGrwd7yaT6oZGo7c2srRK8ao=; b=F6H06BBmgGJtySJAGTI9CstNC2TckiLx4wv3qBKhisv2fNSudkvaWQgxh0BE3k9xfK f5pMf3YT9VuyfyA7UedpYgZmYsUOAqSh2AAvkL4EnutSsesyaYEm5omxYTdir/WXXs8+ 6GW1e/b6HvA9aBd0HiN2QQjwP6olXAwyCGn8hEDqon4pl/8U2v07F+3bA6qA3yrQuOyZ IzYyIwOu4EGkq3QX4IP9DGql0vhF6Bx6+2qLygLT2k3NycNpf9q/9yKNq6UFFsXLjIVW GRp7q8Bmokkkw1JZHxByoG2vuJKDatbrFsbpBVMM9o2Rxk84KMYoaMWYzw58EOSCQpHa 65kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715793795; x=1716398595; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=B0DAehK5iEGC7D6F2LaIGrwd7yaT6oZGo7c2srRK8ao=; b=l/ycjB3o0KMxxZUxNvlPzQFVliaXCEYfwo8aCnuNx/qzn4KzkEEnA3WvpxTy+FiA5B E17Ub4+MHgIJ5gWYAwCpm06hHLaasXC0U/EuF/hdikxbxPv9xPQf5eInmcoRru1hOd+F JUovF/0rTA2r5/S5lORGsjjtpIhYFnQkJUFTP3A1KVFOKn5gZkpak63Gz/azXXr25qUx HxDJR0sSbtYk6IPPiV509IGtNIsEJYjr8VE2af1TOQ2chvwKeSQ0fAXDqOpqQb4mqjk1 xlIXl/L4C1fPw121IyiN+aMETL8kPUeq7kXtTqTx8SUKHt6aFp3qgW+g2e+gPHw0MGvf 6Ehg== X-Forwarded-Encrypted: i=1; AJvYcCW4wWghVB7o5ozx7azYhoaj+Ey+XVGeGiGeEaBZVqCwNcYJO+Q4V9EaKrwsLZ03a6CboUeapm8iQiWxAqnGDSMMODgutbqkWMaflioO X-Gm-Message-State: AOJu0YwTdhuntMA2xAw64z4LrTRU33K4ohqOLbHLbC8aTl9HakVQORfp G3KJCBx2tfWbWwiJj8vQVI2UXxpFnlqt3ydBa4bHCa2k5Wes9mWGHYnvwvofhFEeNtth0+QKMm5 hfWhVVTXu8g9wcTQUZz2NfC5EbQ== X-Received: from sebkvm.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:cd5]) (user=sebastianene job=sendgmr) by 2002:a5d:4750:0:b0:34d:a979:e99b with SMTP id ffacd0b85a97d-3504a10f83dmr32508f8f.0.1715793794931; Wed, 15 May 2024 10:23:14 -0700 (PDT) Date: Wed, 15 May 2024 17:22:57 +0000 In-Reply-To: <20240515172258.1680881-1-sebastianene@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240515172258.1680881-1-sebastianene@google.com> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog Message-ID: <20240515172258.1680881-4-sebastianene@google.com> Subject: [PATCH v2 3/4] KVM: arm64: Fix the identification range for the FF-A smcs From: Sebastian Ene To: catalin.marinas@arm.com, james.morse@arm.com, jean-philippe@linaro.org, maz@kernel.org, oliver.upton@linux.dev, qperret@google.com, qwandor@google.com, sudeep.holla@arm.com, suzuki.poulose@arm.com, tabba@google.com, will@kernel.org, yuzenghui@huawei.com, lpieralisi@kernel.org Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-team@android.com, Sebastian Ene Content-Type: text/plain; charset="UTF-8" The FF-A spec 1.2 reserves the following ranges for identifying FF-A calls: 0x84000060-0x840000FF: FF-A 32-bit calls 0xC4000060-0xC40000FF: FF-A 64-bit calls. Use the range identification according to the spec and allow calls that are currently out of the range(eg. FFA_MSG_SEND_DIRECT_REQ2) to be identified correctly. Acked-by: Will Deacon Signed-off-by: Sebastian Ene --- arch/arm64/kvm/hyp/include/nvhe/ffa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp/include/nvhe/ffa.h b/arch/arm64/kvm/hyp/include/nvhe/ffa.h index d9fd5e6c7d3c..146e0aebfa1c 100644 --- a/arch/arm64/kvm/hyp/include/nvhe/ffa.h +++ b/arch/arm64/kvm/hyp/include/nvhe/ffa.h @@ -9,7 +9,7 @@ #include #define FFA_MIN_FUNC_NUM 0x60 -#define FFA_MAX_FUNC_NUM 0x7F +#define FFA_MAX_FUNC_NUM 0xFF int hyp_ffa_init(void *pages); bool kvm_host_ffa_handler(struct kvm_cpu_context *host_ctxt, u32 func_id); -- 2.45.0.rc1.225.g2a3ae87e7f-goog