On 29/10/26 21:43, Kirill A. Korinsky wrote:
The xuseg and xsseg checks only tested UX and SX respectively; kernel
and supervisor accesses must instead use the mode bit that applies to
the current execution mode.

Allow supervisor and kernel mode to use xuseg when SX or KX is set, and
allow kernel mode to use xsseg when KX is set.

Indeed. I'll amend:

  Commit 480e79aedd32 ("target/mips: Implement segmentation control")
  fixed the xkphys path (switching it to a per-AM KX/SX/UX table) but
  left xuseg and xsseg exactly as they were, so the mode/extension-bit
  pairing stayed wrong for those two segments.


Signed-off-by: Kirill A. Korinsky <[email protected]>
---
  target/mips/system/physaddr.c | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>


Reply via email to