[PATCH v4 12/18] KVM: selftests: Keep track of the number of vCPUs for a VM
Oliver Upton
oupton at google.com
Wed Sep 8 22:22:17 PDT 2021
On Thu, Sep 09, 2021 at 01:38:12AM +0000, Raghavendra Rao Ananta wrote:
> The host may want to know the number of vCPUs that were
> created for a particular VM (used in upcoming patches).
> Hence, include nr_vcpus as a part of 'struct kvm_vm' to
> keep track of vCPUs as and when they are added or
> deleted, and return to the caller via vm_get_nr_vcpus().
>
> Signed-off-by: Raghavendra Rao Ananta <rananta at google.com>
> ---
> tools/testing/selftests/kvm/include/kvm_util.h | 1 +
> tools/testing/selftests/kvm/lib/kvm_util.c | 7 +++++++
> tools/testing/selftests/kvm/lib/kvm_util_internal.h | 1 +
> 3 files changed, 9 insertions(+)
Shouldn't a test keep track/know how many vCPUs it has created?
--
Thanks,
Oliver
More information about the linux-arm-kernel
mailing list