From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 23BB6439F71; Mon, 17 Aug 2026 14:56:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786978607; cv=none; b=BsL1ZAodAJR1M+Cg7YcOJb/YwfD30hMn6avQ3ePkEgt4h5hnko+Kj6ireLQ9HM+/AQGaLYV2UT+qQj3IdZyA/0G16BuFj2DXXwh6ADEV9M6KXqc/ddb0H8t+akzc/p9zN3gvKJXHaiczWcegqQyh140unWxzUSQJAIv/PBKMB7A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786978607; c=relaxed/simple; bh=7dV1b0+NGUpOKXsz67zjTQC+6a3hvUjM7P7OhPtyxIE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BzcucLqv3lSZUH2bs3AwKs+FoS+hP2r0NTfU53Fuzup1JQWe2bsRDJs09hv91agicSrxEwlo7tbQHe2naUi8cTj/0S005JIzD+Qa5DqdYS6zgs7qMshHq2Qdxk1uGtaIj+YtiAhKkhXf5cQl6SnBh+MvAP4RHVCAEu1ToAcQblI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=q5wKL9yY; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="q5wKL9yY" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7E4E41655; Mon, 17 Aug 2026 07:56:41 -0700 (PDT) Received: from [10.57.6.69] (unknown [10.57.6.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4FE1C3F85F; Mon, 17 Aug 2026 07:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1786978605; bh=7dV1b0+NGUpOKXsz67zjTQC+6a3hvUjM7P7OhPtyxIE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=q5wKL9yYbuGRY/uGjrp33K0BjcVaRkndDml2ZllOx/okMsecfi5ciq2H+sGKap3oC NUkS+R6TSobgrDxcCGygOjo5lWeDdxj0chx0YrvZic/n1ZqD/avNmguzL0ZjzkSjin PlJZPTCryTIf522sTi+GLdO0M4W/LFndBPB9b6bQ= Message-ID: <4e0a7f4d-740f-47df-b601-1cfb0b79090e@arm.com> Date: Mon, 17 Aug 2026 15:56:35 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/6] firmware: arm_rmm: Add wrappers for direct RMI calls To: Will Deacon Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Catalin Marinas , Marc Zyngier , James Morse , Oliver Upton , Suzuki K Poulose , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni , Gavin Shan , Shanker Donthineni , Alper Gun , "Aneesh Kumar K . V" , Emi Kisanuki , Vishal Annapurve , WeiLin.Chang@arm.com, Lorenzo Pieralisi References: <20260715142739.80398-1-steven.price@arm.com> <20260715142739.80398-3-steven.price@arm.com> From: Steven Price Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 06/08/2026 12:53, Will Deacon wrote: > On Wed, Jul 15, 2026 at 03:27:33PM +0100, Steven Price wrote: >> The wrappers make the call sites easier to read and deal with the >> boilerplate of handling the error codes from the RMM. >> >> Signed-off-by: Steven Price >> --- >> Changes from v14: >> * Update to RMM v2.0-bet2 spec. >> * Move SRO related wrappers to a later patch due to dependencies. >> * Common wrappers are split into include/linux/arm-rmi-cmds.h. >> Changes from v13: >> * Update to RMM v2.0-bet1 spec including some SRO support (there still >> some FIXMEs where SRO support is incomplete). >> Changes from v12: >> * Update to RMM v2.0 specification >> Changes from v8: >> * Switch from arm_smccc_1_2_smc() to arm_smccc_1_2_invoke() in >> rmi_rtt_read_entry() for consistency. >> Changes from v7: >> * Minor renaming of parameters and updated comments >> Changes from v5: >> * Further improve comments >> Changes from v4: >> * Improve comments >> Changes from v2: >> * Make output arguments optional. >> * Mask RIPAS value rmi_rtt_read_entry() >> * Drop unused rmi_rtt_get_phys() >> --- >> arch/arm64/include/asm/rmi_cmds.h | 67 +++++++++++++++++++++++ > > This doesn't need to be in the arch code. Please work with Aneesh to put > this somewhere else. v16 moved the bulk of these to include/linux/arm-rmi-cmds.h [1] but left the KVM related ones in arch/arm64/include/asm/rmi_cmds.h [2]. Do you want me to move the KVM related ones out of arch code also? It seemed sensible to me to leave it in arch code because these RMI functions are only used by KVM arch code. Thanks, Steve [1] https://lore.kernel.org/r/20260803134403.80630-3-steven.price@arm.com [2] https://lore.kernel.org/r/20260803134403.80630-11-steven.price@arm.com