From: Sean Christopherson <seanjc@google.com>
To: Oliver Upton <oupton@google.com>
Cc: pbonzini@redhat.com, kvmarm@lists.cs.columbia.edu,
kvm@vger.kernel.org, maz@kernel.org
Subject: Re: [PATCH v2 2/5] KVM: Shove vcpu stats_id init into kvm_vcpu_init()
Date: Thu, 16 Jun 2022 17:47:24 +0000 [thread overview]
Message-ID: <YqtsrEMf2poEmBcq@google.com> (raw)
In-Reply-To: <20220518175811.2758661-3-oupton@google.com>
On Wed, May 18, 2022, Oliver Upton wrote:
> Initialize the field alongside other kvm_vcpu fields. No functional
> change intended.
Same complaints as the previous changelog.
> 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-06-16 17:47 UTC|newest]
Thread overview: 12+ 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 ` [PATCH v2 1/5] KVM: Shove vm stats_id init into kvm_create_vm() Oliver Upton
2022-06-16 17:46 ` Sean Christopherson
2022-06-16 17:48 ` Sean Christopherson
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 [this message]
2022-05-18 17:58 ` [PATCH v2 3/5] KVM: Get an fd before creating the VM Oliver Upton
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-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-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=YqtsrEMf2poEmBcq@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=maz@kernel.org \
--cc=oupton@google.com \
--cc=pbonzini@redhat.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox