Re: [PATCH 4/4 v3] kvm: powerpc: use caching attributes as per linux pte

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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().

> @@ -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



--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux