#define compat_kexec_op do_ni_hypercall
#endif
+#ifndef CONFIG_TMEM
+#define do_tmem_op do_ni_hypercall
+#endif
+
#ifndef CONFIG_XENOPROF
#define compat_xenoprof_op do_ni_hypercall
#endif
#define do_kexec_op do_ni_hypercall
#endif
+#ifndef CONFIG_TMEM
+#define do_tmem_op do_ni_hypercall
+#endif
+
#ifndef CONFIG_XENOPROF
#define do_xenoprof_op do_ni_hypercall
#endif
If unsure, say N.
+# Enables transcendent memory support
+config TMEM
+ def_bool y
+ prompt "Transcendent Memory Support" if EXPERT = "y"
+ ---help---
+ Transcendent memory allows PV-aware guests to collaborate on memory
+ usage. Guests can 'swap' their memory to the hypervisor or have an
+ collective pool of memory shared across guests. The end result is
+ less memory usage by guests allowing higher guest density.
+
+ You also have to enable it on the Xen commandline by using tmem=1
+
+ If unsure, say Y.
+
# Adds support for Xenoprof
config XENOPROF
def_bool y
obj-y += tasklet.o
obj-y += time.o
obj-y += timer.o
-obj-y += tmem.o
-obj-y += tmem_xen.o
obj-y += trace.o
obj-y += version.o
obj-y += vm_event.o
obj-$(perfc) += perfc.o
obj-$(crash_debug) += gdbstub.o
-obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o multicall.o tmem_xen.o xlat.o)
+obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o multicall.o xlat.o)
+
+tmem-y := tmem.o tmem_xen.o
+tmem-$(CONFIG_COMPAT) += compat/tmem_xen.o
+obj-$(CONFIG_TMEM) += $(tmem-y)
subdir-$(CONFIG_X86) += hvm
do_xsm_op(
XEN_GUEST_HANDLE_PARAM(xsm_op_t) u_xsm_op);
+#ifdef CONFIG_TMEM
extern long
do_tmem_op(
XEN_GUEST_HANDLE_PARAM(tmem_op_t) uops);
+#else
+#define do_tmem_op do_ni_hypercall
+#endif
extern long
do_xenoprof_op(int op, XEN_GUEST_HANDLE_PARAM(void) arg);
struct xen_sysctl_tmem_op;
+#ifdef CONFIG_TMEM
extern int tmem_control(struct xen_sysctl_tmem_op *op);
extern void tmem_destroy(void *);
extern void *tmem_relinquish_pages(unsigned int, unsigned int);
extern unsigned long tmem_freeable_pages(void);
+#else
+static inline int
+tmem_control(struct xen_sysctl_tmem_op *op)
+{
+ return -ENOSYS;
+}
+
+static inline void
+tmem_destroy(void *p)
+{
+ return;
+}
+
+static inline void *
+tmem_relinquish_pages(unsigned int x, unsigned int y)
+{
+ return NULL;
+}
+
+static inline unsigned long
+tmem_freeable_pages(void)
+{
+ return 0;
+}
+#endif /* CONFIG_TMEM */
#endif /* __XEN_TMEM_H__ */
return opt_tmem_shared_auth;
}
+#ifdef CONFIG_TMEM
extern bool_t opt_tmem;
static inline bool_t tmem_enabled(void)
{
{
opt_tmem = 0;
}
+#else
+static inline bool_t tmem_enabled(void)
+{
+ return 0;
+}
+
+static inline void tmem_disable(void)
+{
+}
+#endif /* CONFIG_TMEM */
/*
* Memory free page list management