// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2021 ARM Limited * * Verify that the ZA register context in signal frames is set up as * expected.
*/
if (prctl(PR_SME_SET_VL, vl) != vl) {
fprintf(stderr, "Failed to set VL\n"); return 1;
}
/* * Get a signal context which should have a SVE frame and registers * in it.
*/
setup_za_regs(); if (!get_current_context(td, &context.uc, sizeof(context))) return 1;
head = get_header(head, ZA_MAGIC, GET_BUF_RESV_SIZE(context), &offset); if (!head) {
fprintf(stderr, "No ZA context\n"); return 1;
}
fprintf(stderr, "Got expected size %u and VL %d\n",
head->size, za->vl);
/* We didn't load any data into ZA so it should be all zeros */ if (memcmp(zeros, (char *)za + ZA_SIG_REGS_OFFSET,
ZA_SIG_REGS_SIZE(sve_vq_from_vl(za->vl))) != 0) {
fprintf(stderr, "ZA data invalid\n"); return 1;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.