linux-user pull request 20220308
deliver SIGTRAP on POWERPC_EXCP_TRAP remove stale "not threadsafe" comments -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmInb/YSHGxhdXJlbnRA dml2aWVyLmV1AAoJEPMMOL0/L748H1kQAJ+FT6y4bcUORBNBqVUURR7ENA1fDg+F bE/YW6TlREWIOw4N1iiS4kmIiGyowPY6zWvUM4jib7g1v1dNF9TbTJz7bpPapk0v emz+IMG/jgCNziXhoY3rtVDGyfOuH4zsbjTKqARS1411Qy15B2EIrGbRL3BaROL0 e7/JRDj8c6GS6sFDHbp+LgKTZNc/qgAJuTO6MbrH0oCUuK38H1Kxfz+1yYDkDz7A C9q28thYNzkIqqlhyZjTfwDCkjvVNjZhqRTlZPaNRz6EzN4ym0eaX+wRuPZTXwnr H9pEdKJXO7ezq51xdEUW0MITlzzmWlkrEtuVsEl7cM4XPXd4CHjKiEHkSEcYBdmR utqzqP2OJKeJJRM7tHFtWw3+JDrfGI2xp421rKuwf0yndwgqxnaLD/McP/J0L5DJ Y4e04kJmRb9Iy849zMTQXascTwy/ZwK4/wezArgl4FNxsOh1W35YUd3NVf4wzaIG 0DTPR2d6THUaoZ5Hs67uKMMmAk4u/yEdEs5MmIhyFOIN3Hsa+AygPmnSrMu1yuCw gaCjjwSkK92mqrXH7zSrxJrEWm0/5SX8NROROa6T8cXf3uuQYLftp66AJrExXWyE B1MOEMvZV6Qm0vHC5NiJtVcitIhWiVv00F3mn20dy47xCT3ndm34j86LO4ymsyVT JTYIY0ulbQY+ =wSx/ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/lvivier-gitlab/tags/linux-user-for-7.0-pull-request' into staging linux-user pull request 20220308 deliver SIGTRAP on POWERPC_EXCP_TRAP remove stale "not threadsafe" comments # gpg: Signature made Tue 08 Mar 2022 15:02:14 GMT # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/lvivier-gitlab/tags/linux-user-for-7.0-pull-request: tests/tcg/ppc64le: change signal_save_restore_xer to use SIGTRAP linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP linux-user: Remove stale "not threadsafe" comments Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
d9ccf33f94
@ -181,7 +181,8 @@ void cpu_loop(CPUPPCState *env)
|
||||
}
|
||||
break;
|
||||
case POWERPC_EXCP_TRAP:
|
||||
cpu_abort(cs, "Tried to call a TRAP\n");
|
||||
si_signo = TARGET_SIGTRAP;
|
||||
si_code = TARGET_TRAP_BRKPT;
|
||||
break;
|
||||
default:
|
||||
/* Should not happen ! */
|
||||
|
@ -999,7 +999,6 @@ int do_sigaction(int sig, const struct target_sigaction *act,
|
||||
oact->sa_mask = k->sa_mask;
|
||||
}
|
||||
if (act) {
|
||||
/* FIXME: This is not threadsafe. */
|
||||
__get_user(k->_sa_handler, &act->_sa_handler);
|
||||
__get_user(k->sa_flags, &act->sa_flags);
|
||||
#ifdef TARGET_ARCH_HAS_SA_RESTORER
|
||||
@ -1149,7 +1148,6 @@ void process_pending_signals(CPUArchState *cpu_env)
|
||||
sigset_t *blocked_set;
|
||||
|
||||
while (qatomic_read(&ts->signal_pending)) {
|
||||
/* FIXME: This is not threadsafe. */
|
||||
sigfillset(&set);
|
||||
sigprocmask(SIG_SETMASK, &set, 0);
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
uint64_t saved;
|
||||
|
||||
void sigill_handler(int sig, siginfo_t *si, void *ucontext)
|
||||
void sigtrap_handler(int sig, siginfo_t *si, void *ucontext)
|
||||
{
|
||||
ucontext_t *uc = ucontext;
|
||||
uc->uc_mcontext.regs->nip += 4;
|
||||
@ -23,14 +23,14 @@ int main(void)
|
||||
{
|
||||
uint64_t initial = XER_CA | XER_CA32, restored;
|
||||
struct sigaction sa = {
|
||||
.sa_sigaction = sigill_handler,
|
||||
.sa_sigaction = sigtrap_handler,
|
||||
.sa_flags = SA_SIGINFO
|
||||
};
|
||||
|
||||
sigaction(SIGILL, &sa, NULL);
|
||||
sigaction(SIGTRAP, &sa, NULL);
|
||||
|
||||
asm("mtspr 1, %1\n\t"
|
||||
".long 0x0\n\t"
|
||||
"trap\n\t"
|
||||
"mfspr %0, 1\n\t"
|
||||
: "=r" (restored)
|
||||
: "r" (initial));
|
||||
|
Loading…
Reference in New Issue
Block a user