From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bharata B Rao Date: Thu, 22 Aug 2019 03:41:15 +0000 Subject: Re: [PATCH v6 1/7] kvmppc: Driver to manage pages of secure guest Message-Id: <20190822032915.GA13625@in.ibm.com> List-Id: References: <20190809084108.30343-1-bharata@linux.ibm.com> <20190809084108.30343-2-bharata@linux.ibm.com> <87ftlwwn9a.fsf@morokweng.localdomain> In-Reply-To: <87ftlwwn9a.fsf@morokweng.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Thiago Jung Bauermann Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, linux-mm@kvack.org, paulus@au1.ibm.com, aneesh.kumar@linux.vnet.ibm.com, jglisse@redhat.com, linuxram@us.ibm.com, sukadev@linux.vnet.ibm.com, cclaudio@linux.ibm.com, hch@lst.de On Tue, Aug 20, 2019 at 12:04:33AM -0300, Thiago Jung Bauermann wrote: > > Hello Bharata, > > I have just a couple of small comments. > > Bharata B Rao writes: > > > +/* > > + * Get a free device PFN from the pool > > + * > > + * Called when a normal page is moved to secure memory (UV_PAGE_IN). Device > > + * PFN will be used to keep track of the secure page on HV side. > > + * > > + * @rmap here is the slot in the rmap array that corresponds to @gpa. > > + * Thus a non-zero rmap entry indicates that the corresonding guest > > Typo: corresponding > > > +static u64 kvmppc_get_secmem_size(void) > > +{ > > + struct device_node *np; > > + int i, len; > > + const __be32 *prop; > > + u64 size = 0; > > + > > + np = of_find_node_by_path("/ibm,ultravisor/ibm,uv-firmware"); > > + if (!np) > > + goto out; > > I believe that in general we try to avoid hard-coding the path when a > node is accessed and searched instead via its compatible property. Thanks, will switch to of_find_compatible_node(). Regards, Bharata.