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

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



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

    build: convert HAS_MEM_ACCESS use to Kconfig
    
    Use the Kconfig generated CONFIG_HAS_MEM_ACCESS 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>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 config/arm32.mk              |    2 --
 config/arm64.mk              |    1 -
 config/x86_32.mk             |    1 -
 config/x86_64.mk             |    1 -
 xen/Rules.mk                 |    1 -
 xen/arch/arm/Kconfig         |    1 +
 xen/arch/x86/Kconfig         |    1 +
 xen/common/Kconfig           |    4 ++++
 xen/common/Makefile          |    2 +-
 xen/common/domctl.c          |    2 +-
 xen/common/vm_event.c        |    2 +-
 xen/include/xen/mem_access.h |    2 +-
 xen/include/xsm/dummy.h      |    2 +-
 xen/include/xsm/xsm.h        |    4 ++--
 xen/xsm/dummy.c              |    2 +-
 xen/xsm/flask/hooks.c        |    4 ++--
 16 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/config/arm32.mk b/config/arm32.mk
index 001b2cd..001e214 100644
--- a/config/arm32.mk
+++ b/config/arm32.mk
@@ -9,8 +9,6 @@ CONFIG_XEN_INSTALL_SUFFIX :=
 # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
 CFLAGS += -marm
 
-HAS_MEM_ACCESS := y
-
 # Use only if calling $(LD) directly.
 LDFLAGS_DIRECT += -EL
 
diff --git a/config/arm64.mk b/config/arm64.mk
index 1b9a47f..4b8fdf6 100644
--- a/config/arm64.mk
+++ b/config/arm64.mk
@@ -6,7 +6,6 @@ CONFIG_XEN_INSTALL_SUFFIX :=
 
 CFLAGS += #-marm -march= -mcpu= etc
 
-HAS_MEM_ACCESS := y
 HAS_GICV3 := y
 
 # Use only if calling $(LD) directly.
diff --git a/config/x86_32.mk b/config/x86_32.mk
index ed69447..0738192 100644
--- a/config/x86_32.mk
+++ b/config/x86_32.mk
@@ -5,7 +5,6 @@ CONFIG_X86_$(XEN_OS) := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
-HAS_MEM_ACCESS := y
 HAS_MEM_PAGING := y
 HAS_MEM_SHARING := y
 
diff --git a/config/x86_64.mk b/config/x86_64.mk
index f74611f..eabc634 100644
--- a/config/x86_64.mk
+++ b/config/x86_64.mk
@@ -6,7 +6,6 @@ CONFIG_COMPAT := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
-HAS_MEM_ACCESS := y
 HAS_MEM_PAGING := y
 HAS_MEM_SHARING := y
 
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 4ed0d11..9e2cff6 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_ACCESS)  += -DHAS_MEM_ACCESS
 CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
 CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index ec2406c..ec176a6 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -18,6 +18,7 @@ config ARM
        def_bool y
        select HAS_ARM_HDLCD
        select HAS_DEVICE_TREE
+       select HAS_MEM_ACCESS
        select HAS_PASSTHROUGH
        select HAS_PDX
        select HAS_VIDEO
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 393127d..b7705c2 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -9,6 +9,7 @@ config X86
        select HAS_GDBSX
        select HAS_IOPORTS
        select HAS_KEXEC
+       select HAS_MEM_ACCESS
        select HAS_NS16550
        select HAS_PASSTHROUGH
        select HAS_PCI
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 8d2ab4f..1193bbc 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -5,6 +5,10 @@ menu "Common Features"
 config HAS_DEVICE_TREE
        bool
 
+# Select HAS_MEM_ACCESS if mem access is supported
+config HAS_MEM_ACCESS
+       bool
+
 # Select HAS_PDX if PDX is supported
 config HAS_PDX
        bool
diff --git a/xen/common/Makefile b/xen/common/Makefile
index 0acd2b0..8ab15ba 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -18,7 +18,7 @@ obj-$(CONFIG_KEXEC) += kexec.o
 obj-$(CONFIG_KEXEC) += kimage.o
 obj-y += lib.o
 obj-y += lzo.o
-obj-$(HAS_MEM_ACCESS) += mem_access.o
+obj-$(CONFIG_HAS_MEM_ACCESS) += mem_access.o
 obj-y += memory.o
 obj-y += multicall.o
 obj-y += notifier.o
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 46b967e..1fab587 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -1130,7 +1130,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
u_domctl)
         d->disable_migrate = op->u.disable_migrate.disable;
         break;
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
     case XEN_DOMCTL_set_access_required:
         if ( unlikely(current->domain == d) )
             ret = -EPERM;
diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c
index e1f9580..0fe93dc 100644
--- a/xen/common/vm_event.c
+++ b/xen/common/vm_event.c
@@ -397,7 +397,7 @@ void vm_event_resume(struct domain *d, struct 
vm_event_domain *ved)
             vm_event_register_write_resume(v, &rsp);
             break;
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
         case VM_EVENT_REASON_MEM_ACCESS:
             mem_access_resume(v, &rsp);
             break;
diff --git a/xen/include/xen/mem_access.h b/xen/include/xen/mem_access.h
index 111f1fe..272f1e4 100644
--- a/xen/include/xen/mem_access.h
+++ b/xen/include/xen/mem_access.h
@@ -25,7 +25,7 @@
 #include <public/memory.h>
 #include <asm/p2m.h>
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
 
 int mem_access_memop(unsigned long cmd,
                      XEN_GUEST_HANDLE_PARAM(xen_mem_access_op_t) arg);
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 5e6ee71..bdc7d1b 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -560,7 +560,7 @@ static XSM_INLINE int xsm_vm_event_control(XSM_DEFAULT_ARG 
struct domain *d, int
     return xsm_default_action(action, current->domain, d);
 }
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
 static XSM_INLINE int xsm_mem_access(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 1dac834..714b3bf 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -152,7 +152,7 @@ struct xsm_operations {
 
     int (*vm_event_control) (struct domain *d, int mode, int op);
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
     int (*mem_access) (struct domain *d);
 #endif
 
@@ -604,7 +604,7 @@ static inline int xsm_vm_event_control (xsm_default_t def, 
struct domain *d, int
     return xsm_ops->vm_event_control(d, mode, op);
 }
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
 static inline int xsm_mem_access (xsm_default_t def, struct domain *d)
 {
     return xsm_ops->mem_access(d);
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index 6f4101c..ee4d6f3 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -129,7 +129,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
 
     set_to_dummy_if_null(ops, vm_event_control);
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
     set_to_dummy_if_null(ops, mem_access);
 #endif
 
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 454b0ce..0102cc0 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1192,7 +1192,7 @@ static int flask_vm_event_control(struct domain *d, int 
mode, int op)
     return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__VM_EVENT);
 }
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
 static int flask_mem_access(struct domain *d)
 {
     return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__MEM_ACCESS);
@@ -1705,7 +1705,7 @@ static struct xsm_operations flask_ops = {
 
     .vm_event_control = flask_vm_event_control,
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
     .mem_access = flask_mem_access,
 #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®.