]> xenbits.xensource.com Git - xen.git/commit
xen/arm: vgic: Correctly emulate write when byte is used
authorJulien Grall <julien.grall@citrix.com>
Tue, 22 Sep 2015 20:18:48 +0000 (21:18 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 25 Sep 2015 12:37:08 +0000 (13:37 +0100)
commit9b147f96ae69cadafc853a544a7526b1740b053c
tree08360c474bec1b13c4cc7280ac0679a200d5809c
parentf72ab694c5a6143aac965e912351ae6350dd1089
xen/arm: vgic: Correctly emulate write when byte is used

When a guest is writing a byte, the value will be located in bits[7:0]
of the register.

Although the current implementation is expecting the byte at the Nth
byte of the register where N = address & 4;

When the address is not 4-byte aligned, the corresponding byte in the
internal state will always be set to zero rather.

Note that byte access are only used for GICD_IPRIORITYR and
GICD_ITARGETSR. So the worst things that could happen is not setting the
priority correctly and ignore the target vCPU written.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
(cherry picked from commit 3f214fea76acc6cbc1101fe1815cee795483a67d)
xen/include/asm-arm/vgic.h