herd / herdtools7

The Herd toolsuite to deal with .cat memory models (version 7.xx)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[litmus] The combination `-variant self,kvm` is not completely functional

maranget opened this issue · comments

The combination of -variant kvm and -variant self is not completely functional. Namely, some of the code adresses are computed in the source, static, code and not in the code copies, which they should. As a consequence, a final condition such as fault(P0:L0,...) is never satisfied. For instance:

AArch64 T
Variant=self,fatal
{
int x=1;
[PTE(x)]=(valid:0);
0:X1=x;
}
  P0         ;
L0:          ;
 LDR W0,[X1] ;
forall fault(P0:L0,x)

Running the T test yields the following output:

Test T Required
Histogram (1 states)
4000000*> ~fault(P0:L0,x);
No

Witnesses
Positive: 0, Negative: 4000000
Condition forall (fault(P0:L0,x)) is NOT validated
Hash=c159dc89432abbd3914867f2e1cb0b38
Variant=self,fatal
Observation T Never 0 4000000
Faults T 4000000 P0:4000000
Time T 5.14

One can observe that some fault occurred at each run, (see the "Faults" line above). However the final condition is not validated. Consider that, before each run the "master" code is copied to some area. Then, the actual value of the pc points to the code copy, while the reference address P0:L0 point into the master version of the code.

Hi @relokin. You may be interested by this issue, although I do not anticipate it impacts your PR #589 (no fault handler there).

Thanks Luc, tbh, I didn't look at VMSA tests at all. This would have been my next step and looking at litmus support for the features that #562 adds. Are you going to look at fixing this? Otherwise I can look at this on Monday.

I will not be working on this issue next week. I do not think this problem is urgent. But if you have time, fixing this cannot harm...