]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: selftests: Add guest support to get the vcpuid
authorRaghavendra Rao Ananta <rananta@google.com>
Thu, 7 Oct 2021 23:34:34 +0000 (23:34 +0000)
committerMarc Zyngier <maz@kernel.org>
Sun, 17 Oct 2021 10:17:21 +0000 (11:17 +0100)
commitc2858dd2bd3a981e3eda60921e35e1b6147b1fac
tree31afdf79e928bc8f41bd4bcfc5d73226eb40f8f9
parent8a93880599857c6a47c9baa57a3c1feb0147aa72
KVM: arm64: selftests: Add guest support to get the vcpuid

At times, such as when in the interrupt handler, the guest wants
to get the vcpuid that it's running on to pull the per-cpu private
data. As a result, introduce guest_get_vcpuid() that returns the
vcpuid of the calling vcpu. The interface is architecture
independent, but defined only for arm64 as of now.

Suggested-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Reviewed-by: Ricardo Koller <ricarkol@google.com>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211007233439.1826892-11-rananta@google.com
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/lib/aarch64/processor.c