|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 20/39] xen/riscv: detect Shtvala
Shtvala says that htval is written with the faulting guest physical address
on a guest-page fault. The H extension itself allows an implementation to
write htval with either that address or with zero, so where the extension is
absent a zero htval cannot be told apart from a genuine fault on guest
physical address 0-3.
It is not offered to guests. Shtvala describes the HS-mode trap interface,
which a VS-mode guest never sees, and the H extension it belongs to is
already withheld from guests. Its guest-facing counterpart is a separate
extension, Shvstvala.
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
Change in v2:
- New patch.
---
---
xen/arch/riscv/cpufeature.c | 1 +
xen/arch/riscv/include/asm/cpufeature.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/xen/arch/riscv/cpufeature.c b/xen/arch/riscv/cpufeature.c
index 4bcbf56cb694..09a06f12318c 100644
--- a/xen/arch/riscv/cpufeature.c
+++ b/xen/arch/riscv/cpufeature.c
@@ -195,6 +195,7 @@ static const struct riscv_isa_ext_entry __initconstrel
riscv_isa_ext[] = {
RISCV_ISA_EXT_ENTRY(zba, RISCV_ISA_EXT_GUEST_ANY),
RISCV_ISA_EXT_ENTRY(zbb, RISCV_ISA_EXT_GUEST_ANY),
RISCV_ISA_EXT_ENTRY(zbs, RISCV_ISA_EXT_GUEST_ANY),
+ RISCV_ISA_EXT_ENTRY(shtvala, RISCV_ISA_EXT_GUEST_NONE),
RISCV_ISA_EXT_ENTRY(smaia, RISCV_ISA_EXT_GUEST_ANY),
RISCV_ISA_EXT_ENTRY(smstateen, RISCV_ISA_EXT_GUEST_ANY),
RISCV_ISA_EXT_ENTRY(ssaia, RISCV_ISA_EXT_GUEST_ANY),
diff --git a/xen/arch/riscv/include/asm/cpufeature.h
b/xen/arch/riscv/include/asm/cpufeature.h
index 2973eb13a513..ac8c68007072 100644
--- a/xen/arch/riscv/include/asm/cpufeature.h
+++ b/xen/arch/riscv/include/asm/cpufeature.h
@@ -36,6 +36,7 @@ enum riscv_isa_ext_id {
RISCV_ISA_EXT_zba,
RISCV_ISA_EXT_zbb,
RISCV_ISA_EXT_zbs,
+ RISCV_ISA_EXT_shtvala,
RISCV_ISA_EXT_smaia,
RISCV_ISA_EXT_smstateen,
RISCV_ISA_EXT_ssaia,
--
2.55.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |