|
From: | Richard Henderson |
Subject: | Re: [PATCH v4 35/45] linux-user/aarch64: Add SM bit to SVE signal context |
Date: | Tue, 5 Jul 2022 08:54:04 +0530 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 |
On 7/4/22 17:32, Peter Maydell wrote:
@@ -177,9 +180,13 @@ static void target_setup_sve_record(struct target_sve_context *sve, { int i, j; + memset(sve, 0, sizeof(*sve)); __put_user(TARGET_SVE_MAGIC, &sve->head.magic); __put_user(size, &sve->head.size); __put_user(vq * TARGET_SVE_VQ_BYTES, &sve->vl); + if (FIELD_EX64(env->svcr, SVCR, SM)) { + __put_user(TARGET_SVE_SIG_FLAG_SM, &sve->flags); + }The kernel documentation says that if this is set then the SVE record contains the streaming vector length. Does that happen automatically (ie vq is the right thing for both streaming and non-streaming) or do we need to do something there?
It is automatically correct (modulo the typo you found in patch 40). The two helpers we have are for VL and SVL, with no direct access to NVL.
I gather that the other half of handling this bit (allowing it to be changed on signal-return) is in a later patch.
Yes. r~
[Prev in Thread] | Current Thread | [Next in Thread] |