]> xenbits.xensource.com Git - people/julieng/xen-unstable.git/commitdiff
build: convert HAS_MEM_SHARING use to Kconfig
authorDoug Goldstein <cardoe@cardoe.com>
Tue, 15 Dec 2015 13:14:00 +0000 (14:14 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 16 Dec 2015 16:54:55 +0000 (17:54 +0100)
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/x86_32.mk
config/x86_64.mk
xen/Rules.mk
xen/arch/x86/Kconfig
xen/common/Kconfig
xen/common/memory.c
xen/common/vm_event.c
xen/include/xsm/dummy.h
xen/include/xsm/xsm.h
xen/xsm/dummy.c
xen/xsm/flask/hooks.c

index 0fbc20d8ccfeb794d70d4e128e6f1f8d0193e498..29d13f77737da7217193f861c963b65718cdf58e 100644 (file)
@@ -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.
index b4b01639d2a75f7aa6a25c8f460291b335a6f716..f12d549c05f105288faeb23ec29068cf178158ac 100644 (file)
@@ -6,8 +6,6 @@ CONFIG_COMPAT := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
-HAS_MEM_SHARING := y
-
 CONFIG_XEN_INSTALL_SUFFIX := .gz
 
 CFLAGS += -m64
index 38c29b2be262dd683f069b882f33dfee1a8b3770..8839dca85b1a2d7034a8adbd131dd1f2f795c9ab 100644 (file)
@@ -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),)
index cca768b9d369045a1f840ddab966c959a6b3cdaa..07e366d83fca09433a829f5f4601750539d90807 100644 (file)
@@ -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
index 946cca2acf178d80c51c2a11f653518f38110ee4..7d0e9a990754fdfe5b34981bbaedffcd0368eb2f 100644 (file)
@@ -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
index bd8bf75ba3f17807ff16a4d398246a30d8b1a953..9ff1145659ea3f77eb09725b3f60de4e49d9c5d9 100644 (file)
@@ -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 )
index 2e59e417327c0452bc8d5f0648d540bd3dac4972..28a7add2ef70d840b67cbd38274c9b3da561d3ee 100644 (file)
@@ -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;
index 2825226298bdb641a7c8b2f93a235b7644795ae6..81fba406f3a26f74e8a757d674facb717e56c040 100644 (file)
@@ -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);
index f24b7c3fe09a82bf732f1d40aa1322be5ffac7d6..3fc3824cafbe2166764b39f629a81d70048720f2 100644 (file)
@@ -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);
index d061c5bd374125b6b853dc9b0bcf4d62657a1030..0f32636e39448dc26168b10709f5dd7566a323bd 100644 (file)
@@ -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
 
index 52478ff1cd64b1483c2af7c42954110d2d063abe..9b7de309694445f82f7b5c0febec9267d5eb449e 100644 (file)
@@ -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