[PATCH v4 09/11] KVM: riscv: selftests: Change vcpu_has_ext to a common function