Fix typo that would fail to emulate a Thumb load/store with register writeback with a negative immediate. See sections A8.8.62 and A8.8.203 of the ARM ARM for details. Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx> --- arch/arm/kvm/emulate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kvm/emulate.c b/arch/arm/kvm/emulate.c index b4429de..4477e2f 100644 --- a/arch/arm/kvm/emulate.c +++ b/arch/arm/kvm/emulate.c @@ -433,7 +433,7 @@ static bool decode_thumb_wb(struct kvm_vcpu *vcpu, struct kvm_exit_mmio *mmio, /* Handle Writeback */ if (!P && U) *vcpu_reg(vcpu, Rn) = offset_addr + imm8; - else if (!P && U) + else if (!P && !U) *vcpu_reg(vcpu, Rn) = offset_addr - imm8; return true; } -- 1.7.12 _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm