[PATCH v6 16/24] RISC-V: KVM: Improve firmware counter read function