All of lore.kernel.org
 help / color / mirror / Atom feed
From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 07/10] ARM: KVM: fix ordering of 64bit coprocessor accesses
Date: Wed, 29 Jan 2014 12:07:57 -0800	[thread overview]
Message-ID: <20140129200757.GJ3570@cbox> (raw)
In-Reply-To: <1390402602-22777-8-git-send-email-marc.zyngier@arm.com>

On Wed, Jan 22, 2014 at 02:56:39PM +0000, Marc Zyngier wrote:
> Commit 240e99cbd00a (ARM: KVM: Fix 64-bit coprocessor handling)
> added an ordering dependency for the 64bit registers.
> 
> The order described is: CRn, CRm, Op1, Op2, 64bit-first.
> 
> Unfortunately, the implementation is: CRn, 64bit-first, CRm...
> 
> Move the 64bit test to be last in order to match the documentation.
> 
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---
>  arch/arm/kvm/coproc.h | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/kvm/coproc.h b/arch/arm/kvm/coproc.h
> index c5ad7ff..1a44bbe 100644
> --- a/arch/arm/kvm/coproc.h
> +++ b/arch/arm/kvm/coproc.h
> @@ -135,13 +135,13 @@ static inline int cmp_reg(const struct coproc_reg *i1,
>  		return -1;
>  	if (i1->CRn != i2->CRn)
>  		return i1->CRn - i2->CRn;
> -	if (i1->is_64 != i2->is_64)
> -		return i2->is_64 - i1->is_64;
>  	if (i1->CRm != i2->CRm)
>  		return i1->CRm - i2->CRm;
>  	if (i1->Op1 != i2->Op1)
>  		return i1->Op1 - i2->Op1;
> -	return i1->Op2 - i2->Op2;
> +	if (i1->Op2 != i2->Op2)
> +		return i1->Op2 - i2->Op2;
> +	return i2->is_64 - i1->is_64;
>  }
>  
>  
> @@ -153,4 +153,8 @@ static inline int cmp_reg(const struct coproc_reg *i1,
>  #define is64		.is_64 = true
>  #define is32		.is_64 = false
>  
> +bool access_sctlr(struct kvm_vcpu *vcpu,
> +		  const struct coproc_params *p,
> +		  const struct coproc_reg *r);
> +
>  #endif /* __ARM_KVM_COPROC_LOCAL_H__ */

stray hunk from other patch?

> -- 
> 1.8.3.4
> 

otherwise,

Thanks for fixing my broken fix, again,
FWIW: Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>

WARNING: multiple messages have this Message-ID (diff)
From: Christoffer Dall <christoffer.dall@linaro.org>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org
Subject: Re: [PATCH v2 07/10] ARM: KVM: fix ordering of 64bit coprocessor accesses
Date: Wed, 29 Jan 2014 12:07:57 -0800	[thread overview]
Message-ID: <20140129200757.GJ3570@cbox> (raw)
In-Reply-To: <1390402602-22777-8-git-send-email-marc.zyngier@arm.com>

On Wed, Jan 22, 2014 at 02:56:39PM +0000, Marc Zyngier wrote:
> Commit 240e99cbd00a (ARM: KVM: Fix 64-bit coprocessor handling)
> added an ordering dependency for the 64bit registers.
> 
> The order described is: CRn, CRm, Op1, Op2, 64bit-first.
> 
> Unfortunately, the implementation is: CRn, 64bit-first, CRm...
> 
> Move the 64bit test to be last in order to match the documentation.
> 
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---
>  arch/arm/kvm/coproc.h | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/kvm/coproc.h b/arch/arm/kvm/coproc.h
> index c5ad7ff..1a44bbe 100644
> --- a/arch/arm/kvm/coproc.h
> +++ b/arch/arm/kvm/coproc.h
> @@ -135,13 +135,13 @@ static inline int cmp_reg(const struct coproc_reg *i1,
>  		return -1;
>  	if (i1->CRn != i2->CRn)
>  		return i1->CRn - i2->CRn;
> -	if (i1->is_64 != i2->is_64)
> -		return i2->is_64 - i1->is_64;
>  	if (i1->CRm != i2->CRm)
>  		return i1->CRm - i2->CRm;
>  	if (i1->Op1 != i2->Op1)
>  		return i1->Op1 - i2->Op1;
> -	return i1->Op2 - i2->Op2;
> +	if (i1->Op2 != i2->Op2)
> +		return i1->Op2 - i2->Op2;
> +	return i2->is_64 - i1->is_64;
>  }
>  
>  
> @@ -153,4 +153,8 @@ static inline int cmp_reg(const struct coproc_reg *i1,
>  #define is64		.is_64 = true
>  #define is32		.is_64 = false
>  
> +bool access_sctlr(struct kvm_vcpu *vcpu,
> +		  const struct coproc_params *p,
> +		  const struct coproc_reg *r);
> +
>  #endif /* __ARM_KVM_COPROC_LOCAL_H__ */

stray hunk from other patch?

> -- 
> 1.8.3.4
> 

otherwise,

Thanks for fixing my broken fix, again,
FWIW: Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>

  reply	other threads:[~2014-01-29 20:07 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22 14:56 [PATCH v2 00/10] arm/arm64: KVM: host cache maintainance when guest caches are off Marc Zyngier
2014-01-22 14:56 ` Marc Zyngier
2014-01-22 14:56 ` [PATCH v2 01/10] arm64: KVM: force cache clean on page fault when " Marc Zyngier
2014-01-22 14:56   ` Marc Zyngier
2014-01-29 20:06   ` Christoffer Dall
2014-01-29 20:06     ` Christoffer Dall
2014-01-22 14:56 ` [PATCH v2 02/10] arm64: KVM: allows discrimination of AArch32 sysreg access Marc Zyngier
2014-01-22 14:56   ` Marc Zyngier
2014-01-29 20:06   ` Christoffer Dall
2014-01-29 20:06     ` Christoffer Dall
2014-01-22 14:56 ` [PATCH v2 03/10] arm64: KVM: trap VM system registers until MMU and caches are ON Marc Zyngier
2014-01-22 14:56   ` Marc Zyngier
2014-01-29 20:07   ` Christoffer Dall
2014-01-29 20:07     ` Christoffer Dall
2014-01-22 14:56 ` [PATCH v2 04/10] arm64: KVM: flush VM pages before letting the guest enable caches Marc Zyngier
2014-01-22 14:56   ` Marc Zyngier
2014-01-29 20:07   ` Christoffer Dall
2014-01-29 20:07     ` Christoffer Dall
2014-01-22 14:56 ` [PATCH v2 05/10] ARM: KVM: force cache clean on page fault when caches are off Marc Zyngier
2014-01-22 14:56   ` Marc Zyngier
2014-01-29 20:07   ` Christoffer Dall
2014-01-29 20:07     ` Christoffer Dall
2014-01-22 14:56 ` [PATCH v2 06/10] ARM: KVM: fix handling of trapped 64bit coprocessor accesses Marc Zyngier
2014-01-22 14:56   ` Marc Zyngier
2014-01-29 20:07   ` Christoffer Dall
2014-01-29 20:07     ` Christoffer Dall
2014-01-22 14:56 ` [PATCH v2 07/10] ARM: KVM: fix ordering of " Marc Zyngier
2014-01-22 14:56   ` Marc Zyngier
2014-01-29 20:07   ` Christoffer Dall [this message]
2014-01-29 20:07     ` Christoffer Dall
2014-01-22 14:56 ` [PATCH v2 08/10] ARM: KVM: introduce per-vcpu HYP Configuration Register Marc Zyngier
2014-01-22 14:56   ` Marc Zyngier
2014-01-29 20:08   ` Christoffer Dall
2014-01-29 20:08     ` Christoffer Dall
2014-01-22 14:56 ` [PATCH v2 09/10] ARM: KVM: trap VM system registers until MMU and caches are ON Marc Zyngier
2014-01-22 14:56   ` Marc Zyngier
2014-01-29 20:08   ` Christoffer Dall
2014-01-29 20:08     ` Christoffer Dall
2014-01-22 14:56 ` [PATCH v2 10/10] ARM: KVM: add world-switch for AMAIR{0,1} Marc Zyngier
2014-01-22 14:56   ` Marc Zyngier
2014-01-29 20:08   ` Christoffer Dall
2014-01-29 20:08     ` Christoffer Dall
2014-01-28 12:11 ` [PATCH v2 00/10] arm/arm64: KVM: host cache maintainance when guest caches are off Pranavkumar Sawargaonkar
2014-01-28 12:11   ` Pranavkumar Sawargaonkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140129200757.GJ3570@cbox \
    --to=christoffer.dall@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.