public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] ARM64: KVM: store kvm_vcpu_fault_info est_el2 as word
Date: Wed, 19 Mar 2014 20:41:49 -0700	[thread overview]
Message-ID: <20140320034149.GS1297@cbox> (raw)
In-Reply-To: <1392184643-6108-4-git-send-email-victor.kamensky@linaro.org>

On Tue, Feb 11, 2014 at 09:57:21PM -0800, Victor Kamensky wrote:
> esr_el2 field of struct kvm_vcpu_fault_info has u32 type.
> It should be stored as word. Current code works in LE case
> because existing puts least significant word of x1 into
> esr_el2, and it puts most significant work of x1 into next
> field, which accidentally is OK because it is updated again
> by next instruction. But existing code breaks in BE case.
> 
> Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
> ---
>  arch/arm64/kvm/hyp.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S
> index 3b47c36..104216c 100644
> --- a/arch/arm64/kvm/hyp.S
> +++ b/arch/arm64/kvm/hyp.S
> @@ -801,7 +801,7 @@ el1_trap:
>  	mrs	x2, far_el2
>  
>  2:	mrs	x0, tpidr_el2
> -	str	x1, [x0, #VCPU_ESR_EL2]
> +	str	w1, [x0, #VCPU_ESR_EL2]
>  	str	x2, [x0, #VCPU_FAR_EL2]
>  	str	x3, [x0, #VCPU_HPFAR_EL2]
>  
> -- 
> 1.8.1.4
> 

Ouch,

Acked-by: Christoffer Dall <christoffer.dall@linaro.org>

  reply	other threads:[~2014-03-20  3:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12  5:57 [PATCH 0/5] aarch64 BE kvm support Victor Kamensky
2014-02-12  5:57 ` [PATCH 1/5] ARM64: KVM: MMIO support BE host running LE code Victor Kamensky
2014-03-20  3:41   ` Christoffer Dall
2014-02-12  5:57 ` [PATCH 2/5] ARM64: KVM: set and get of sys registers in BE case Victor Kamensky
2014-03-20  3:41   ` Christoffer Dall
2014-02-12  5:57 ` [PATCH 3/5] ARM64: KVM: store kvm_vcpu_fault_info est_el2 as word Victor Kamensky
2014-03-20  3:41   ` Christoffer Dall [this message]
2014-02-12  5:57 ` [PATCH 4/5] ARM64: KVM: vgic_elrsr and vgic_eisr need to be byteswapped in BE case Victor Kamensky
2014-02-12  7:15   ` Alexander Graf
2014-03-20  3:42   ` Christoffer Dall
2014-02-12  5:57 ` [PATCH 5/5] ARM64: KVM: fix vgic_bitmap_get_reg function for BE 64bit case Victor Kamensky
2014-03-20  3:43   ` Christoffer Dall

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=20140320034149.GS1297@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox