From: Thiago Jung Bauermann Date: Tue, 20 Aug 2019 03:04:33 +0000 Subject: Re: [PATCH v6 1/7] kvmppc: Driver to manage pages of secure guest Message-Id: <87ftlwwn9a.fsf@morokweng.localdomain> List-Id: References: <20190809084108.30343-1-bharata@linux.ibm.com> <20190809084108.30343-2-bharata@linux.ibm.com> In-Reply-To: <20190809084108.30343-2-bharata@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Bharata B Rao 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 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. -- Thiago Jung Bauermann IBM Linux Technology Center