No announcement yet.

Design of a SPECTRE-Resistant High-Performance CPU

  • Filter
  • Time
  • Show
Clear All
new posts

  • #41
    The above discussion about the meaning of the term "speculative CPU" implies that speculative execution has very little to do with execution semantics. Apparently, speculative execution is some property related to available storage capacity.


    • #42
      So, what is speculative execution?

      If you prefer a nonspeculative view of execution semantics, then it is a way of delaying a decision on a branching point.

      If you prefer a speculative view of execution semantics, then it is the ability of a CPU+memory to create multiple instances of itself at branching points of an execution tree.


      =============== End of very mathematical discussion (hopefully) ===============
      Last edited by xfcemint; 24 September 2021, 04:22 AM.


      • #43
        Corrections, ommisions, etc...

        Previously I defined "rejected execution path" as: "an execution path that CPU was considering in the past, but at the initial branching point of the rejected execution path the CPU took a different execution path. Initial branching point of a rejected execution path is always on the accepted execution path."

        It should be clarified that the initial branching point of a rejected execution path is not a part of the said rejected execution path. Therefore, rejected execution path has an initial branching point, but this point is not on the path, it only touches it. There is also a similar confusion in the definition of a "speculated execution path".

        There could be a question whether DIRECTION bits are a part of the system state. I think that, since the amount of information in the system state should be calculated excluding the DIRECTION bits, then it is probably better to think of them as not being a part of a speculative instance system state. On the other hand, and to be more precise, the amount of information that the DIRECTION bits add to the system state is exactly zero; but then the amount of information in the system state should be more carefully calculated.

        Another question could be about "modern CPUs" not performing but emulating speculative execution, how do I know that?
        I actually used quite an inappropriate word there. They are not "emulating" speculative execution, they are actually mimicking it.
        For a machine to correctly perform speculative execution implies that the machine is SPECTRE-proof.
        Last edited by xfcemint; 24 September 2021, 11:27 AM.


        • #44

          For a selected execution semantics:
          - it is either SPECTRE-proof or SPECTRE-vulnerable
          - whether it is in-order or out-of-order is likely not a meaningfull distinction
          - if an execution semantics is SPECTRE-proof, then there is no meaningfull distinction between the speculative perspective and nonspeculative perspective of the same execution semantics.
          - execution semantics necessarily contains the description of the entire system: CPU, memory capacity, attached devices etc...

          A selected execution semantics can likely (in my opinion) be viewed as being either out-of-order or in-order. Both views are just two perspectives on one execution semantics.

          You can view a selected SPECTRE-proof execution semantics as either speculative or nonspeculative, it's just a perspective. A lot of caution has to be taken in CPU design because in the theoretical model, speculative instances do not communicate, but in the real world they usually do. If they communicate, the execution semantics changes. It immediately turns into some-thing mostly incomprehensible that can be called a SPECTRE-vulnerable execution semantics.
          Last edited by xfcemint; 24 September 2021, 11:37 AM.