From: Fangyu Yu <fangyu.yu@linux.alibaba.com>
According to the RISC-V Privileged Architecture Spec, when MODE=Bare
is selected,software must write zero to the remaining fields of hgatp.
So,use a valid mode when detecting vmids of the HW supported,meanwhile
remove unnecessary HGATP csr_read.
---
Changes in v3:
- Add "Fixes" tag.
- Involve("RISC-V KVM: Remove unnecessary HGATP csr_read"), which
depends on patch 1.
Changes in v2:
- Fixed build error since kvm_riscv_gstage_mode() has been modified.
---
Fangyu Yu (1):
RISC-V: KVM: Write hgatp register with valid mode bits
Guo Ren (Alibaba DAMO Academy) (1):
RISC-V KVM: Remove unnecessary HGATP csr_read
arch/riscv/kvm/vmid.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--
2.49.0