From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39C6316C87E; Wed, 24 Apr 2024 17:01:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713978117; cv=none; b=gzmAhahRR7V59SNGp7TwgR+Ct0IIFMgW5/5BDnX3p8o0hXcfMxV1KWilBAI7+gSQKFLiPm6lC2r35Lq2nTuUZUZSYBrAdqr1TqciTHVybHEja1w/LhzSlYAIClj7m43GtRl8YXJM477SXrMzfzC+AZ+sCE5eOjQXyiR+F+mG3nw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713978117; c=relaxed/simple; bh=8/c+EErr/LoDQQ0UswBCV688f9Qy+hEYoM2s16h4laE=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fxeIylQzjprmvUQC4Ww+uncFN9spfdFO1xXtt6AIheXGg+xHGBFury06WqO84eXtomaO80E9Q4e+cQmVUUvwctV2HqhceEzKF312j7I2DTTwFT6qhQ33RVLGjS+7H5t3eIEj0ndXUQ5jnxZ1PfYLlwimSx6m7il6QpVcbFk0G64= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=ckB/6Efj; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ckB/6Efj" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43OGr3rP025446; Wed, 24 Apr 2024 17:01:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=qcppdkim1; bh=v9LyJsiCVlAgeeEWeNcgp jCdd+MkEQSXTQEg+z9k3H4=; b=ckB/6EfjQU7QYRxLN63Tx+JX+zZrhrWKcyemC +z0P8/A3nyWPcmnf2SPzCY82w2DROkvZXqlYwQK3lyIjMJgB8HDAICO1dFUuZpj3 6g0WdGHdEGoKH3N4AcDhntJs47rkIsdcO+Ofp1iMWA3YpqWxHwqHr/31RfonbR6h +Rh87jJR8i+8uaYKFcQcjoRhYwjG13czzU8mvVp8D7X+shaHC3P7qFb6yHGhIQqf sAoPi731+YmyHGcGGu7VsFEtfblpNfm6xAnXZ2NxMaSFJp9u5xAEu0D7Z+hipLxF hdxCVjlSlDgdzCWYc1BY0DbeJljbyL1LoxblhlKbJOfANHT9Q== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xpv9e1kxr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 17:01:11 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43OH1BZa032159 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 17:01:11 GMT Received: from hu-eberman-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 24 Apr 2024 10:01:10 -0700 Date: Wed, 24 Apr 2024 10:01:10 -0700 From: Elliot Berman To: Srivatsa Vaddagiri CC: Alex Elder , Srinivas Kandagatla , Murali Nalajal , Trilok Soni , Carl van Schaik , Philip Derrin , Prakruthi Deepak Heragu , Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Konrad Dybcio , Bjorn Andersson , Dmitry Baryshkov , "Fuad Tabba" , Sean Christopherson , "Andrew Morton" , , , , , , Subject: Re: [PATCH v17 15/35] virt: gunyah: Add proxy-scheduled vCPUs Message-ID: <20240424095405136-0700.eberman@hu-eberman-lv.qualcomm.com> References: <20240222-gunyah-v17-0-1e9da6763d38@quicinc.com> <20240222-gunyah-v17-15-1e9da6763d38@quicinc.com> <20240424093957.GY440762@quicinc.com> Precedence: bulk X-Mailing-List: linux-arm-msm@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: <20240424093957.GY440762@quicinc.com> X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 89qGz_tE3OgnL4axkC5Pm979HLQTQNiv X-Proofpoint-ORIG-GUID: 89qGz_tE3OgnL4axkC5Pm979HLQTQNiv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_14,2024-04-24_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 adultscore=0 spamscore=0 impostorscore=0 phishscore=0 mlxscore=0 suspectscore=0 clxscore=1011 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404240073 On Wed, Apr 24, 2024 at 03:09:57PM +0530, Srivatsa Vaddagiri wrote: > * Elliot Berman [2024-02-22 15:16:38]: > > > +/** > > + * struct gunyah_vm_exit_info - Reason for VM exit as reported by Gunyah > > + * See Gunyah documentation for values. > > + * @type: Describes how VM exited > > + * @padding: padding bytes > > + * @reason_size: Number of bytes valid for `reason` > > + * @reason: See Gunyah documentation for interpretation. Note: these values are > > + * not interpreted by Linux and need to be converted from little-endian > > + * as applicable. > > + */ > > +struct gunyah_vm_exit_info { > > + __u16 type; > > Pls add an enum to describe the various exit types. > When I was first added the exit_info, I thought a bunch on whether to add the enum. I was thinking that if we add it to the UAPI, kernel need to parse and validate the values from RM. In the current scheme, I can leave it to userspace to interpret the value from RM. I could be convinced to go the other way though. Currently this is less code :) Let me know your thoughts! > > + __u16 padding; > > + __u32 reason_size; > > + __u8 reason[GUNYAH_VM_MAX_EXIT_REASON_SIZE]; If we start interpreting the @type, then maybe we should also start interpreting the @reason, and that will also add debt to the kernel driver. Thanks, Elliot 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 B5F8DC4345F for ; Wed, 24 Apr 2024 17:02:14 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CDg/nn/64RJqUHB1uNvrtM9mhyzmoBiLyaLYwwW+pGo=; b=V6vXlAZaSnQIzT shhsV9mk7PLNGaWYBX9nI1TdwUzfxOH8EZdY2yQkN2VEq68RI4/59ZiG/Suj1sGsKE9LdPbltjKF2 8/0PjyLcXEOt/ba8N/AXLL9shFaG9tiw3+w+fdHEZaTTWfR37Pk1W5WYgzY2cL4tVG1Ra34G6asD1 6Kjj3F3QmvFRfhJMlI55xPN83P5r2ZJDnSOsP1da2HGmknrwkQYKYnMf8lZ/66ilZcSDo+UJIfgQy 7Io7SI5/gBhc1R5XV0xeRuGNX65NwppSMyW1GFk1vyWWZS5Z4cRWBiWDBf9IMbvBUJViAC/sIUzYx ngyHdGqZPGoRZ5H+VAvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzg0K-000000053Vq-2bFt; Wed, 24 Apr 2024 17:01:56 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzg0H-000000053Og-3Zfb for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2024 17:01:55 +0000 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43OGr3rP025446; Wed, 24 Apr 2024 17:01:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=qcppdkim1; bh=v9LyJsiCVlAgeeEWeNcgp jCdd+MkEQSXTQEg+z9k3H4=; b=ckB/6EfjQU7QYRxLN63Tx+JX+zZrhrWKcyemC +z0P8/A3nyWPcmnf2SPzCY82w2DROkvZXqlYwQK3lyIjMJgB8HDAICO1dFUuZpj3 6g0WdGHdEGoKH3N4AcDhntJs47rkIsdcO+Ofp1iMWA3YpqWxHwqHr/31RfonbR6h +Rh87jJR8i+8uaYKFcQcjoRhYwjG13czzU8mvVp8D7X+shaHC3P7qFb6yHGhIQqf sAoPi731+YmyHGcGGu7VsFEtfblpNfm6xAnXZ2NxMaSFJp9u5xAEu0D7Z+hipLxF hdxCVjlSlDgdzCWYc1BY0DbeJljbyL1LoxblhlKbJOfANHT9Q== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xpv9e1kxr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 17:01:11 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43OH1BZa032159 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Apr 2024 17:01:11 GMT Received: from hu-eberman-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 24 Apr 2024 10:01:10 -0700 Date: Wed, 24 Apr 2024 10:01:10 -0700 From: Elliot Berman To: Srivatsa Vaddagiri CC: Alex Elder , Srinivas Kandagatla , Murali Nalajal , Trilok Soni , Carl van Schaik , Philip Derrin , Prakruthi Deepak Heragu , Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Konrad Dybcio , Bjorn Andersson , Dmitry Baryshkov , "Fuad Tabba" , Sean Christopherson , "Andrew Morton" , , , , , , Subject: Re: [PATCH v17 15/35] virt: gunyah: Add proxy-scheduled vCPUs Message-ID: <20240424095405136-0700.eberman@hu-eberman-lv.qualcomm.com> References: <20240222-gunyah-v17-0-1e9da6763d38@quicinc.com> <20240222-gunyah-v17-15-1e9da6763d38@quicinc.com> <20240424093957.GY440762@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240424093957.GY440762@quicinc.com> X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 89qGz_tE3OgnL4axkC5Pm979HLQTQNiv X-Proofpoint-ORIG-GUID: 89qGz_tE3OgnL4axkC5Pm979HLQTQNiv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-24_14,2024-04-24_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 adultscore=0 spamscore=0 impostorscore=0 phishscore=0 mlxscore=0 suspectscore=0 clxscore=1011 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404240073 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240424_100153_905767_709FDB3E X-CRM114-Status: GOOD ( 18.67 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Apr 24, 2024 at 03:09:57PM +0530, Srivatsa Vaddagiri wrote: > * Elliot Berman [2024-02-22 15:16:38]: > > > +/** > > + * struct gunyah_vm_exit_info - Reason for VM exit as reported by Gunyah > > + * See Gunyah documentation for values. > > + * @type: Describes how VM exited > > + * @padding: padding bytes > > + * @reason_size: Number of bytes valid for `reason` > > + * @reason: See Gunyah documentation for interpretation. Note: these values are > > + * not interpreted by Linux and need to be converted from little-endian > > + * as applicable. > > + */ > > +struct gunyah_vm_exit_info { > > + __u16 type; > > Pls add an enum to describe the various exit types. > When I was first added the exit_info, I thought a bunch on whether to add the enum. I was thinking that if we add it to the UAPI, kernel need to parse and validate the values from RM. In the current scheme, I can leave it to userspace to interpret the value from RM. I could be convinced to go the other way though. Currently this is less code :) Let me know your thoughts! > > + __u16 padding; > > + __u32 reason_size; > > + __u8 reason[GUNYAH_VM_MAX_EXIT_REASON_SIZE]; If we start interpreting the @type, then maybe we should also start interpreting the @reason, and that will also add debt to the kernel driver. Thanks, Elliot _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel