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>,
	Razvan Cojocaru <rcojocaru@bitdefender.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Doug Goldstein <cardoe@cardoe.com>,
	Jan Beulich <jbeulich@suse.com>,
	Daniel De Graaf <dgdegra@tycho.nsa.gov>
Subject: [PATCHv2] 23/27] build: convert HAS_MEM_PAGING use to Kconfig
Date: Wed, 11 Nov 2015 10:50:13 -0600	[thread overview]
Message-ID: <1447260617-10138-24-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_PAGING defines in the code base.

Signed-off-by: Doug Goldstein <cardoe@cardoe.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>
---
 config/x86_32.mk        | 1 -
 config/x86_64.mk        | 1 -
 xen/Rules.mk            | 1 -
 xen/arch/x86/Kconfig    | 1 +
 xen/common/Kconfig      | 4 ++++
 xen/common/memory.c     | 2 +-
 xen/common/vm_event.c   | 8 ++++----
 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, 16 insertions(+), 14 deletions(-)

diff --git a/config/x86_32.mk b/config/x86_32.mk
index ed69447..cf3d27f 100644
--- a/config/x86_32.mk
+++ b/config/x86_32.mk
@@ -6,7 +6,6 @@ CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
 HAS_MEM_ACCESS := y
-HAS_MEM_PAGING := y
 HAS_MEM_SHARING := y
 
 CFLAGS += -m32 -march=i686
diff --git a/config/x86_64.mk b/config/x86_64.mk
index f74611f..4880681 100644
--- a/config/x86_64.mk
+++ b/config/x86_64.mk
@@ -7,7 +7,6 @@ CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
 HAS_MEM_ACCESS := y
-HAS_MEM_PAGING := y
 HAS_MEM_SHARING := y
 
 CONFIG_XEN_INSTALL_SUFFIX := .gz
diff --git a/xen/Rules.mk b/xen/Rules.mk
index f5ffe9d..3b8fd66 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_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/x86/Kconfig b/xen/arch/x86/Kconfig
index 95a53e9..ed67a66 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -16,6 +16,7 @@ config X86
 	select HAS_PDX
 	select HAS_KEXEC
 	select HAS_MEM_ACCESS
+	select HAS_MEM_PAGING
 
 config ARCH_DEFCONFIG
 	string
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index bdb95f0..f6cfb9e 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -9,6 +9,10 @@ config HAS_DEVICE_TREE
 config HAS_MEM_ACCESS
 	bool
 
+# Select HAS_MEM_PAGING if mem paging is supported
+config HAS_MEM_PAGING
+	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 da4eb36..5180fa8 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -1282,7 +1282,7 @@ int prepare_ring_for_helper(
 
     page = get_page_from_gfn(d, gmfn, &p2mt, P2M_UNSHARE);
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
     if ( p2m_is_paging(p2mt) )
     {
         if ( page )
diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c
index 0fe93dc..2e59e41 100644
--- a/xen/common/vm_event.c
+++ b/xen/common/vm_event.c
@@ -403,7 +403,7 @@ void vm_event_resume(struct domain *d, struct vm_event_domain *ved)
             break;
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
         case VM_EVENT_REASON_MEM_PAGING:
             p2m_mem_paging_resume(d, &rsp);
             break;
@@ -502,7 +502,7 @@ int __vm_event_claim_slot(struct domain *d, struct vm_event_domain *ved,
         return vm_event_grab_slot(ved, (current->domain != d));
 }
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
 /* Registered with Xen-bound event channel for incoming notifications. */
 static void mem_paging_notification(struct vcpu *v, unsigned int port)
 {
@@ -530,7 +530,7 @@ static void mem_sharing_notification(struct vcpu *v, unsigned int port)
 /* Clean up on domain destruction */
 void vm_event_cleanup(struct domain *d)
 {
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
     if ( d->vm_event->paging.ring_page )
     {
         /* Destroying the wait queue head means waking up all
@@ -592,7 +592,7 @@ int vm_event_domctl(struct domain *d, xen_domctl_vm_event_op_t *vec,
 
     switch ( vec->mode )
     {
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
     case XEN_DOMCTL_VM_EVENT_OP_PAGING:
     {
         struct vm_event_domain *ved = &d->vm_event->paging;
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 7a9006b..dd7618f 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -568,7 +568,7 @@ static XSM_INLINE int xsm_mem_access(XSM_DEFAULT_ARG struct domain *d)
 }
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
 static XSM_INLINE int xsm_mem_paging(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 a550ae2..b23ecda 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -156,7 +156,7 @@ struct xsm_operations {
     int (*mem_access) (struct domain *d);
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
     int (*mem_paging) (struct domain *d);
 #endif
 
@@ -610,7 +610,7 @@ static inline int xsm_mem_access (xsm_default_t def, struct domain *d)
 }
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
 static inline int xsm_mem_paging (xsm_default_t def, struct domain *d)
 {
     return xsm_ops->mem_paging(d);
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index 19fb8f7..2f50be9 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -133,7 +133,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     set_to_dummy_if_null(ops, mem_access);
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
     set_to_dummy_if_null(ops, mem_paging);
 #endif
 
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 82cc79b..582eb85 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1199,7 +1199,7 @@ static int flask_mem_access(struct domain *d)
 }
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
 static int flask_mem_paging(struct domain *d)
 {
     return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__MEM_PAGING);
@@ -1709,7 +1709,7 @@ static struct xsm_operations flask_ops = {
     .mem_access = flask_mem_access,
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
     .mem_paging = flask_mem_paging,
 #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 ` [PATCHv2] 22/27] build: convert HAS_MEM_ACCESS " Doug Goldstein
2015-11-12  8:58   ` Razvan Cojocaru
2015-11-12 15:51   ` Daniel De Graaf
2015-11-11 16:50 ` Doug Goldstein [this message]
2015-11-12  8:59   ` [PATCHv2] 23/27] build: convert HAS_MEM_PAGING " 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-24-git-send-email-cardoe@cardoe.com \
    --to=cardoe@cardoe.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=rcojocaru@bitdefender.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.