Re: [PATCH v6 1/7] kvmppc: Driver to manage pages of secure guest

2019-08-21 Thread Bharata B Rao
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

Re: [PATCH v6 1/7] kvmppc: Driver to manage pages of secure guest

2019-08-20 Thread Bharata B Rao
On Tue, Aug 20, 2019 at 04:22:15PM +1000, Suraj Jitindar Singh wrote: > On Fri, 2019-08-09 at 14:11 +0530, Bharata B Rao wrote: > > KVMPPC driver to manage page transitions of secure guest > > via H_SVM_PAGE_IN and H_SVM_PAGE_OUT hcalls. > > > > H_SVM_PAGE_IN: Move the content of a normal page to

Re: [PATCH v6 1/7] kvmppc: Driver to manage pages of secure guest

2019-08-20 Thread Suraj Jitindar Singh
On Fri, 2019-08-09 at 14:11 +0530, Bharata B Rao wrote: > KVMPPC driver to manage page transitions of secure guest > via H_SVM_PAGE_IN and H_SVM_PAGE_OUT hcalls. > > H_SVM_PAGE_IN: Move the content of a normal page to secure page > H_SVM_PAGE_OUT: Move the content of a secure page to normal page

Re: [PATCH v6 1/7] kvmppc: Driver to manage pages of secure guest

2019-08-19 Thread Thiago Jung Bauermann
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. > + * > + *

Re: [PATCH v6 1/7] kvmppc: Driver to manage pages of secure guest

2019-08-10 Thread Bharata B Rao
On Sat, Aug 10, 2019 at 12:58:19PM +0200, Christoph Hellwig wrote: > > > +int kvmppc_devm_init(void) > > +{ > > + int ret = 0; > > + unsigned long size; > > + struct resource *res; > > + void *addr; > > + > > + size = kvmppc_get_secmem_size(); > > + if (!size) { > > + ret =

Re: [PATCH v6 1/7] kvmppc: Driver to manage pages of secure guest

2019-08-10 Thread Christoph Hellwig
> +#ifdef CONFIG_PPC_UV > +extern unsigned long kvmppc_h_svm_page_in(struct kvm *kvm, > + unsigned long gra, > + unsigned long flags, > + unsigned long page_shift); > +extern unsigned

[PATCH v6 1/7] kvmppc: Driver to manage pages of secure guest

2019-08-09 Thread Bharata B Rao
KVMPPC driver to manage page transitions of secure guest via H_SVM_PAGE_IN and H_SVM_PAGE_OUT hcalls. H_SVM_PAGE_IN: Move the content of a normal page to secure page H_SVM_PAGE_OUT: Move the content of a secure page to normal page Private ZONE_DEVICE memory equal to the amount of secure memory