Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp584053lqd; Wed, 24 Apr 2024 10:38:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXi2KEtP3d01ul/eMqK9736h/l09aKQ+ysslHd7ztq5PWAGhVN9xZvvc+/tVPBAkLO254X3Ln6Q8nOINx+HISBur2sVSRZGtxKMGolYew== X-Google-Smtp-Source: AGHT+IGrGa9bBMJKhg53OX97dauhrf2PYwxOCNtx/HZ8ZB0WEFZSDSS93hzlMp/i4b1opFl7p6dT X-Received: by 2002:a17:903:41d0:b0:1e9:2d03:7c5d with SMTP id u16-20020a17090341d000b001e92d037c5dmr4237239ple.47.1713980297966; Wed, 24 Apr 2024 10:38:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713980297; cv=pass; d=google.com; s=arc-20160816; b=AQHX5TAWCuosCRexXZNZUJja+kZd3AilTKOkq7Q03E/uo8cidxkFzzTbKexHNX7c7N VJJYWAAP6W1YV8TlWoeQMkGzUn912QumnjrAoqqMLx3bZkOm/pAyDYywyi4FK6sV7ska R2RIJKZ0+XDAq1HiQNeEFZnTQDLncDZKZMLH428tzDwPW7fwnmvLncv7UD9H/+soEBTK 0QUNW4/EUyrWuSf0/IYEUZuJfVlOdfBkQzu6r0j53ql0yQX6A0PsM/H0aHE8b9OBUw2Q WwA+fIDBCGraujRa4H17bwk4UqIkZ/598HplJ0VC//bGAIv6kVW7VPNYF8HPbxuv1uQn spcg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=v9LyJsiCVlAgeeEWeNcgpjCdd+MkEQSXTQEg+z9k3H4=; fh=wP+/4A79eedu3kBMxCEN8oJtVg2xMujkfpUpj4Wcrz8=; b=dKi/2CWRgnJxMeKKa94WUMlb/f+tsv7Tt333d74p3fxMXwzZidrtOH4N7SFFpQapvy 9X5IpdSWLF019JYlnOkm8iH/XSniFsVlUu+g5NjXPy7wtOGw5nMw7lThPeKnvoURBR12 3sa0rUOZT1fuBcNoJwQEQrOjvTi2Jr8UFxg2t3uDJvcvs0Xgury9vKRLT9InOtVoZ7hl wpoLB9STeAlUU035CdPcHKHpPtjDKz8BhJt+RgH7gfktNRBr4U8HbP/BkOvx5fAPKrk+ YEBW2QpO57rehUU2ymFEj1uOYcxnaf4nv25DjjYBfj0XjW0b5hN4i/Qi8+18ht1G9JcA XKJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="ckB/6Efj"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-157366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157366-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id j6-20020a170903024600b001e813d8b0c0si11441000plh.124.2024.04.24.10.38.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 10:38:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="ckB/6Efj"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-157366-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157366-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 045B9B26A1C for ; Wed, 24 Apr 2024 17:02:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E4E016D324; Wed, 24 Apr 2024 17:01:58 +0000 (UTC) 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 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 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-kernel@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