The per-VM s390dbf area is named "kvm-arm64--". Two VMs of the same process can still get the same random number, and debugfs then fails to create the second directory. Use the new s390 scheme. Signed-off-by: Christian Borntraeger --- arch/s390/kvm/arm64/arm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/s390/kvm/arm64/arm.c b/arch/s390/kvm/arm64/arm.c index bd9d85235f438..6fd0ba2061dcc 100644 --- a/arch/s390/kvm/arm64/arm.c +++ b/arch/s390/kvm/arm64/arm.c @@ -106,6 +106,7 @@ static int kvm_vm_type_ipa_size_shift(unsigned long type) int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) { + static atomic_t vm_seq = ATOMIC_INIT(0); char debug_name[32]; int ret; @@ -121,7 +122,7 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) bitmap_zero(kvm->arch.vcpu_features, KVM_VCPU_MAX_FEATURES); snprintf(debug_name, sizeof(debug_name), "kvm-arm64-%u-%u", - current->pid, get_random_u32()); + current->pid, atomic_inc_return(&vm_seq)); kvm->arch.dbf = debug_register(debug_name, 32, 1, 7 * sizeof(long)); if (!kvm->arch.dbf) return -ENOMEM; -- 2.53.0