vsscratch

Virtual Supervisor Scratch Register

The vsscratch register is a VSXLEN-bit read/write register that is VS-mode’s version of supervisor register sscratch. When V=1, vsscratch substitutes for the usual sscratch, so instructions that normally read or modify sscratch actually access vsscratch instead. The contents of vsscratch never directly affect the behavior of the machine.

Attributes

Requirement

H

Defining extensions

H

Hypervisor

CSR Address

0x240

Virtual CSR Address

0x140

Length

* 32 when CSR[hstatus].VSXL == 0 * 64 when CSR[hstatus].VSXL == 1

Privilege Mode

VS

Format

This CSR format changes dynamically.

vsscratch Format when CSR[hstatus].VSXL == 0
Figure 1. vsscratch Format when CSR[hstatus].VSXL == 0
vsscratch Format when CSR[hstatus].VSXL == 1
Figure 2. vsscratch Format when CSR[hstatus].VSXL == 1

Field Summary

Name Location Type Reset Value

vsscratch.SCRATCH

* 31:0 when CSR[hstatus].VSXL == 0 * 63:0 when CSR[hstatus].VSXL == 1

RW

UNDEFINED_LEGAL

Fields

SCRATCH

Location
  • 31:0 when CSR[hstatus].VSXL == 0

  • 63:0 when CSR[hstatus].VSXL == 1

Description

Virtual supervisor scratch register.

Type

RW

Reset value

UNDEFINED_LEGAL