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;