mirror_ubuntu-kernels/tools/testing/selftests/kvm/include
Anup Patel fac3725364 KVM: selftests: riscv: Set PTE A and D bits in VS-stage page table
Supporting hardware updates of PTE A and D bits is optional for any
RISC-V implementation so current software strategy is to always set
these bits in both G-stage (hypervisor) and VS-stage (guest kernel).

If PTE A and D bits are not set by software (hypervisor or guest)
then RISC-V implementations not supporting hardware updates of these
bits will cause traps even for perfectly valid PTEs.

Based on above explanation, the VS-stage page table created by various
KVM selftest applications is not correct because PTE A and D bits are
not set. This patch fixes VS-stage page table programming of PTE A and
D bits for KVM selftests.

Fixes: 3e06cdf105 ("KVM: selftests: Add initial support for RISC-V
64-bit")
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Tested-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
2022-04-09 09:15:44 +05:30
..
aarch64 Merge branch kvm-arm64/selftest/irq-injection into kvmarm-master/next 2022-01-04 14:03:43 +00:00
riscv KVM: selftests: riscv: Set PTE A and D bits in VS-stage page table 2022-04-09 09:15:44 +05:30
s390x KVM: selftests: Define cpu_relax() helpers for s390 and x86 2022-03-08 10:59:11 -05:00
x86_64 KVM: selftests: Define cpu_relax() helpers for s390 and x86 2022-03-08 10:59:11 -05:00
guest_modes.h KVM: selftests: Factor out guest mode code 2021-01-07 18:07:29 -05:00
kvm_util_base.h KVM: selftests: Split out helper to allocate guest mem via memfd 2022-03-08 10:59:10 -05:00
kvm_util.h kvm: selftests: move ucall declarations into ucall_common.h 2022-01-07 13:25:33 -05:00
numaif.h KVM: selftests: Add missing header file needed by xAPIC IPI tests 2021-02-11 08:02:08 -05:00
perf_test_util.h KVM: selftests: Move vCPU thread creation and joining to common helpers 2021-11-16 07:43:28 -05:00
sparsebit.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 482 2019-06-19 17:09:52 +02:00
test_util.h KVM: selftests: Assert mmap HVA is aligned when using HugeTLB 2021-11-16 07:43:25 -05:00
ucall_common.h kvm: selftests: move ucall declarations into ucall_common.h 2022-01-07 13:25:33 -05:00