From 7560a84d9649a941472ff629b0099eb95be40cb9 Mon Sep 17 00:00:00 2001 From: John Hauser <31252952+jhauser-us@users.noreply.github.com> Date: Wed, 1 Sep 2021 13:47:58 -0700 Subject: Clarify widths of privileged CSRs (#728) When different privilege modes have different values for XLEN, the terms _RV32_ and _RV64_ are not sufficient to indicate the width of a privileged CSR that is accessed from a more-privileged mode (e.g. when 32-bit vsatp is accessed from 64-bit HS mode). Where needed, replace "RV32" and "RV64" with more specific references to the correct XLEN. --- src/hypervisor.tex | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/hypervisor.tex') diff --git a/src/hypervisor.tex b/src/hypervisor.tex index 44edab3..8380413 100644 --- a/src/hypervisor.tex +++ b/src/hypervisor.tex @@ -195,7 +195,7 @@ for tracking and controlling the exception behavior of a VS-mode guest. \end{center} } \vspace{-0.1in} -\caption{Hypervisor status register ({\tt hstatus}) for RV32.} +\caption{Hypervisor status register ({\tt hstatus}) when HSXLEN=32.} \label{hstatusreg-rv32} \end{figure*} @@ -252,7 +252,7 @@ HSXLEN-34 & 2 & 9 & 1 & 1 & 1 & \\ \end{center} } \vspace{-0.1in} -\caption{Hypervisor status register ({\tt hstatus}) for RV64.} +\caption{Hypervisor status register ({\tt hstatus}) when HSXLEN=64.} \label{hstatusreg} \end{figure*} @@ -1061,8 +1061,8 @@ in HS-mode will raise an illegal instruction exception. \end{center} } \vspace{-0.1in} -\caption{RV32 Hypervisor guest address translation and protection register -{\tt hgatp}.} +\caption{Hypervisor guest address translation and protection register +{\tt hgatp} when HSXLEN=32.} \label{rv32hgatp} \end{figure} @@ -1085,44 +1085,44 @@ in HS-mode will raise an illegal instruction exception. \end{center} } \vspace{-0.1in} -\caption{RV64 Hypervisor guest address translation and protection register -{\tt hgatp}, for MODE values Bare, Sv39x4, and Sv48x4.} +\caption{Hypervisor guest address translation and protection register +{\tt hgatp} when HSXLEN=64, for MODE values Bare, Sv39x4, and Sv48x4.} \label{rv64hgatp} \end{figure} -Table~\ref{tab:hgatp-mode} shows the encodings of the MODE field for RV32 and -RV64. +Table~\ref{tab:hgatp-mode} shows the encodings of the MODE field when HSXLEN=32 and +HSXLEN=64. When MODE=Bare, guest physical addresses are equal to supervisor physical addresses, and there is no further memory protection for a guest virtual machine beyond the physical memory protection scheme described in Section~\ref{sec:pmp}. In this case, the remaining fields in {\tt hgatp} must be set to zeros. -For RV32, the only other valid setting for MODE is Sv32x4, which is a +When HSXLEN=32, the only other valid setting for MODE is Sv32x4, which is a modification of the usual Sv32 paged virtual-memory scheme, extended to support 34-bit guest physical addresses. -For RV64, modes Sv39x4 and Sv48x4 are defined as modifications of the Sv39 and +When HSXLEN=64, modes Sv39x4 and Sv48x4 are defined as modifications of the Sv39 and Sv48 paged virtual-memory schemes. All of these paged virtual-memory schemes are described in Section~\ref{sec:guest-addr-translation}. -An additional RV64 scheme, Sv57x4, may be defined in a later version of this +An additional scheme for HSXLEN=64, Sv57x4, may be defined in a later version of this specification. -The remaining MODE settings for RV64 are reserved for future use and may define +The remaining MODE settings when HSXLEN=64 are reserved for future use and may define different interpretations of the other fields in {\tt hgatp}. \begin{table}[h] \begin{center} \begin{tabular}{|c|c|l|} \hline -\multicolumn{3}{|c|}{RV32} \\ +\multicolumn{3}{|c|}{HSXLEN=32} \\ \hline Value & Name & Description \\ \hline 0 & Bare & No translation or protection. \\ 1 & Sv32x4 & Page-based 34-bit virtual addressing (2-bit extension of Sv32). \\ \hline \hline -\multicolumn{3}{|c|}{RV64} \\ +\multicolumn{3}{|c|}{HSXLEN=64} \\ \hline Value & Name & Description \\ \hline @@ -1139,8 +1139,8 @@ Value & Name & Description \\ \label{tab:hgatp-mode} \end{table} -RV64 implementations are not required to support all defined RV64 MODE -settings. +Implementations are not required to support all defined MODE +settings when HSXLEN=64. A write to {\tt hgatp} with an unsupported MODE value is not ignored as it is for {\tt satp}. @@ -1225,7 +1225,7 @@ instructions that normally read or modify {\tt sstatus} actually access \end{center} } \vspace{-0.1in} -\caption{Virtual supervisor status register ({\tt vsstatus}) for RV32.} +\caption{Virtual supervisor status register ({\tt vsstatus}) when VSXLEN=32.} \label{vsstatusreg-rv32} \end{figure*} @@ -1286,7 +1286,7 @@ instructions that normally read or modify {\tt sstatus} actually access \end{center} } \vspace{-0.1in} -\caption{Virtual supervisor status register ({\tt vsstatus}) for RV64.} +\caption{Virtual supervisor status register ({\tt vsstatus}) when VSXLEN=64.} \label{vsstatusreg} \end{figure*} @@ -1646,7 +1646,7 @@ Section~\ref{sec:two-stage-translation}). \end{center} } \vspace{-0.1in} -\caption{RV32 virtual supervisor address translation and protection register {\tt vsatp}.} +\caption{Virtual supervisor address translation and protection register {\tt vsatp} when VSXLEN=32.} \label{rv32vsatpreg} \end{figure} @@ -1667,7 +1667,7 @@ Section~\ref{sec:two-stage-translation}). \end{center} } \vspace{-0.1in} -\caption{RV64 virtual supervisor address translation and protection register {\tt vsatp}, for MODE +\caption{Virtual supervisor address translation and protection register {\tt vsatp} when VSXLEN=64, for MODE values Bare, Sv39, and Sv48.} \label{rv64vsatpreg} \end{figure*} -- cgit v1.1