From: Andrew Jones <drjones@redhat.com>
To: Wei Huang <wei@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
pbonzini@redhat.com, gleb@kernel.org, tglx@linutronix.de,
mingo@redhat.com, hpa@zytor.com, x86@kernel.org, joro@8bytes.org,
trivial@kernel.org
Subject: Re: [KVM x86 vPMU Patch 1/2] KVM: x86/vPMU: Move the definition of kvm_pmu_ops to arch-specific files
Date: Tue, 11 Aug 2015 09:32:51 +0200 [thread overview]
Message-ID: <20150811073251.GD4441@hawk.localdomain> (raw)
In-Reply-To: <1438977210-24787-2-git-send-email-wei@redhat.com>
On Fri, Aug 07, 2015 at 03:53:29PM -0400, Wei Huang wrote:
> Instead of being defined in a common header file, the kvm_pmu_ops struct
> is arch (vmx/svm) specific. This trivial patch relocates two extern
> variable definition to their arch-specific files.
>
> Signed-off-by: Wei Huang <wei@redhat.com>
> ---
> arch/x86/kvm/pmu.h | 2 --
> arch/x86/kvm/svm.c | 1 +
> arch/x86/kvm/vmx.c | 1 +
> 3 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/pmu.h b/arch/x86/kvm/pmu.h
> index f96e1f9..95184fd 100644
> --- a/arch/x86/kvm/pmu.h
> +++ b/arch/x86/kvm/pmu.h
> @@ -113,6 +113,4 @@ void kvm_pmu_reset(struct kvm_vcpu *vcpu);
> void kvm_pmu_init(struct kvm_vcpu *vcpu);
> void kvm_pmu_destroy(struct kvm_vcpu *vcpu);
>
> -extern struct kvm_pmu_ops intel_pmu_ops;
> -extern struct kvm_pmu_ops amd_pmu_ops;
> #endif /* __KVM_X86_PMU_H */
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 8e0c084..8abf980 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -4452,6 +4452,7 @@ static void svm_sched_in(struct kvm_vcpu *vcpu, int cpu)
> {
> }
>
> +extern struct kvm_pmu_ops amd_pmu_ops;
> static struct kvm_x86_ops svm_x86_ops = {
> .cpu_has_kvm_support = has_svm,
> .disabled_by_bios = is_disabled,
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 83b7b5c..6b2419d 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -10302,6 +10302,7 @@ static void vmx_enable_log_dirty_pt_masked(struct kvm *kvm,
> kvm_mmu_clear_dirty_pt_masked(kvm, memslot, offset, mask);
> }
>
> +extern struct kvm_pmu_ops intel_pmu_ops;
> static struct kvm_x86_ops vmx_x86_ops = {
> .cpu_has_kvm_support = cpu_has_kvm_support,
> .disabled_by_bios = vmx_disabled_by_bios,
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Reviewed-by: Andrew Jones <drjones@redhat.com>
next prev parent reply other threads:[~2015-08-11 7:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 19:53 [KVM x86 vPMU Patch 0/2] Two vPMU Trivial Patches Wei Huang
2015-08-07 19:53 ` [KVM x86 vPMU Patch 1/2] KVM: x86/vPMU: Move the definition of kvm_pmu_ops to arch-specific files Wei Huang
2015-08-11 7:32 ` Andrew Jones [this message]
2015-08-07 19:53 ` [KVM x86 vPMU Patch 2/2] KVM: x86/vPMU: Fix unnecessary signed extension for AMD PERFCTRn Wei Huang
2015-08-11 7:33 ` Andrew Jones
2015-08-11 13:21 ` [KVM x86 vPMU Patch 0/2] Two vPMU Trivial Patches Paolo Bonzini
2015-08-11 14:52 ` 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=20150811073251.GD4441@hawk.localdomain \
--to=drjones@redhat.com \
--cc=gleb@kernel.org \
--cc=hpa@zytor.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=trivial@kernel.org \
--cc=wei@redhat.com \
--cc=x86@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).