RE: [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching atttribute

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

 




> -----Original Message-----
> From: Mihai Caraman [mailto:mihai.caraman@xxxxxxxxxxxxx]
> Sent: Wednesday, June 18, 2014 9:15 PM
> To: kvm-ppc@xxxxxxxxxxxxxxx
> Cc: kvm@xxxxxxxxxxxxxxx; linuxppc-dev@xxxxxxxxxxxxxxxx; Caraman Mihai Claudiu-
> B02008; Bhushan Bharat-R65777
> Subject: [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching
> atttribute
> 
> The patch 08c9a188d0d0fc0f0c5e17d89a06bb59c493110f
>   	kvm: powerpc: use caching attributes as per linux pte
> do not handle properly the error case, letting mmu_lock locked. The lock
> will further generate a RCU stall from kvmppc_e500_emul_tlbwe() caller.
> 
> In case of an error go to out label.
> 
> Signed-off-by: Mihai Caraman <mihai.caraman@xxxxxxxxxxxxx>
> Cc: Bharat Bhushan <bharat.bhushan@xxxxxxxxxxxxx>

Thanks mike for fixing this; I am curious to know how you reached to this point :)

Reviewed-by: Bharat Bhushan <bharat.bhushan@xxxxxxxxxxxxx>

Regards
-Bharat

> ---
>  arch/powerpc/kvm/e500_mmu_host.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c
> index 0528fe5..54144c7 100644
> --- a/arch/powerpc/kvm/e500_mmu_host.c
> +++ b/arch/powerpc/kvm/e500_mmu_host.c
> @@ -473,7 +473,8 @@ static inline int kvmppc_e500_shadow_map(struct
> kvmppc_vcpu_e500 *vcpu_e500,
>  		if (printk_ratelimit())
>  			pr_err("%s: pte not present: gfn %lx, pfn %lx\n",
>  				__func__, (long)gfn, pfn);
> -		return -EINVAL;
> +		ret = -EINVAL;
> +		goto out;
>  	}
>  	kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg);
> 
> --
> 1.7.11.7

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