qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 324189: target/sh4: log unauthorized accesses


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 324189: target/sh4: log unauthorized accesses using qemu_l...
Date: Thu, 01 Jun 2017 07:01:56 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 324189babbc0b70d9ce558deb63d33040d002b7a
      
https://github.com/qemu/qemu/commit/324189babbc0b70d9ce558deb63d33040d002b7a
  Author: Aurelien Jarno <address@hidden>
  Date:   2017-05-30 (Tue, 30 May 2017)

  Changed paths:
    M target/sh4/helper.c

  Log Message:
  -----------
  target/sh4: log unauthorized accesses using qemu_log_mask

qemu_log_mask() is preferred over fprintf() for logging errors.

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>


  Commit: 73479c5c87bf431c6344a80ab01456ed979447f1
      
https://github.com/qemu/qemu/commit/73479c5c87bf431c6344a80ab01456ed979447f1
  Author: Aurelien Jarno <address@hidden>
  Date:   2017-05-30 (Tue, 30 May 2017)

  Changed paths:
    M target/sh4/helper.c

  Log Message:
  -----------
  target/sh4: fix reset when using a kernel and an initrd

When a masked exception happens, the SH4 CPU generates a non-masked
reset exception, which then jumps to the reset vector at address
0xA0000000. While this is emulated correctly in QEMU, this does not
work when using a kernel and initrd as this address then contain an
illegal instruction (and there is no guarantee the kernel and initrd
haven't been overwritten).

Therefore call qemu_system_reset_request to reload the kernel and initrd
and load the program counter to the kernel entry point.

Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>


  Commit: 9a562ae7ba0cadacd2fe2c8c895b0840556b978f
      
https://github.com/qemu/qemu/commit/9a562ae7ba0cadacd2fe2c8c895b0840556b978f
  Author: Aurelien Jarno <address@hidden>
  Date:   2017-05-30 (Tue, 30 May 2017)

  Changed paths:
    M target/sh4/cpu.h
    M target/sh4/helper.c
    M target/sh4/translate.c

  Log Message:
  -----------
  target/sh4: introduce DELAY_SLOT_MASK

This will make easier the introduction of a new flag in the next
patches.

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>


  Commit: 5c6f3eb7db478fe988d8419c191fe388c6cf5194
      
https://github.com/qemu/qemu/commit/5c6f3eb7db478fe988d8419c191fe388c6cf5194
  Author: Aurelien Jarno <address@hidden>
  Date:   2017-05-30 (Tue, 30 May 2017)

  Changed paths:
    M target/sh4/helper.c

  Log Message:
  -----------
  target/sh4: ignore interrupts in a delay slot

Delay slots are indivisible, therefore avoid scheduling an interrupt in
the delay slot. However exceptions are possible.

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>


  Commit: be53081a619443dc4512039d89345475ef7d9a46
      
https://github.com/qemu/qemu/commit/be53081a619443dc4512039d89345475ef7d9a46
  Author: Aurelien Jarno <address@hidden>
  Date:   2017-05-30 (Tue, 30 May 2017)

  Changed paths:
    M target/sh4/cpu.h
    M target/sh4/translate.c

  Log Message:
  -----------
  target/sh4: fix RTE instruction delay slot

The ReTurn from Exception (RTE) instruction loads the system register
(SR) with the saved system register (SSR). It has a delay slot, and
behaves specially according to the SH4 manual:

  The SR value accessed by the instruction in the RTE delay slot is the
  value restored from SSR by the RTE instruction. The SR and MD values
  defined prior to RTE execution are used to fetch the instruction in
  the RTE delay slot.

The instruction in the delay slot being often a NOP, it doesn't cause
any issue most of the time except in some rare cases where the NOP is
being splitted in a different TB (for example when the TCG op buffer
is full). In that case the NOP is fetched with the user permissions
and causes an instruction TLB protection violation exception.

This patches fixes that by introducing a new delay slot flag for the
RTE instruction. Given it's a privileged instruction, the RTE delay
slot instruction is always fetched in privileged mode. It is therefore
enough to to check for this flag in cpu_mmu_index.

Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>


  Commit: 61462af65af0d2f56b56097b9ac5eb32f471a673
      
https://github.com/qemu/qemu/commit/61462af65af0d2f56b56097b9ac5eb32f471a673
  Author: Peter Maydell <address@hidden>
  Date:   2017-06-01 (Thu, 01 Jun 2017)

  Changed paths:
    M target/sh4/cpu.h
    M target/sh4/helper.c
    M target/sh4/translate.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/aurel/tags/pull-target-sh4-20170530' 
into staging

Queued target/sh4 patches

# gpg: Signature made Tue 30 May 2017 20:12:10 BST
# gpg:                using RSA key 0xBA9C78061DDD8C9B
# gpg: Good signature from "Aurelien Jarno <address@hidden>"
# gpg:                 aka "Aurelien Jarno <address@hidden>"
# gpg:                 aka "Aurelien Jarno <address@hidden>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 7746 2642 A9EF 94FD 0F77  196D BA9C 7806 1DDD 8C9B

* remotes/aurel/tags/pull-target-sh4-20170530:
  target/sh4: fix RTE instruction delay slot
  target/sh4: ignore interrupts in a delay slot
  target/sh4: introduce DELAY_SLOT_MASK
  target/sh4: fix reset when using a kernel and an initrd
  target/sh4: log unauthorized accesses using qemu_log_mask

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


Compare: https://github.com/qemu/qemu/compare/066ae4f829bc...61462af65af0

reply via email to

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