All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching atttribute
@ 2014-06-18 15:45 ` Mihai Caraman
  0 siblings, 0 replies; 8+ messages in thread
From: Mihai Caraman @ 2014-06-18 15:45 UTC (permalink / raw)
  To: kvm-ppc; +Cc: Bharat Bhushan, Mihai Caraman, linuxppc-dev, kvm

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@freescale.com>
Cc: Bharat Bhushan <bharat.bhushan@freescale.com>
---
 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

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching atttribute
@ 2014-06-18 15:45 ` Mihai Caraman
  0 siblings, 0 replies; 8+ messages in thread
From: Mihai Caraman @ 2014-06-18 15:45 UTC (permalink / raw)
  To: kvm-ppc; +Cc: Bharat Bhushan, Mihai Caraman, linuxppc-dev, kvm

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@freescale.com>
Cc: Bharat Bhushan <bharat.bhushan@freescale.com>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching atttribute
@ 2014-06-18 15:45 ` Mihai Caraman
  0 siblings, 0 replies; 8+ messages in thread
From: Mihai Caraman @ 2014-06-18 15:45 UTC (permalink / raw)
  To: kvm-ppc; +Cc: Bharat Bhushan, Mihai Caraman, linuxppc-dev, kvm

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@freescale.com>
Cc: Bharat Bhushan <bharat.bhushan@freescale.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* RE: [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching atttribute
  2014-06-18 15:45 ` Mihai Caraman
@ 2014-06-18 16:01   ` Bharat.Bhushan
  -1 siblings, 0 replies; 8+ messages in thread
From: Bharat.Bhushan @ 2014-06-18 16:01 UTC (permalink / raw)
  To: mihai.caraman, kvm-ppc; +Cc: kvm, linuxppc-dev, mihai.caraman



> -----Original Message-----
> From: Mihai Caraman [mailto:mihai.caraman@freescale.com]
> Sent: Wednesday, June 18, 2014 9:15 PM
> To: kvm-ppc@vger.kernel.org
> Cc: kvm@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; 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@freescale.com>
> Cc: Bharat Bhushan <bharat.bhushan@freescale.com>

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

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching atttribute
@ 2014-06-18 16:01   ` Bharat.Bhushan
  0 siblings, 0 replies; 8+ messages in thread
From: Bharat.Bhushan @ 2014-06-18 16:01 UTC (permalink / raw)
  To: mihai.caraman, kvm-ppc; +Cc: mihai.caraman, linuxppc-dev, kvm



> -----Original Message-----
> From: Mihai Caraman [mailto:mihai.caraman@freescale.com]
> Sent: Wednesday, June 18, 2014 9:15 PM
> To: kvm-ppc@vger.kernel.org
> Cc: kvm@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Caraman Mihai Cla=
udiu-
> B02008; Bhushan Bharat-R65777
> Subject: [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching
> atttribute
>=20
> 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.
>=20
> In case of an error go to out label.
>=20
> Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
> Cc: Bharat Bhushan <bharat.bhushan@freescale.com>

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

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

Regards
-Bharat

> ---
>  arch/powerpc/kvm/e500_mmu_host.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>=20
> 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 =3D -EINVAL;
> +		goto out;
>  	}
>  	kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg);
>=20
> --
> 1.7.11.7

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching atttribute
  2014-06-18 15:45 ` Mihai Caraman
  (?)
@ 2014-06-24 13:39   ` Alexander Graf
  -1 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2014-06-24 13:39 UTC (permalink / raw)
  To: Mihai Caraman, kvm-ppc; +Cc: kvm, linuxppc-dev, Bharat Bhushan


On 18.06.14 17:45, Mihai Caraman wrote:
> 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@freescale.com>
> Cc: Bharat Bhushan <bharat.bhushan@freescale.com>

Thanks, applied to for-3.16.


Alex


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching atttribute
@ 2014-06-24 13:39   ` Alexander Graf
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2014-06-24 13:39 UTC (permalink / raw)
  To: Mihai Caraman, kvm-ppc; +Cc: Bharat Bhushan, linuxppc-dev, kvm


On 18.06.14 17:45, Mihai Caraman wrote:
> 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@freescale.com>
> Cc: Bharat Bhushan <bharat.bhushan@freescale.com>

Thanks, applied to for-3.16.


Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching atttribute
@ 2014-06-24 13:39   ` Alexander Graf
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2014-06-24 13:39 UTC (permalink / raw)
  To: Mihai Caraman, kvm-ppc; +Cc: kvm, linuxppc-dev, Bharat Bhushan


On 18.06.14 17:45, Mihai Caraman wrote:
> 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@freescale.com>
> Cc: Bharat Bhushan <bharat.bhushan@freescale.com>

Thanks, applied to for-3.16.


Alex


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-06-24 13:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18 15:45 [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching atttribute Mihai Caraman
2014-06-18 15:45 ` Mihai Caraman
2014-06-18 15:45 ` Mihai Caraman
2014-06-18 16:01 ` Bharat.Bhushan
2014-06-18 16:01   ` Bharat.Bhushan
2014-06-24 13:39 ` Alexander Graf
2014-06-24 13:39   ` Alexander Graf
2014-06-24 13:39   ` Alexander Graf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.