[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] build: convert HAS_MEM_SHARING use to Kconfig



commit 384cc72afccb4c6069d4814a2ac01557d1d0a7b5
Author:     Doug Goldstein <cardoe@xxxxxxxxxx>
AuthorDate: Tue Dec 15 14:14:00 2015 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Dec 16 17:54:55 2015 +0100

    build: convert HAS_MEM_SHARING use to Kconfig
    
    Use the Kconfig generated CONFIG_HAS_MEM_SHARING defines in the code base.
    
    Signed-off-by: Doug Goldstein <cardoe@xxxxxxxxxx>
    Acked-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
---
 config/x86_32.mk        |    2 --
 config/x86_64.mk        |    2 --
 xen/Rules.mk            |    1 -
 xen/arch/x86/Kconfig    |    1 +
 xen/common/Kconfig      |    4 ++++
 xen/common/memory.c     |    2 +-
 xen/common/vm_event.c   |    6 +++---
 xen/include/xsm/dummy.h |    2 +-
 xen/include/xsm/xsm.h   |    4 ++--
 xen/xsm/dummy.c         |    2 +-
 xen/xsm/flask/hooks.c   |    4 ++--
 11 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/config/x86_32.mk b/config/x86_32.mk
index 0fbc20d..29d13f7 100644
--- a/config/x86_32.mk
+++ b/config/x86_32.mk
@@ -5,8 +5,6 @@ CONFIG_X86_$(XEN_OS) := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
-HAS_MEM_SHARING := y
-
 CFLAGS += -m32 -march=i686
 
 # Use only if calling $(LD) directly.
diff --git a/config/x86_64.mk b/config/x86_64.mk
index b4b0163..f12d549 100644
--- a/config/x86_64.mk
+++ b/config/x86_64.mk
@@ -6,8 +6,6 @@ CONFIG_COMPAT := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
-HAS_MEM_SHARING := y
-
 CONFIG_XEN_INSTALL_SUFFIX := .gz
 
 CFLAGS += -m64
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 38c29b2..8839dca 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -59,7 +59,6 @@ CFLAGS-$(crash_debug)   += -DCRASH_DEBUG
 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),)
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index cca768b..07e366d 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -11,6 +11,7 @@ config X86
        select HAS_KEXEC
        select HAS_MEM_ACCESS
        select HAS_MEM_PAGING
+       select HAS_MEM_SHARING
        select HAS_NS16550
        select HAS_PASSTHROUGH
        select HAS_PCI
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 946cca2..7d0e9a9 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -13,6 +13,10 @@ config HAS_MEM_ACCESS
 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
diff --git a/xen/common/memory.c b/xen/common/memory.c
index bd8bf75..9ff1145 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -1332,7 +1332,7 @@ int prepare_ring_for_helper(
         return -ENOENT;
     }
 #endif
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
     if ( p2m_is_shared(p2mt) )
     {
         if ( page )
diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c
index 2e59e41..28a7add 100644
--- a/xen/common/vm_event.c
+++ b/xen/common/vm_event.c
@@ -518,7 +518,7 @@ static void monitor_notification(struct vcpu *v, unsigned 
int port)
         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)
 {
@@ -549,7 +549,7 @@ void vm_event_cleanup(struct domain *d)
         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);
@@ -682,7 +682,7 @@ int vm_event_domctl(struct domain *d, 
xen_domctl_vm_event_op_t *vec,
     }
     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;
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 2825226..81fba40 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -576,7 +576,7 @@ static XSM_INLINE int xsm_mem_paging(XSM_DEFAULT_ARG struct 
domain *d)
 }
 #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);
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index f24b7c3..3fc3824 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -160,7 +160,7 @@ struct xsm_operations {
     int (*mem_paging) (struct domain *d);
 #endif
 
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
     int (*mem_sharing) (struct domain *d);
 #endif
 
@@ -618,7 +618,7 @@ static inline int xsm_mem_paging (xsm_default_t def, struct 
domain *d)
 }
 #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);
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index d061c5b..0f32636 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -137,7 +137,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     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
 
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 52478ff..9b7de30 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1206,7 +1206,7 @@ static int flask_mem_paging(struct domain *d)
 }
 #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);
@@ -1713,7 +1713,7 @@ static struct xsm_operations flask_ops = {
     .mem_paging = flask_mem_paging,
 #endif
 
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
     .mem_sharing = flask_mem_sharing,
 #endif
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.