|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v3 19/39] xen/riscv: detect Shtvala
The H extension allows htval, on a guest-page fault, to be written with
either the faulting guest physical address or zero. The Shtvala extension
removes the ambiguity of this zero-write by guaranteeing that htval is
written with the faulting guest physical address in every circumstance
permitted by the ISA.
Not offered to guests: Shtvala describes htval, an HS-mode-only trap
register a VS-mode guest never touches, and the H extension it belongs to
is already hidden from guests. The guest-visible equivalent is a
separate extension, Shvstvala, covering vstval instead.
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
Changes in v3:
- Update the commit message.
---
Changes 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 2d12dffae72e..c7f77d917cf5 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, ANY),
RISCV_ISA_EXT_ENTRY(zbb, ANY),
RISCV_ISA_EXT_ENTRY(zbs, ANY),
+ RISCV_ISA_EXT_ENTRY(shtvala, NONE),
RISCV_ISA_EXT_ENTRY(smaia, ANY),
RISCV_ISA_EXT_ENTRY(smstateen, ANY),
RISCV_ISA_EXT_ENTRY(ssaia, 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 |