From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Wei Huang <wei@redhat.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, gleb@kernel.org
Subject: Re: [PATCH V2 3/5] KVM: x86/vPMU: Create vPMU interface for VMX and SVM
Date: Fri, 10 Apr 2015 14:57:35 +0200 [thread overview]
Message-ID: <20150410125735.GA6783@potion.brq.redhat.com> (raw)
In-Reply-To: <1428509905-32352-4-git-send-email-wei@redhat.com>
2015-04-08 12:18-0400, Wei Huang:
> +/* Called before using any PMU functions above */
> +int kvm_pmu_arch_init(struct kvm_x86_ops *x86_ops)
> +{
> + kvm_pmu_ops = x86_ops->get_pmu_ops();
> +
> + if (x86_ops && (kvm_pmu_ops = x86_ops->get_pmu_ops()) != NULL)
> + return 0;
> + else
> + return -EINVAL;
> +}
> @@ -5782,6 +5783,9 @@ int kvm_arch_init(void *opaque)
>
> kvm_timer_init();
>
> + /* init pointers of PMU operations */
> + kvm_pmu_arch_init(ops);
I missed this yesterday ... the return value isn't used, so we could
check and return here, or save all the complexity in kvm_pmu_arch_init()
when we are going to BUG anyway.
(Also, the comment misalignment is caused by indentation using spaces.)
next prev parent reply other threads:[~2015-04-10 12:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 16:18 [PATCH V2 0/5] KVM vPMU support for AMD Wei Huang
2015-04-08 16:18 ` [PATCH V2 1/5] KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch Wei Huang
2015-04-08 16:18 ` [PATCH V2 2/5] KVM: x86/vPMU: Rename pmu.c file to pmu_intel.c Wei Huang
2015-04-09 19:10 ` Radim Krčmář
2015-04-09 19:23 ` Wei Huang
2015-04-08 16:18 ` [PATCH V2 3/5] KVM: x86/vPMU: Create vPMU interface for VMX and SVM Wei Huang
2015-04-09 19:43 ` Radim Krčmář
2015-04-09 20:03 ` Wei Huang
2015-04-09 20:54 ` Radim Krčmář
2015-04-09 21:08 ` Wei Huang
2015-04-10 12:53 ` Radim Krčmář
2015-04-20 18:33 ` Wei Huang
2015-04-21 9:33 ` Radim Krčmář
2015-04-10 12:57 ` Radim Krčmář [this message]
2015-04-08 16:18 ` [PATCH V2 4/5] KVM: x86/vPMU: Implement vPMU code AMD CPUs Wei Huang
2015-04-08 16:18 ` [PATCH V2 5/5] KVM: x86/vPMU: Enable PMU handling for AMD PERFCTRn and EVNTSELn MSRs Wei Huang
2015-04-08 16:22 ` [PATCH V2 0/5] KVM vPMU support for AMD Wei Huang
2015-04-09 19:05 ` Radim Krčmář
2015-04-09 19:19 ` Wei Huang
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=20150410125735.GA6783@potion.brq.redhat.com \
--to=rkrcmar@redhat.com \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=wei@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