]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
arm: Fix byte-wise write access to GICD_ITARGETSRn
authorJan Kiszka <jan.kiszka@siemens.com>
Thu, 23 Jun 2016 06:31:02 +0000 (08:31 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Sun, 26 Jun 2016 07:16:27 +0000 (09:16 +0200)
While expanding byte accesses to full words, we forgot to adjust the
address as well. This led to unaligned word accesses on writes, followed
by hypervisor aborts.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/arm/gic-common.c

index a8ac4c7efb1ffe052f80597ff5ae879e3640d29b..51f6bee02c431d6d0331addb9f279f1b77bc0b33 100644 (file)
@@ -167,10 +167,10 @@ static enum mmio_result handle_irq_target(struct mmio_access *mmio,
        }
 
        /*
-        * The registers are byte-accessible, extend the access to a word if
-        * necessary.
+        * The registers are byte-accessible, but we always do word accesses.
         */
        offset = spi % 4;
+       mmio->address &= ~0x3;
        mmio->value <<= 8 * offset;
        mmio->size = 4;
        spi -= offset;