From: Jan Kiszka <[email protected]> We must only mask in bits that are permitted according to access_mask. The current code cause troubles to the root cell when a non-root Linux instance was booting.
Signed-off-by: Jan Kiszka <[email protected]> --- Strange that this didn't cause problems with ARM64. On 32-bit, it froze the root cell very reliably. hypervisor/arch/arm/gic-common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hypervisor/arch/arm/gic-common.c b/hypervisor/arch/arm/gic-common.c index 60aa6fe..c74f30a 100644 --- a/hypervisor/arch/arm/gic-common.c +++ b/hypervisor/arch/arm/gic-common.c @@ -95,9 +95,8 @@ restrict_bitmask_access(struct mmio_access *mmio, unsigned int reg_index, mmio_perform_access(gicd_base, mmio); mmio->is_write = true; - /* Clear 0 bits */ - mmio->value &= ~(access_mask & ~access_val); - mmio->value |= access_val; + mmio->value &= ~access_mask; + mmio->value |= access_val & access_mask; mmio_perform_access(gicd_base, mmio); spin_unlock(&dist_lock); -- 2.1.4 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
