From: Oliver Upton <oupton@google.com> To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, seanjc@google.com, maz@kernel.org, kvmarm@lists.cs.columbia.edu, Oliver Upton <oupton@google.com> Subject: [PATCH v2 2/5] KVM: Shove vcpu stats_id init into kvm_vcpu_init() Date: Wed, 18 May 2022 17:58:08 +0000 [thread overview] Message-ID: <20220518175811.2758661-3-oupton@google.com> (raw) In-Reply-To: <20220518175811.2758661-1-oupton@google.com> Initialize the field alongside other kvm_vcpu fields. No functional change intended. Signed-off-by: Oliver Upton <oupton@google.com> --- virt/kvm/kvm_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 36dc9271d039..778151333ac0 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -440,6 +440,10 @@ static void kvm_vcpu_init(struct kvm_vcpu *vcpu, struct kvm *kvm, unsigned id) vcpu->ready = false; preempt_notifier_init(&vcpu->preempt_notifier, &kvm_preempt_ops); vcpu->last_used_slot = NULL; + + /* Fill the stats id string for the vcpu */ + snprintf(vcpu->stats_id, sizeof(vcpu->stats_id), "kvm-%d/vcpu-%d", + task_pid_nr(current), id); } static void kvm_vcpu_destroy(struct kvm_vcpu *vcpu) @@ -3807,10 +3811,6 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id) if (r) goto unlock_vcpu_destroy; - /* Fill the stats id string for the vcpu */ - snprintf(vcpu->stats_id, sizeof(vcpu->stats_id), "kvm-%d/vcpu-%d", - task_pid_nr(current), id); - /* Now it's all set up, let userspace reach it */ kvm_get_kvm(kvm); r = create_vcpu_fd(vcpu); -- 2.36.1.124.g0e6072fb45-goog
WARNING: multiple messages have this Message-ID (diff)
From: Oliver Upton <oupton@google.com> To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, maz@kernel.org, kvmarm@lists.cs.columbia.edu Subject: [PATCH v2 2/5] KVM: Shove vcpu stats_id init into kvm_vcpu_init() Date: Wed, 18 May 2022 17:58:08 +0000 [thread overview] Message-ID: <20220518175811.2758661-3-oupton@google.com> (raw) In-Reply-To: <20220518175811.2758661-1-oupton@google.com> Initialize the field alongside other kvm_vcpu fields. No functional change intended. Signed-off-by: Oliver Upton <oupton@google.com> --- virt/kvm/kvm_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 36dc9271d039..778151333ac0 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -440,6 +440,10 @@ static void kvm_vcpu_init(struct kvm_vcpu *vcpu, struct kvm *kvm, unsigned id) vcpu->ready = false; preempt_notifier_init(&vcpu->preempt_notifier, &kvm_preempt_ops); vcpu->last_used_slot = NULL; + + /* Fill the stats id string for the vcpu */ + snprintf(vcpu->stats_id, sizeof(vcpu->stats_id), "kvm-%d/vcpu-%d", + task_pid_nr(current), id); } static void kvm_vcpu_destroy(struct kvm_vcpu *vcpu) @@ -3807,10 +3811,6 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id) if (r) goto unlock_vcpu_destroy; - /* Fill the stats id string for the vcpu */ - snprintf(vcpu->stats_id, sizeof(vcpu->stats_id), "kvm-%d/vcpu-%d", - task_pid_nr(current), id); - /* Now it's all set up, let userspace reach it */ kvm_get_kvm(kvm); r = create_vcpu_fd(vcpu); -- 2.36.1.124.g0e6072fb45-goog _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next prev parent reply other threads:[~2022-05-18 17:59 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-18 17:58 [PATCH v2 0/5] KVM: Clean up debugfs+stats init/destroy Oliver Upton 2022-05-18 17:58 ` Oliver Upton 2022-05-18 17:58 ` [PATCH v2 1/5] KVM: Shove vm stats_id init into kvm_create_vm() Oliver Upton 2022-05-18 17:58 ` Oliver Upton 2022-06-16 17:46 ` Sean Christopherson 2022-06-16 17:46 ` Sean Christopherson 2022-06-16 17:48 ` Sean Christopherson 2022-06-16 17:48 ` Sean Christopherson 2022-05-18 17:58 ` Oliver Upton [this message] 2022-05-18 17:58 ` [PATCH v2 2/5] KVM: Shove vcpu stats_id init into kvm_vcpu_init() Oliver Upton 2022-06-16 17:47 ` Sean Christopherson 2022-06-16 17:47 ` Sean Christopherson 2022-05-18 17:58 ` [PATCH v2 3/5] KVM: Get an fd before creating the VM Oliver Upton 2022-05-18 17:58 ` Oliver Upton 2022-06-16 17:54 ` Sean Christopherson 2022-06-16 17:54 ` Sean Christopherson 2022-05-18 17:58 ` [PATCH v2 4/5] KVM: Actually create debugfs in kvm_create_vm() Oliver Upton 2022-05-18 17:58 ` Oliver Upton 2022-06-16 18:03 ` Sean Christopherson 2022-06-16 18:03 ` Sean Christopherson 2022-05-18 17:58 ` [PATCH v2 5/5] KVM: Hoist debugfs_dentry init to kvm_create_vm_debugfs() (again) Oliver Upton 2022-05-18 17:58 ` Oliver Upton 2022-06-16 18:05 ` Sean Christopherson 2022-06-16 18:05 ` Sean Christopherson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220518175811.2758661-3-oupton@google.com \ --to=oupton@google.com \ --cc=kvm@vger.kernel.org \ --cc=kvmarm@lists.cs.columbia.edu \ --cc=maz@kernel.org \ --cc=pbonzini@redhat.com \ --cc=seanjc@google.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.