About changing satp
and sfence.vma
#1959
-
This must be some trivial fact, my search skill being bad, or that I understand nothing in the first place... Anyway currently the supervisor.adoc states:
So what are "previous stores"? What makes them "visible"? Store operations preceding the Also, how about load operations? Load operations on that HART preceding the Maybe my question could be summarized as this: how does the aforementioned quote differ from this quote (from later part of the same doc)?
But then again there's the question why we at times may issue I'm so utterly confused. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 15 replies
-
Yes, "Store operations preceding the sfence.vma on that HART in program order". When satp is changed, all preceding loads/stores in program order are translated using the old satp, and all following loads/stores in program order are translated using the new satp. Assuming TLB entries are tagged with ASID (otherwise the satp write will need to flush the TLB), then there may be multiple TLB entries tagged withthe same VA, but only the one tagged with an ASID matching the current satp.ASID will be used to translate that VA. An sfence.vma is executed in the context of the current satp MODE and ASID. So if one wants to do an sfence.vma wrt to a new translation context, then it has to follow in program order after the satp write. |
Beta Was this translation helpful? Give feedback.
-
Uh so it turns out I'm not clear, yet... Why does the spec says that when it recycles some ASID, it should first change In short, when recycling ASID, why is it recommended to |
Beta Was this translation helpful? Give feedback.
-
In the recycled case, if the
The part of the OS that recycles |
Beta Was this translation helpful? Give feedback.
-
If your satisfied, please close the issue. |
Beta Was this translation helpful? Give feedback.
Yes, "Store operations preceding the sfence.vma on that HART in program order".
When satp is changed, all preceding loads/stores in program order are translated using the old satp, and all following loads/stores in program order are translated using the new satp. Assuming TLB entries are tagged with ASID (otherwise the satp write will need to flush the TLB), then there may be multiple TLB entries tagged withthe same VA, but only the one tagged with an ASID matching the current satp.ASID will be used to translate that VA.
An sfence.vma is executed in the context of the current satp MODE and ASID. So if one wants to do an sfence.vma wrt to a new translation context, then it has to follow in…