]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390x: Remove a fixs390. Add an explanation.
authorFlorian Krohm <flo2030@eich-krohm.de>
Wed, 28 May 2025 21:07:44 +0000 (21:07 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Wed, 28 May 2025 21:07:44 +0000 (21:07 +0000)
VEX/priv/host_s390_defs.h

index dcdb6713e98d7a1b8af403e207534dc2e53afee7..48fbac7644c02c1ef0cec55cb0be9c9ba7a0c25d 100644 (file)
@@ -706,8 +706,18 @@ typedef struct {
          s390_amode   *guest_IA;
       } xassisted;
       struct {
-         /* fixs390: I don't think these are really needed
-            as the gsp and the offset are fixed  no ? */
+         /* Note: these fields are needed. Here's why:
+            These fields are amodes for accessing the host_EvC_COUNTER and
+            host_EvC_FAILADDR fields in the guest state.
+            When guest and host architecture are both s390x then we know that
+            the displacement in evcheck::counter is
+            offsetof(VexGuestS390XState, host_EvC_COUNTER) and likewise for
+            the displacement in evcheck::fail_addr. There would be no point
+            to build these amodes in the first place because we could just
+            hardwire the displacements in s390_insn_evcheck_emit.
+            However in a multi-arch setting the amodes point to the
+            host_EvC_COUNTER/FAILADDR fields in a *different* guest state and
+            those offsets are not known. So we do need to build the amodes. */
          s390_amode   *counter;    /* dispatch counter */
          s390_amode   *fail_addr;
       } evcheck;