From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
x86@kernel.org, Andrew Jones <drjones@redhat.com>,
David Vrabel <david.vrabel@citrix.com>
Subject: [RFC PATCH KERNEL 4/4] x86/xen: put setup.c, pmu.c and apic.c under CONFIG_XEN_PV
Date: Mon, 14 Nov 2016 18:17:49 +0100 [thread overview]
Message-ID: <1479143869-27611-5-git-send-email-vkuznets@redhat.com> (raw)
In-Reply-To: <1479143869-27611-1-git-send-email-vkuznets@redhat.com>
xen_pmu_init/finish() functions are used in suspend.c and
enlighten_common.c, add stubs for now.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
arch/x86/xen/Kconfig | 2 +-
arch/x86/xen/Makefile | 4 ++--
arch/x86/xen/pmu.h | 5 +++++
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig
index e25c93e..484d6b8 100644
--- a/arch/x86/xen/Kconfig
+++ b/arch/x86/xen/Kconfig
@@ -6,7 +6,6 @@ config XEN
bool "Xen guest support"
depends on PARAVIRT
select PARAVIRT_CLOCK
- select XEN_HAVE_VPMU
depends on X86_64 || (X86_32 && X86_PAE)
depends on X86_LOCAL_APIC && X86_TSC
help
@@ -18,6 +17,7 @@ config XEN_PV
bool "Xen PV guest support"
default y
depends on XEN
+ select XEN_HAVE_VPMU
help
Support running as a Xen PV guest.
diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile
index 121a368..8ec52f0 100644
--- a/arch/x86/xen/Makefile
+++ b/arch/x86/xen/Makefile
@@ -13,9 +13,9 @@ CFLAGS_mmu.o := $(nostackp)
obj-y := enlighten_common.o multicalls.o \
irq.o time.o xen-asm.o xen-asm_$(BITS).o \
grant-table.o suspend.o platform-pci-unplug.o \
- apic.o pmu.o mmu_common.o
+ mmu_common.o
-obj-$(CONFIG_XEN_PV) += enlighten.o setup.o mmu.o p2m.o
+obj-$(CONFIG_XEN_PV) += enlighten.o setup.o mmu.o p2m.o pmu.o apic.o
obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o
obj-$(CONFIG_EVENT_TRACING) += trace.o
diff --git a/arch/x86/xen/pmu.h b/arch/x86/xen/pmu.h
index af5f0ad..4be5355 100644
--- a/arch/x86/xen/pmu.h
+++ b/arch/x86/xen/pmu.h
@@ -4,8 +4,13 @@
#include <xen/interface/xenpmu.h>
irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id);
+#ifdef CONFIG_XEN_HAVE_VPMU
void xen_pmu_init(int cpu);
void xen_pmu_finish(int cpu);
+#else
+static inline void xen_pmu_init(int cpu) {}
+static inline void xen_pmu_finish(int cpu) {}
+#endif
bool is_xen_pmu(int cpu);
bool pmu_msr_read(unsigned int msr, uint64_t *val, int *err);
bool pmu_msr_write(unsigned int msr, uint32_t low, uint32_t high, int *err);
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-11-14 17:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 17:17 [RFC PATCH KERNEL 0/4] x86/xen: untangle PV and PVHVM guest support code Vitaly Kuznetsov
2016-11-14 17:17 ` [RFC PATCH KERNEL 1/4] x86/xen: start untangling " Vitaly Kuznetsov
2016-11-15 11:26 ` David Vrabel
2016-11-15 12:08 ` Vitaly Kuznetsov
2016-11-15 15:50 ` Boris Ostrovsky
2016-11-14 17:17 ` [RFC PATCH KERNEL 2/4] x86/xen: split smp.c for PV and PVHVM guests Vitaly Kuznetsov
2016-11-14 17:17 ` [RFC PATCH KERNEL 3/4] x86/xen: put setup.c, mmu.c and p2m.c under CONFIG_XEN_PV Vitaly Kuznetsov
2016-11-14 17:17 ` Vitaly Kuznetsov [this message]
2016-11-14 18:21 ` [RFC PATCH KERNEL 0/4] x86/xen: untangle PV and PVHVM guest support code David Vrabel
2016-11-14 18:47 ` Boris Ostrovsky
2016-11-15 11:14 ` Vitaly Kuznetsov
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=1479143869-27611-5-git-send-email-vkuznets@redhat.com \
--to=vkuznets@redhat.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=drjones@redhat.com \
--cc=jgross@suse.com \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.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).