From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buwdn-0008MU-0f for qemu-devel@nongnu.org; Fri, 14 Oct 2016 03:10:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buwdi-0007GG-N0 for qemu-devel@nongnu.org; Fri, 14 Oct 2016 03:10:49 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47159 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buwdi-0007G4-Gc for qemu-devel@nongnu.org; Fri, 14 Oct 2016 03:10:46 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9E792si143622 for ; Fri, 14 Oct 2016 03:10:46 -0400 Received: from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145]) by mx0b-001b2d01.pphosted.com with ESMTP id 262maxdt1s-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 14 Oct 2016 03:10:45 -0400 Received: from localhost by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Oct 2016 17:10:42 +1000 Date: Fri, 14 Oct 2016 12:40:34 +0530 From: Bharata B Rao Reply-To: bharata@linux.vnet.ibm.com References: <1476314039-9520-1-git-send-email-mdroth@linux.vnet.ibm.com> <1476314039-9520-3-git-send-email-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1476314039-9520-3-git-send-email-mdroth@linux.vnet.ibm.com> Message-Id: <20161014071034.GB28693@in.ibm.com> Subject: Re: [Qemu-devel] [PATCH 02/11] spapr_hcall: use spapr_ovec_* interfaces for CAS options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au, nfont@linux.vnet.ibm.com, jallen@linux.vnet.ibm.com On Wed, Oct 12, 2016 at 06:13:50PM -0500, Michael Roth wrote: > Currently we access individual bytes of an option vector via > ldub_phys() to test for the presence of a particular capability > within that byte. Currently this is only done for the "dynamic > reconfiguration memory" capability bit. If that bit is present, > we pass a boolean value to spapr_h_cas_compose_response() > to generate a modified device tree segment with the additional > properties required to enable this functionality. > > As more capability bits are added, will would need to modify the > code to add additional option vector accesses and extend the > param list for spapr_h_cas_compose_response() to include similar > boolean values for these parameters. > > Avoid this by switching to spapr_ovec_* helpers so we can do all > the parsing in one shot and then test for these additional bits > within spapr_h_cas_compose_response() directly. > > Cc: Bharata B Rao > Signed-off-by: Michael Roth Nicely done! Reviewed-by: Bharata B Rao Regards, Bharata.