Re: [PATCH V3 2/2] KVM: PPC: Implement H_SVM_INIT_ABORT hcall

2020-01-02 Thread Ram Pai
On Thu, Jan 02, 2020 at 04:32:33PM -0800, Sukadev Bhattiprolu wrote: > Ram Pai [linux...@us.ibm.com] wrote: > > > +unsigned long kvmppc_h_svm_init_abort(struct kvm *kvm) > > > +{ > > > + int i; > > > + > > > + if (!(kvm->arch.secure_guest & KVMPPC_SECURE_INIT_START)) > > > + return H_UNSUPP

RE: [PATCH kernel v2 4/4] powerpc/pseries/svm: Allow IOMMU to work in SVM

2020-01-02 Thread Ram Pai
On Fri, Jan 03, 2020 at 11:08:49AM +1100, David Gibson wrote: > On Thu, Jan 02, 2020 at 02:21:06PM -0800, Ram Pai wrote: > > On Mon, Dec 16, 2019 at 03:19:24PM +1100, Alexey Kardashevskiy wrote: > > > H_PUT_TCE_INDIRECT uses a shared page to send up to 512 TCE to > > > a hypervisor in a single hype

Re: [PATCH V3 2/2] KVM: PPC: Implement H_SVM_INIT_ABORT hcall

2020-01-02 Thread Sukadev Bhattiprolu
Ram Pai [linux...@us.ibm.com] wrote: > > +unsigned long kvmppc_h_svm_init_abort(struct kvm *kvm) > > +{ > > + int i; > > + > > + if (!(kvm->arch.secure_guest & KVMPPC_SECURE_INIT_START)) > > + return H_UNSUPPORTED; > > It should also return H_UNSUPPORTED when > (kvm->arch.secure_gue

Re: [PATCH V3 2/2] KVM: PPC: Implement H_SVM_INIT_ABORT hcall

2020-01-02 Thread Ram Pai
On Sat, Dec 14, 2019 at 06:12:08PM -0800, Sukadev Bhattiprolu wrote: > > Implement the H_SVM_INIT_ABORT hcall which the Ultravisor can use to > abort an SVM after it has issued the H_SVM_INIT_START and before the > H_SVM_INIT_DONE hcalls. This hcall could be used when Ultravisor > encounters secur

Re: [PATCH kernel v2 4/4] powerpc/pseries/svm: Allow IOMMU to work in SVM

2020-01-02 Thread David Gibson
On Thu, Jan 02, 2020 at 02:21:06PM -0800, Ram Pai wrote: > On Mon, Dec 16, 2019 at 03:19:24PM +1100, Alexey Kardashevskiy wrote: > > H_PUT_TCE_INDIRECT uses a shared page to send up to 512 TCE to > > a hypervisor in a single hypercall. > > Actually H_PUT_TCE_INDIRECT never used shared page. It wo

Re: [PATCH kernel v2 3/4] powerpc/pseries/iommu: Separate FW_FEATURE_MULTITCE to put/stuff features

2020-01-02 Thread Ram Pai
On Mon, Dec 16, 2019 at 03:19:23PM +1100, Alexey Kardashevskiy wrote: > H_PUT_TCE_INDIRECT allows packing up to 512 TCE updates into a single > hypercall; H_STUFF_TCE can clear lots in a single hypercall too. > > However, unlike H_STUFF_TCE (which writes the same TCE to all entries), > H_PUT_TCE_I

Re: [PATCH kernel v2 4/4] powerpc/pseries/svm: Allow IOMMU to work in SVM

2020-01-02 Thread Ram Pai
On Mon, Dec 16, 2019 at 03:19:24PM +1100, Alexey Kardashevskiy wrote: > H_PUT_TCE_INDIRECT uses a shared page to send up to 512 TCE to > a hypervisor in a single hypercall. Actually H_PUT_TCE_INDIRECT never used shared page. It would have used shared pages if the 'shared-page' solution was accept

Re: [PATCH kernel v2 2/4] powerpc/pseries: Allow not having ibm,hypertas-functions::hcall-multi-tce for DDW

2020-01-02 Thread Ram Pai
On Mon, Dec 16, 2019 at 03:19:22PM +1100, Alexey Kardashevskiy wrote: > By default a pseries guest supports a H_PUT_TCE hypercall which maps > a single IOMMU page in a DMA window. Additionally the hypervisor may > support H_PUT_TCE_INDIRECT/H_STUFF_TCE which update multiple TCEs at once; > this is

Re: [PATCH] powerpc: add support for folded p4d page tables

2020-01-02 Thread Christophe Leroy
Mike Rapoport a écrit : Any updates on this? Checkpatch reported several points, see https://patchwork.ozlabs.org/patch/1206344/ Christophe On Mon, Dec 09, 2019 at 05:09:08PM +0200, Mike Rapoport wrote: From: Mike Rapoport Implement primitives necessary for the 4th level folding, ad

[PATCH v3 02/22] compat: provide compat_ptr() on all architectures

2020-01-02 Thread Arnd Bergmann
In order to avoid needless #ifdef CONFIG_COMPAT checks, move the compat_ptr() definition to linux/compat.h where it can be seen by any file regardless of the architecture. Only s390 needs a special definition, this can use the self-#define trick we have elsewhere. Signed-off-by: Arnd Bergmann --

Re: [RFC PATCH v2 01/10] lib: vdso: ensure all arches have 32bit fallback

2020-01-02 Thread Arnd Bergmann
On Mon, Dec 30, 2019 at 1:27 PM Arnd Bergmann wrote: > On Mon, Dec 23, 2019 at 3:31 PM Christophe Leroy > wrote: > > +static __always_inline > > +long clock_getres32_fallback(clockid_t _clkid, struct old_timespec32 *_ts) > > +{ > > + struct __kernel_timespec ts; > > + int ret = clock

Re: [PATCH] powerpc: add support for folded p4d page tables

2020-01-02 Thread Mike Rapoport
Any updates on this? On Mon, Dec 09, 2019 at 05:09:08PM +0200, Mike Rapoport wrote: > From: Mike Rapoport > > Implement primitives necessary for the 4th level folding, add walks of p4d > level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. > > Signed-off-by: Mike Rapoport >