xen/arm64: Decode ldr/str post increment operations
authorAyan Kumar Halder <ayan.kumar.halder@xilinx.com>
Thu, 10 Mar 2022 17:44:58 +0000 (17:44 +0000)
committerJulien Grall <jgrall@amazon.com>
Mon, 14 Mar 2022 17:58:04 +0000 (17:58 +0000)
commitf9dd8436e3b826e4ca2284effa4c0285527ea763
treeaf486389e5d1d5b9935a0cb7d0894872a19aaba7
parentdedb0aa42c6d1ee31805dfc61630db2c41117330
xen/arm64: Decode ldr/str post increment operations

At the moment, Xen does not decode any of the arm64 instructions. This
means that when hsr_dabt.isv == 0, Xen cannot handle those instructions.
This will lead to Xen to abort the guests (from which those instructions
originate).

With this patch, Xen is able to decode ldr/str post indexing instructions.
These are a subset of instructions for which hsr_dabt.isv == 0.

The following instructions are now supported by Xen :-
1.      ldr     x2,    [x1],    #8
2.      ldr     w2,    [x1],    #-4
3.      ldr     x2,    [x1],    #-8
4.      ldr     w2,    [x1],    #4
5.      ldrh    w2,    [x1],    #2
6.      ldrb    w2,    [x1],    #1
7.      str     x2,    [x1],    #8
8.      str     w2,    [x1],    #-4
9.      strh    w2,    [x1],    #2
10.     strb    w2,    [x1],    #1

In the subsequent patch, decode_arm64() will get invoked when
hsr_dabt.isv == 0.

Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/decode.c
xen/arch/arm/decode.h
xen/arch/arm/include/asm/mmio.h
xen/arch/arm/io.c