[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] d6be29: target-arm: handle address translatio

From: GitHub
Subject: [Qemu-commits] [qemu/qemu] d6be29: target-arm: handle address translations that start...
Date: Tue, 18 Nov 2014 02:30:05 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d6be29e3fb5659102ac0e48e295d177cb67e32c5
  Author: Peter Maydell <address@hidden>
  Date:   2014-11-17 (Mon, 17 Nov 2014)

  Changed paths:
    M target-arm/helper.c

  Log Message:
  target-arm: handle address translations that start at level 3

The ARMv8 address translation system defines that a page table walk
starts at a level which depends on the translation granule size
and the number of bits of virtual address that need to be resolved.
Where the translation granule is 64KB and the guest sets the
TCR.TxSZ field to between 35 and 39, it's actually possible to
start at level 3 (the final level). QEMU's implementation failed
to handle this case, and so we would set level to 2 and behave
incorrectly (including invoking the C undefined behaviour of
shifting left by a negative number). Correct the code that
determines the starting level to deal with the start-at-3 case,
by replacing the if-else ladder with an expression derived from
the ARM ARM pseudocode version.

This error was detected by the Coverity scan, which spotted
the potential shift by a negative number.

Signed-off-by: Peter Maydell <address@hidden>
Message-id: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]