> -----Original Message----- > From: Wood Scott-B07421 > Sent: Saturday, November 16, 2013 2:06 AM > To: Bhushan Bharat-R65777 > Cc: paulus@xxxxxxxxx; agraf@xxxxxxx; kvm-ppc@xxxxxxxxxxxxxxx; > kvm@xxxxxxxxxxxxxxx; Yoder Stuart-B08248; Bhushan Bharat-R65777 > Subject: Re: [PATCH 4/4 v3] kvm: powerpc: use caching attributes as per linux > pte > > On Fri, 2013-11-15 at 11:01 +0530, Bharat Bhushan wrote: > > @@ -440,9 +437,9 @@ static inline int kvmppc_e500_shadow_map(struct > kvmppc_vcpu_e500 *vcpu_e500, > > } > > > > if (likely(!pfnmap)) { > > - unsigned long tsize_pages = 1 << (tsize + 10 - PAGE_SHIFT); > > + tsize_pages = 1 << (tsize + 10 - PAGE_SHIFT); > > pfn = gfn_to_pfn_memslot(slot, gfn); > > - if (is_error_noslot_pfn(pfn)) { > > + if (is_error_noslot_pfn(pfn) && printk_ratelimit()) { > > printk(KERN_ERR "Couldn't get real page for gfn %lx!\n", > > (long)gfn); > > return -EINVAL; > > The "return -EINVAL" shouldn't be affected by printk_ratelimit(). Sent updated patch correcting this. I sent only this patch of the patch series hoping no more changed needed in previous patches :) -Bharat > > > @@ -453,7 +450,17 @@ static inline int kvmppc_e500_shadow_map(struct > kvmppc_vcpu_e500 *vcpu_e500, > > gvaddr &= ~((tsize_pages << PAGE_SHIFT) - 1); > > } > > > > - kvmppc_e500_ref_setup(ref, gtlbe, pfn); > > + > > + pgdir = vcpu_e500->vcpu.arch.pgdir; > > + ptep = lookup_linux_ptep(pgdir, hva, &tsize_pages); > > + if (pte_present(*ptep)) > > + wimg = (*ptep >> PTE_WIMGE_SHIFT) & MAS2_WIMGE_MASK; > > + else if (printk_ratelimit()) { > > + printk(KERN_ERR "%s: pte not present: gfn %lx, pfn %lx\n", > > + __func__, (long)gfn, pfn); > > + return -EINVAL; > > + } > > Likewise. > > -Scott > ��.n��������+%������w��{.n�����o�^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�