Re: [PATCH v2 6/8] KVM: riscv: selftests: Add guest helper to get vcpu id

From: Andrew Jones
Date: Mon Sep 04 2023 - 09:48:30 EST


On Sat, Sep 02, 2023 at 08:59:28PM +0800, Haibo Xu wrote:
> Add guest_get_vcpuid() helper to simplify accessing to per-cpu
> private data. The sscratch CSR was used to store the vcpu id.
>
> Signed-off-by: Haibo Xu <haibo1.xu@xxxxxxxxx>
> ---
> tools/testing/selftests/kvm/include/aarch64/processor.h | 4 ----
> tools/testing/selftests/kvm/include/kvm_util_base.h | 2 ++
> tools/testing/selftests/kvm/lib/riscv/processor.c | 8 ++++++++
> 3 files changed, 10 insertions(+), 4 deletions(-)
>

Reviewed-by: Andrew Jones <ajones@xxxxxxxxxxxxxxxx>