Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1728308pxj; Wed, 19 May 2021 12:28:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCS6SAO+vimFYbeVx0EhWvZ5cqTtxHo61g4or5we0KTIgy+2AZuuexMmB/2GxzRBMxRl65 X-Received: by 2002:a05:6e02:ea8:: with SMTP id u8mr649313ilj.67.1621452484751; Wed, 19 May 2021 12:28:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452484; cv=none; d=google.com; s=arc-20160816; b=Fzxgko56L0v7IyQXAYLs3AulAFlTwUbWqoCi0UuBufnWfN55iqYjFuUWvlLlz/p5KM GlBfXjITFmJzKXBqZYwM1cQzanFPhLl6vVurICsSRxOe1t455ArE60lVR8Gt+S1KH5jX eO3OC5DdSB5Z/chll8IhDZnJgeMtdh/OqWRdXQ723Y+RVbzyBk10uNQD0fnkAL1fWc5v TdxeHIZHrgM7RyFVBFJOOto9Kwhix5GZg66TULCzyhipgASSZTBOA7dlZjxk5Q9J0ioW VCk2cfFHmiewY3Kj+QsPh6G7kpSRNYqTsBLW/KZnPNUMRUBFO6QiHXjqoJa+buyOJQq9 OKdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=hGk2Jt4LTPzO1S2qngYtkz7Cl2+5Qs1xMzLMoopxFvM=; b=spQbsXg8DT3780fJQM2iQctWCXyRX0RSS96QyhNeEWZLh333Ib9qpJAtl5Sx3fm8vK Tcet6YyVsU6dc5PDi5/aS69D2BS6winO7Uo49GBCFt2U7Tj7Fmf5V7v1MWS2VGlMNkQH Jo41dSBf6V1jQmz3fUW0SIyxNymusPzUCJvQVKpNV/oD21TpFzeNdLHWcqgRJF+dD7Dc fRbDO5TE1tTxgKUQsFbFJG+zya+//qBL6WyXrUKnmAAypaB6StOjcUZQsYqZcCbnBzZD DnQEGGnR9bz8BB6l/4WVe8j3ksANIhauEgVd9lY3Z0p7Qs8wJ8xncYnIZ2yGorNKJ3kY 9K7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=ttyC7XAE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si224327jat.37.2021.05.19.12.27.52; Wed, 19 May 2021 12:28:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=ttyC7XAE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347760AbhESKS7 (ORCPT + 99 others); Wed, 19 May 2021 06:18:59 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:33420 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345378AbhESKS5 (ORCPT ); Wed, 19 May 2021 06:18:57 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 14JA5ATk111744; Wed, 19 May 2021 10:17:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=hGk2Jt4LTPzO1S2qngYtkz7Cl2+5Qs1xMzLMoopxFvM=; b=ttyC7XAEgInr/OmPK6WCkIceXQvVsWucEMfbcxdKhW/9z791xwEt+tjTFhTaqXeBLZY9 uNzvEUgitVBoYKI0x7sOkl9HH33B1MiWnotnr5QbsimtBXOQh62eVIexGWROYjejBULY lIlNLCpc8v7C+oymJs+erxTRYJaXkIX5wkxibCSrW/+IKbODJhmHlrjt6zd0jK3+J5Yb 8/WogueggqkrAFq3/Fk516fjwerQoBxH6vdFZ4RX3Rw8ELEq0j4pCcJqjTTPikNv1LTj nvUJKS+tR/BXssO/pOrWqkZT47wLQ6EO7wcVFZLAoK1fD4PXbcWBBlM/fFE1TCyD5u/O iA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 38j5qr93g5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 May 2021 10:17:19 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 14JA5w25046922; Wed, 19 May 2021 10:17:18 GMT Received: from pps.reinject (localhost [127.0.0.1]) by aserp3020.oracle.com with ESMTP id 38mechqq6n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 May 2021 10:17:18 +0000 Received: from aserp3020.oracle.com (aserp3020.oracle.com [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 14JAHH4o129654; Wed, 19 May 2021 10:17:17 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 38mechqq5r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 May 2021 10:17:17 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 14JAHFgb015636; Wed, 19 May 2021 10:17:15 GMT Received: from kadam (/41.212.42.34) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 19 May 2021 03:17:14 -0700 Date: Wed, 19 May 2021 13:17:04 +0300 From: Dan Carpenter To: Anup Patel Cc: Palmer Dabbelt , Palmer Dabbelt , Paul Walmsley , Albert Ou , Paolo Bonzini , Jonathan Corbet , Greg Kroah-Hartman , Alexander Graf , Atish Patra , Alistair Francis , Damien Le Moal , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH v18 02/18] RISC-V: Add initial skeletal KVM support Message-ID: <20210519101704.GT1955@kadam> References: <20210519033553.1110536-1-anup.patel@wdc.com> <20210519033553.1110536-3-anup.patel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210519033553.1110536-3-anup.patel@wdc.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-GUID: 6jRe5b4YCQkMwwXaSxJBXaR3mYMvI9hZ X-Proofpoint-ORIG-GUID: 6jRe5b4YCQkMwwXaSxJBXaR3mYMvI9hZ X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9988 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1015 impostorscore=0 mlxscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 adultscore=0 priorityscore=1501 spamscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105190071 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 19, 2021 at 09:05:37AM +0530, Anup Patel wrote: > +void kvm_riscv_stage2_free_pgd(struct kvm *kvm) > +{ > + /* TODO: */ > +} > + I was disappointed how many stub functions remained at the end of the patchset... It's better to not publish those. How useful is this patchset with the functionality that is implemented currently? > +int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) > +{ > + int r; > + > + r = kvm_riscv_stage2_alloc_pgd(kvm); > + if (r) > + return r; > + > + return 0; > +} Half the code uses "int ret;" and half uses "int r;". Make everything int ret. regards, dan carpenter