Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe behavior ext. for SFENCE.VMA and HFENCE.VMA #84

Merged
merged 6 commits into from
Oct 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions chapter3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,30 @@ prior to the `MINVAL.SPA`, and
subsequent to the `MFENCE.SPA`

`MINVAL.SPA` is only valid in M-mode.

=== Extension to behavior of SFENCE.VMA and HFENCE.VMA
rsahita marked this conversation as resolved.
Show resolved Hide resolved

The behavior of the SFENCE.VMA and the HFENCE.VMA instructions are affected when
rsahita marked this conversation as resolved.
Show resolved Hide resolved
supervisor domains are used by the M-mode RDSM.
rsahita marked this conversation as resolved.
Show resolved Hide resolved

When SFENCE.VMA is used within a supervisor domain, the virtual-address argument
is a virtual address with either the ASID being a S/HS-level ASID (V=0), or a
VS-level ASID (V=1).

For S/HS-level ASID, the virtual-address argument to SFENCE.VMA is a host
virtual address within the current supervisor domain, and the ASID argument is
a S/HS-level ASID within the current supervisor domain. The current supervisor
domain is identified by the SDID field of the CSR mttp, and the effective ASID
can be considered the combination of the SDID and the S/HS-level ASID. The
SFENCE.VMA orders stores only to this S/HS-level address-translation structures
with subsequent HS-level address translations.

When V=1, the virtual-address argument to SFENCE.VMA is a guest virtual address
within the current virtual machine, and the ASID argument is a VS-level ASID
within the current virtual machine. The current virtual machine is identified by
rsahita marked this conversation as resolved.
Show resolved Hide resolved
the SDID field of the CSR mttp, the VMID field of CSR hgatp, and the effective
ASID can be considered to be the combination of this SDID and VMID with the
VS-level ASID. The SFENCE.VMA instruction orders stores only to the VS-level
address-translation structures with subsequent VS-stage address translations for
the same virtual machine, i.e., only when mttp.SDID and the hgatp.VMID is the
same as when the SFENCE.VMA executed.
Loading