0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <signal.h>
0010 #include <ucontext.h>
0011 #include <sys/prctl.h>
0012
0013 #include "test_signals_utils.h"
0014 #include "testcases.h"
0015
0016 int sme_trap_no_sm_trigger(struct tdescr *td)
0017 {
0018
0019 asm volatile(".inst 0xd503457f ; .inst 0xc0900000");
0020
0021 return 0;
0022 }
0023
0024 int sme_trap_no_sm_run(struct tdescr *td, siginfo_t *si, ucontext_t *uc)
0025 {
0026 return 1;
0027 }
0028
0029 struct tdescr tde = {
0030 .name = "SME trap without SM",
0031 .descr = "Check that we get a SIGILL if we use streaming mode without enabling it",
0032 .timeout = 3,
0033 .feats_required = FEAT_SME,
0034 .sanity_disabled = true,
0035 .trigger = sme_trap_no_sm_trigger,
0036 .run = sme_trap_no_sm_run,
0037 .sig_ok = SIGILL,
0038 };