From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1EA21C77B70 for ; Tue, 11 Apr 2023 14:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dC1T3HzFMqp3Us+eo7wEeXk0CKzf+Q5LKNSZvnhLa7M=; b=MgU34phVbS8KBI ulXVm+AlNzpO9WgXbCdwjlyjVCa/HHdBGq+q8Gn4PBwLWGzHD5Ythruw3Jt3yO4Zca3bcjaL2YAsj i89vB5PR3rIuhkn8EUTdEEKS9eu+Ve50myPQsJjzO1AAmombL5Z6Ny4HiBQ8eMggdNO4Yc/3X/TAs 8DWtsZz3r7eXTvwdn2TN3v0m6hjSaQOObYW0dq9v8IizyJTgCR79m6AXAYfqZ/kxEU8pZNkl0aoJl FIY43SlZO4Wd6GLDyZ3R5njKxU/B28UGzKs0U+TWVWfLPuxozYv6PNKioNkbdDUxH8j0AsXEZiH3R KrsK/9k7KLGZYVOxoYCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pmFD7-000II7-2P; Tue, 11 Apr 2023 14:43:05 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pmFD5-000IGt-0w for linux-arm-kernel@lists.infradead.org; Tue, 11 Apr 2023 14:43:04 +0000 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33BE27HU001769; Tue, 11 Apr 2023 14:42:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=DYrTTsi6pmN9A94wPsFhth7vjrkUJf81SgSUfgeVBE8=; b=PPTXM4Jvkqm4uvWdgnTRGkVdpPur7zfgqYXkUzhh/7IdjJ498T0dy3hKKy2imiCqx+Ix mSEJAX2Vw96PJvJuYyRIqo0hA6JwsUbHqUNFgP2QdRoWmlqJEI31vwiV7nWG57kx0PJB au2sASskDWEMMf0Q/tZM2liQNu9KJGxzp/j6og+Qpvz8sy4104vCTcYko3rBhhTmdxt0 T/T+TyxoQSmzD91XTg7kI6ywqE7sevPGvriIy30XUBt23Bf7+ak4GM5XgNACd42eMUfd 9fpliZaGxpydrtKC+8RIElSF3jRGhmG80/KEUXojsW9m2S+e5Qq9x+k8zSzrIIuJ9AlP zA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pw4usgjay-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Apr 2023 14:42:52 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 33BEgpaf007689 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Apr 2023 14:42:51 GMT Received: from [10.110.88.83] (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Tue, 11 Apr 2023 07:42:51 -0700 Message-ID: Date: Tue, 11 Apr 2023 07:42:50 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v2 0/2] Allow parameter in smc/hvc calls To: Sudeep Holla CC: , , , , , , References: <20230409181918.29270-1-quic_nkela@quicinc.com> <20230410182058.8949-1-quic_nkela@quicinc.com> <20230411130136.lkblyfg3jaeitzrt@bogus> Content-Language: en-US From: Nikunj Kela In-Reply-To: <20230411130136.lkblyfg3jaeitzrt@bogus> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: PU9PRoA4XNBy4Han5dNwok8o3_WkkY6X X-Proofpoint-ORIG-GUID: PU9PRoA4XNBy4Han5dNwok8o3_WkkY6X X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-11_10,2023-04-11_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304110134 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230411_074303_348732_DD15FB2F X-CRM114-Status: GOOD ( 25.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/11/2023 6:01 AM, Sudeep Holla wrote: > On Mon, Apr 10, 2023 at 11:20:56AM -0700, Nikunj Kela wrote: >> Currently, smc/hvc calls are made with parameters set >> to zeros. We are using multiple scmi instances within >> a VM and hypervisor associates a tag with each instance >> and expects the tag in hvc calls from that instance, while >> sharing the same smc-id(func_id) among the instances. >> >> This patch series introduces new optional dtb bindings which >> can be used to pass parameters to smc/hvc calls. >> > Just to be sure that I understood the problem(as your 2 parameters confused > me), this is just to help hypervisor/secure side to identify the right > channel/shared memory when the same SMC/HVC function id is shared right ? that's somewhat correct. Our hypervisor allocates 64bit ids on every boot for each scmi instance which it uses to identify the scmi instance. Additionally, our hypervisor also categorizes events within each instance by an event-id that gets passed to hvc call as second parameter. So we can pass two parameters in addition to function_id. > > If that is the case, why can't we just pass the shmem address as the > parameter ? I would like to avoid fragmentation here with every vendor > trying to do different things to achieve the same. that's a good suggestion. Any solution you propose shouldn't just limit to only one parameter. IMO, there should be some way to pass all 6 parameters since we do have a use case of at least two parameters. > > I would just change the driver to do that. Not sure if it breaks any existing > implementation or not. If it does, we can add another compatible to identify > one needing this fixed(shmem address) as additional parameter. > > Does that make sense at all ? Or am I missing some/all of the requirements > here ? The shmem proposal is fine however please also incorporate passing of other parameters. > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel