All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: arm64: Fix EC field in inject_abt64
@ 2016-05-16 12:54 ` Matt Evans
  0 siblings, 0 replies; 4+ messages in thread
From: Matt Evans @ 2016-05-16 12:54 UTC (permalink / raw)
  To: marc.zyngier, christoffer.dall; +Cc: nd, kvmarm, linux-arm-kernel

The EC field of the constructed ESR is conditionally modified by ORing in
ESR_ELx_EC_DABT_LOW for a data abort.  However, ESR_ELx_EC_SHIFT is missing
from this condition.

Signed-off-by: Matt Evans <matt.evans@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: <stable@vger.kernel.org>
---
 arch/arm64/kvm/inject_fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/inject_fault.c b/arch/arm64/kvm/inject_fault.c
index 4d1ac81..e9e0e6d 100644
--- a/arch/arm64/kvm/inject_fault.c
+++ b/arch/arm64/kvm/inject_fault.c
@@ -162,7 +162,7 @@ static void inject_abt64(struct kvm_vcpu *vcpu, bool is_iabt, unsigned long addr
 		esr |= (ESR_ELx_EC_IABT_CUR << ESR_ELx_EC_SHIFT);
 
 	if (!is_iabt)
-		esr |= ESR_ELx_EC_DABT_LOW;
+		esr |= ESR_ELx_EC_DABT_LOW << ESR_ELx_EC_SHIFT;
 
 	vcpu_sys_reg(vcpu, ESR_EL1) = esr | ESR_ELx_FSC_EXTABT;
 }
-- 
1.9.1

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

* [PATCH] kvm: arm64: Fix EC field in inject_abt64
@ 2016-05-16 12:54 ` Matt Evans
  0 siblings, 0 replies; 4+ messages in thread
From: Matt Evans @ 2016-05-16 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

The EC field of the constructed ESR is conditionally modified by ORing in
ESR_ELx_EC_DABT_LOW for a data abort.  However, ESR_ELx_EC_SHIFT is missing
from this condition.

Signed-off-by: Matt Evans <matt.evans@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: <stable@vger.kernel.org>
---
 arch/arm64/kvm/inject_fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/inject_fault.c b/arch/arm64/kvm/inject_fault.c
index 4d1ac81..e9e0e6d 100644
--- a/arch/arm64/kvm/inject_fault.c
+++ b/arch/arm64/kvm/inject_fault.c
@@ -162,7 +162,7 @@ static void inject_abt64(struct kvm_vcpu *vcpu, bool is_iabt, unsigned long addr
 		esr |= (ESR_ELx_EC_IABT_CUR << ESR_ELx_EC_SHIFT);
 
 	if (!is_iabt)
-		esr |= ESR_ELx_EC_DABT_LOW;
+		esr |= ESR_ELx_EC_DABT_LOW << ESR_ELx_EC_SHIFT;
 
 	vcpu_sys_reg(vcpu, ESR_EL1) = esr | ESR_ELx_FSC_EXTABT;
 }
-- 
1.9.1

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

* Re: [PATCH] kvm: arm64: Fix EC field in inject_abt64
  2016-05-16 12:54 ` Matt Evans
@ 2016-05-18 19:53   ` Christoffer Dall
  -1 siblings, 0 replies; 4+ messages in thread
From: Christoffer Dall @ 2016-05-18 19:53 UTC (permalink / raw)
  To: Matt Evans; +Cc: marc.zyngier, nd, kvmarm, linux-arm-kernel

On Mon, May 16, 2016 at 01:54:56PM +0100, Matt Evans wrote:
> The EC field of the constructed ESR is conditionally modified by ORing in
> ESR_ELx_EC_DABT_LOW for a data abort.  However, ESR_ELx_EC_SHIFT is missing
> from this condition.
> 
> Signed-off-by: Matt Evans <matt.evans@arm.com>
> Acked-by: Marc Zyngier <marc.zyngier@arm.com>
> Cc: <stable@vger.kernel.org>
> ---
>  arch/arm64/kvm/inject_fault.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kvm/inject_fault.c b/arch/arm64/kvm/inject_fault.c
> index 4d1ac81..e9e0e6d 100644
> --- a/arch/arm64/kvm/inject_fault.c
> +++ b/arch/arm64/kvm/inject_fault.c
> @@ -162,7 +162,7 @@ static void inject_abt64(struct kvm_vcpu *vcpu, bool is_iabt, unsigned long addr
>  		esr |= (ESR_ELx_EC_IABT_CUR << ESR_ELx_EC_SHIFT);
>  
>  	if (!is_iabt)
> -		esr |= ESR_ELx_EC_DABT_LOW;
> +		esr |= ESR_ELx_EC_DABT_LOW << ESR_ELx_EC_SHIFT;
>  
>  	vcpu_sys_reg(vcpu, ESR_EL1) = esr | ESR_ELx_FSC_EXTABT;
>  }
> -- 
> 1.9.1
> 

Applied to queue.

Thanks!
-Christoffer

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

* [PATCH] kvm: arm64: Fix EC field in inject_abt64
@ 2016-05-18 19:53   ` Christoffer Dall
  0 siblings, 0 replies; 4+ messages in thread
From: Christoffer Dall @ 2016-05-18 19:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 16, 2016 at 01:54:56PM +0100, Matt Evans wrote:
> The EC field of the constructed ESR is conditionally modified by ORing in
> ESR_ELx_EC_DABT_LOW for a data abort.  However, ESR_ELx_EC_SHIFT is missing
> from this condition.
> 
> Signed-off-by: Matt Evans <matt.evans@arm.com>
> Acked-by: Marc Zyngier <marc.zyngier@arm.com>
> Cc: <stable@vger.kernel.org>
> ---
>  arch/arm64/kvm/inject_fault.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kvm/inject_fault.c b/arch/arm64/kvm/inject_fault.c
> index 4d1ac81..e9e0e6d 100644
> --- a/arch/arm64/kvm/inject_fault.c
> +++ b/arch/arm64/kvm/inject_fault.c
> @@ -162,7 +162,7 @@ static void inject_abt64(struct kvm_vcpu *vcpu, bool is_iabt, unsigned long addr
>  		esr |= (ESR_ELx_EC_IABT_CUR << ESR_ELx_EC_SHIFT);
>  
>  	if (!is_iabt)
> -		esr |= ESR_ELx_EC_DABT_LOW;
> +		esr |= ESR_ELx_EC_DABT_LOW << ESR_ELx_EC_SHIFT;
>  
>  	vcpu_sys_reg(vcpu, ESR_EL1) = esr | ESR_ELx_FSC_EXTABT;
>  }
> -- 
> 1.9.1
> 

Applied to queue.

Thanks!
-Christoffer

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

end of thread, other threads:[~2016-05-18 19:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-16 12:54 [PATCH] kvm: arm64: Fix EC field in inject_abt64 Matt Evans
2016-05-16 12:54 ` Matt Evans
2016-05-18 19:53 ` Christoffer Dall
2016-05-18 19:53   ` Christoffer Dall

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.