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~

Reply via email to