Sdtrig Effective Privilege Mode (Sdtrigepm) Ratification Plan
About
Specification Name: Sdtrig Effective Privilege Mode
Authors: @Beeman Strong
Spec Jira: RVS-3623: Sdtrig Effective Privilege Mode (Sdtrigepm) Specification in Planning
Background
Hypervisors use HLV/HSV instructions, or load/stores with MPRV=1, when emulating operations on behalf of a guest
Sdtrig triggers match these load/store operations based on the current privilege mode, rather than the effective privilege mode
As a result, emulated load/store operations will bypass guest triggers, resulting in a virtualization hole
Overview
With Sdtrigepm, mcontrol6 triggers match based on the effective privilege mode of a load/store access
This impacts both privilege mode filtering and breakpoint reentrancy protections
Stakeholders Identification
Debug TG
DTPM SIG
Hypervisor SIG
Priv IC
Design Considerations
None
Proof-of-Concept and Tests
Proof-of Concept
KVM + Qemu (no harm)
Software Support (OS, RTOS, Hypervisor, etc.)
N/A
Simulator Support
QEMU: yes
Spike: yes
SAIL: yes
Tests (ACT for ISA or Software)
ACT: ensure HLV/HSV accesses match mcontrol6 triggers enabled for VS/VU, not S/U
ACT: ensure HLVX and MPRV=MXR=1 accesses do not match mcontrol6 triggers
ACT: ensure loads/stores with MPRV=1 only match mcontrol6 triggers enabled for mode in MPP/MPV
Software Ecosystem Impacts
No changes. Future hypervisor functionality to emulate loads and stores will now work properly.
Freeze Checklists
Key Milestones
Additional Notes
Related content
RISC-V International