v3 -> v4: Made changes to patch# 3 to prevent the following compilation error reported by kernel test robot: arch/s390/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_vm_ioctl_create_vcpu': >> arch/s390/kvm/../../../virt/kvm/kvm_main.c:3321:11: error: 'struct kvm_vm_stat' has no member named 'vcpus' 3321 | kvm->stat.vcpus++; | ^ arch/s390/kvm/../../../virt/kvm/kvm_main.c:3398:11: error: 'struct kvm_vm_stat' has no member named 'vcpus' 3398 | kvm->stat.vcpus--; | ^ [PATCH 1/3 v4] KVM: nVMX: nSVM: 'nested_run' should count guest-entry [PATCH 2/3 v4] KVM: nVMX: nSVM: Add a new VCPU statistic to show if VCPU [PATCH 3/3 v4] KVM: x86: Add a new VM statistic to show number of VCPUs arch/x86/include/asm/kvm_host.h | 4 +++- arch/x86/kvm/debugfs.c | 11 +++++++++++ arch/x86/kvm/kvm_cache_regs.h | 3 +++ arch/x86/kvm/svm/nested.c | 2 -- arch/x86/kvm/svm/svm.c | 6 ++++++ arch/x86/kvm/vmx/nested.c | 2 -- arch/x86/kvm/vmx/vmx.c | 13 ++++++++++++- arch/x86/kvm/x86.c | 4 +++- virt/kvm/kvm_main.c | 6 ++++++ 9 files changed, 44 insertions(+), 7 deletions(-) Krish Sadhukhan (3): KVM: nVMX: nSVM: 'nested_run' should count guest-entry attempts that make it to guest code KVM: nVMX: nSVM: Add a new VCPU statistic to show if VCPU is in guest mode KVM: x86: Add a new VM statistic to show number of VCPUs created in a given VM