Use the Kconfig generated CONFIG_HAS_MEM_SHARING defines in the code base.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
CONFIG_MIGRATE := y
CONFIG_XCUTILS := y
-HAS_MEM_SHARING := y
-
CFLAGS += -m32 -march=i686
# Use only if calling $(LD) directly.
CONFIG_MIGRATE := y
CONFIG_XCUTILS := y
-HAS_MEM_SHARING := y
-
CONFIG_XEN_INSTALL_SUFFIX := .gz
CFLAGS += -m64
CFLAGS-$(perfc) += -DPERF_COUNTERS
CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
CFLAGS-$(lock_profile) += -DLOCK_PROFILE
-CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
ifneq ($(max_phys_cpus),)
select HAS_KEXEC
select HAS_MEM_ACCESS
select HAS_MEM_PAGING
+ select HAS_MEM_SHARING
select HAS_NS16550
select HAS_PASSTHROUGH
select HAS_PCI
config HAS_MEM_PAGING
bool
+# Select HAS_MEM_SHARING if mem sharing is supported
+config HAS_MEM_SHARING
+ bool
+
# Select HAS_PDX if PDX is supported
config HAS_PDX
bool
return -ENOENT;
}
#endif
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
if ( p2m_is_shared(p2mt) )
{
if ( page )
vm_event_resume(v->domain, &v->domain->vm_event->monitor);
}
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
/* Registered with Xen-bound event channel for incoming notifications. */
static void mem_sharing_notification(struct vcpu *v, unsigned int port)
{
destroy_waitqueue_head(&d->vm_event->monitor.wq);
(void)vm_event_disable(d, &d->vm_event->monitor);
}
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
if ( d->vm_event->share.ring_page )
{
destroy_waitqueue_head(&d->vm_event->share.wq);
}
break;
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
case XEN_DOMCTL_VM_EVENT_OP_SHARING:
{
struct vm_event_domain *ved = &d->vm_event->share;
}
#endif
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
static XSM_INLINE int xsm_mem_sharing(XSM_DEFAULT_ARG struct domain *d)
{
XSM_ASSERT_ACTION(XSM_DM_PRIV);
int (*mem_paging) (struct domain *d);
#endif
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
int (*mem_sharing) (struct domain *d);
#endif
}
#endif
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
static inline int xsm_mem_sharing (xsm_default_t def, struct domain *d)
{
return xsm_ops->mem_sharing(d);
set_to_dummy_if_null(ops, mem_paging);
#endif
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
set_to_dummy_if_null(ops, mem_sharing);
#endif
}
#endif
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
static int flask_mem_sharing(struct domain *d)
{
return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__MEM_SHARING);
.mem_paging = flask_mem_paging,
#endif
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
.mem_sharing = flask_mem_sharing,
#endif