@@ -246,16 +246,18 @@ The `seed` CSR is by default only available in M mode, but can be made
246
246
available to other modes via the `mseccfg.sseed` and `mseccfg.useed`
247
247
access control bits. `sseed` is bit `9` of and `useed` is
248
248
bit `8` of the `mseccfg` CSR.
249
- Without the corresponding access control bit set to 1, an attempted
250
- read/write access to `seed` from U, S, or HS modes will raise an
251
- illegal instruction Exception.
252
-
253
- Attempted access to `seed` from virtual modes VS and VU always raises an
254
- exception; a read-only instruction causes an illegal instruction Exception,
255
- while a read-write instruction (that can potentially be emulated) causes
256
- a virtual instruction Exception. Note that HS, VS, and VU modes are
257
- present in systems with Hypervisor (H) extension implemented. If desired,
258
- a hypervisor can emulate accesses to the seed CSR from a virtual machine.
249
+ Without the corresponding access control bit set to 1, any attempted
250
+ access to `seed` from U, S, or HS modes will raise an illegal instruction
251
+ exception.
252
+
253
+ VS and VU modes are present in systems with Hypervisor (H) extension
254
+ implemented. If desired, a hypervisor can emulate accesses to the seed CSR
255
+ from a virtual machine. Attempted access to `seed` from virtual modes
256
+ VS and VU always raises an exception; a read-only instruction causes an
257
+ illegal instruction exception, while a read-write instruction (that can
258
+ potentially be emulated) causes a virtual instruction exception only if
259
+ `mseccfg.sseed=1`. Note that `mseccfg.useed` has no effect on the exception
260
+ type for either VS or VU modes.
259
261
260
262
.Entropy Source Access Control.
261
263
@@ -268,38 +270,43 @@ a hypervisor can emulate accesses to the seed CSR from a virtual machine.
268
270
| `*`
269
271
| The `seed` CSR is always available in machine mode as normal (with a
270
272
CSR read-write instruction.) Attempted read without a write raises an
271
- illegal instruction Exception regardless of mode and access control bits.
273
+ illegal instruction exception regardless of mode and access control bits.
272
274
273
- | VS/VU
275
+ | U
274
276
| `*`
277
+ | `0`
278
+ | Any `seed` CSR access raises an illegal instruction exception.
279
+
280
+ | U
275
281
| `*`
276
- | The `seed` CSR is never directly available from virtual (VS or VU)
277
- modes. A read-write instruction causes a virtual instruction Exception
278
- (while a read-only instruction always causes an illegal instruction Exception.)
282
+ | `1`
283
+ | The `seed` CSR is accessible as normal. No exception is raised for read-write.
279
284
280
285
| S/HS
281
286
| `0`
282
287
| `*`
283
- | Any `seed` CSR access raises an illegal instruction Exception.
288
+ | Any `seed` CSR access raises an illegal instruction exception.
289
+
284
290
285
291
| S/HS
286
292
| `1`
287
293
| `*`
288
294
| The `seed` CSR is accessible as normal. No exception is raised for read-write.
289
295
290
- | U
291
- | `*`
296
+ | VS/VU
292
297
| `0`
293
- | Any `seed` CSR access raises an illegal instruction Exception.
294
-
295
- | U
296
298
| `*`
297
- | `1`
298
- | The `seed` CSR is accessible as normal. No exception is raised for read-write.
299
+ | Any `seed` CSR access raises an illegal instruction exception.
299
300
301
+ | VS/VU
302
+ | `1`
303
+ | `*`
304
+ | A read-write `seed` access raises a virtual instruction exception,
305
+ while other access conditions raise an illegal instruction exception.
300
306
301
307
|=======================================================================
302
308
309
+
303
310
Systems should implement carefully considered access control policies from
304
311
lower privilege modes to physical entropy sources. The system can trap
305
312
attempted access to `seed` and feed a less privileged client
0 commit comments