All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Goldstein <cardoe@cardoe.com>
To: xen-devel@lists.xen.org
Cc: Tamas K Lengyel <tamas@tklengyel.com>, Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Razvan Cojocaru <rcojocaru@bitdefender.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Doug Goldstein <cardoe@cardoe.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Jan Beulich <jbeulich@suse.com>,
	Daniel De Graaf <dgdegra@tycho.nsa.gov>
Subject: [PATCHv2] 22/27] build: convert HAS_MEM_ACCESS use to Kconfig
Date: Wed, 11 Nov 2015 10:50:12 -0600	[thread overview]
Message-ID: <1447260617-10138-23-git-send-email-cardoe@cardoe.com> (raw)
In-Reply-To: <1447260617-10138-1-git-send-email-cardoe@cardoe.com>

Use the Kconfig generated CONFIG_HAS_MEM_ACCESS defines in the code base.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>

CC: Ian Campbell <ian.campbell@citrix.com>
CC: Stefano Stabellini <stefano.stabellini@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <jbeulich@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Razvan Cojocaru <rcojocaru@bitdefender.com>
CC: Tamas K Lengyel <tamas@tklengyel.com>
CC: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
 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 | 4 ++--
 xen/include/xsm/dummy.h      | 2 +-
 xen/include/xsm/xsm.h        | 4 ++--
 xen/xsm/dummy.c              | 2 +-
 xen/xsm/flask/hooks.c        | 4 ++--
 12 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 4d90aca..f5ffe9d 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -56,7 +56,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 ea9d069..b59d351 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -21,6 +21,7 @@ config ARM
 	select HAS_ARM_HDLCD
 	select HAS_PASSTHROUGH
 	select HAS_PDX
+	select HAS_MEM_ACCESS
 
 config ARCH_DEFCONFIG
 	string
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 89f685a..95a53e9 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -15,6 +15,7 @@ config X86
 	select HAS_GDBSX
 	select HAS_PDX
 	select HAS_KEXEC
+	select HAS_MEM_ACCESS
 
 config ARCH_DEFCONFIG
 	string
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 6987e84..bdb95f0 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..90efe01 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);
@@ -58,7 +58,7 @@ void mem_access_resume(struct vcpu *vcpu, vm_event_response_t *rsp)
     /* Nothing to do. */
 }
 
-#endif /* HAS_MEM_ACCESS */
+#endif /* CONFIG_HAS_MEM_ACCESS */
 
 #endif /* _XEN_ASM_MEM_ACCESS_H */
 
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 42e696a..7a9006b 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 c843a41..a550ae2 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
 
@@ -603,7 +603,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 e8741a4..19fb8f7 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 db01875..82cc79b 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
 
-- 
2.4.10

  parent reply	other threads:[~2015-11-11 16:50 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11 16:49 [PATCHv2] 00/27] Kconfig conversion Doug Goldstein
2015-11-11 16:49 ` [PATCHv2] 01/27] build: import Kbuild/Kconfig from Linux 4.2 Doug Goldstein
2015-11-11 16:49 ` [PATCHv2] 02/27] build: hookup Kconfig build and usage Doug Goldstein
2015-11-11 16:49 ` [PATCHv2] 03/27] build: convert HAS_PASSTHROUGH use to Kconfig Doug Goldstein
2015-11-12 15:48   ` Daniel De Graaf
2015-11-11 16:49 ` [PATCHv2] 04/27] build: convert HAS_DEVICE_TREE " Doug Goldstein
2015-11-12 15:49   ` Daniel De Graaf
2015-11-11 16:49 ` [PATCHv2] 05/27] build: convert HAS_PCI " Doug Goldstein
2015-11-12 15:50   ` Daniel De Graaf
2015-11-11 16:49 ` [PATCHv2] 06/27] build: convert HAS_NS16550 " Doug Goldstein
2015-11-11 16:49 ` [PATCHv2] 07/27] build: convert HAS_IOPORTS " Doug Goldstein
2015-11-11 16:49 ` [PATCHv2] 08/27] build: convert HAS_ACPI " Doug Goldstein
2015-11-11 16:49 ` [PATCHv2] 09/27] build: convert HAS_VIDEO " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 10/27] build: convert HAS_VGA " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 11/27] build: convert HAS_CPUFREQ " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 12/27] build: convert HAS_GDBSX " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 13/27] build: convert HAS_PDX " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 14/27] build: convert HAS_KEXEC " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 15/27] build: convert HAS_ARM_HDLCD " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 16/27] build: convert HAS_CADENCE_UART " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 17/27] build: convert HAS_PL011 " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 18/27] build: convert HAS_EXYNOS4210 " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 19/27] build: convert HAS_OMAP " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 20/27] build: convert HAS_SCIF " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 21/27] build: convert HAS_EHCI " Doug Goldstein
2015-11-11 16:50 ` Doug Goldstein [this message]
2015-11-12  8:58   ` [PATCHv2] 22/27] build: convert HAS_MEM_ACCESS " Razvan Cojocaru
2015-11-12 15:51   ` Daniel De Graaf
2015-11-11 16:50 ` [PATCHv2] 23/27] build: convert HAS_MEM_PAGING " Doug Goldstein
2015-11-12  8:59   ` Razvan Cojocaru
2015-11-12 15:52   ` Daniel De Graaf
2015-11-11 16:50 ` [PATCHv2] 24/27] build: convert HAS_MEM_SHARING " Doug Goldstein
2015-11-12  9:00   ` Razvan Cojocaru
2015-11-12 15:52   ` Daniel De Graaf
2015-11-11 16:50 ` [PATCHv2] 25/27] build: convert HAS_GICV3 " Doug Goldstein
2015-11-11 16:50 ` [PATCHv2] 26/27] build: convert CONFIG_COMPAT " Doug Goldstein
2015-11-11 17:46   ` Andrew Cooper
2015-11-11 16:50 ` [PATCHv2] 27/27] build: convert kexec options to CONFIG_KEXEC Doug Goldstein
2015-11-11 18:01 ` [PATCHv2] 00/27] Kconfig conversion Doug Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447260617-10138-23-git-send-email-cardoe@cardoe.com \
    --to=cardoe@cardoe.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=ian.campbell@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=rcojocaru@bitdefender.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tamas@tklengyel.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.