diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index a45ce106e2..3f0f3a0f3a 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -162,6 +162,9 @@ config SHADOW_PAGING If unsure, say Y. +config PAGING + def_bool HVM || SHADOW_PAGING + config BIGMEM bool "big memory support" default n diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 3e94af51a7..f07cae6a70 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -213,11 +213,15 @@ long arch_do_domctl( { case XEN_DOMCTL_shadow_op: +#ifdef CONFIG_PAGING ret = paging_domctl(d, &domctl->u.shadow_op, u_domctl, 0); if ( ret == -ERESTART ) return hypercall_create_continuation( __HYPERVISOR_paging_domctl_cont, "h", u_domctl); copyback = true; +#else + ret = -EOPNOTSUPP; +#endif break; case XEN_DOMCTL_ioport_permission: diff --git a/xen/arch/x86/include/asm/paging.h b/xen/arch/x86/include/asm/paging.h index 94c31a268e..768b077ebd 100644 --- a/xen/arch/x86/include/asm/paging.h +++ b/xen/arch/x86/include/asm/paging.h @@ -55,7 +55,7 @@ #define PG_translate 0 #define PG_external 0 #endif -#if defined(CONFIG_HVM) || !defined(CONFIG_PV_SHIM_EXCLUSIVE) +#ifdef CONFIG_PAGING /* Enable log dirty mode */ #define PG_log_dirty (XEN_DOMCTL_SHADOW_ENABLE_LOG_DIRTY << PG_mode_shift) #else diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c index 165e0f88c2..3aafb0990b 100644 --- a/xen/arch/x86/mm/paging.c +++ b/xen/arch/x86/mm/paging.c @@ -864,6 +864,7 @@ void paging_final_teardown(struct domain *d) p2m_final_teardown(d); } +#ifdef CONFIG_PAGING /* Enable an arbitrary paging-assistance mode. Call once at domain * creation. */ int paging_enable(struct domain *d, u32 mode) @@ -889,6 +890,7 @@ int paging_enable(struct domain *d, u32 mode) else return shadow_enable(d, mode); } +#endif #ifdef CONFIG_HVM /* Called from the guest to indicate that a process is being torn down diff --git a/xen/include/hypercall-defs.c b/xen/include/hypercall-defs.c index c1081d87a2..8370b4b289 100644 --- a/xen/include/hypercall-defs.c +++ b/xen/include/hypercall-defs.c @@ -197,9 +197,11 @@ dm_op(domid_t domid, unsigned int nr_bufs, xen_dm_op_buf_t *bufs) #ifdef CONFIG_SYSCTL sysctl(xen_sysctl_t *u_sysctl) #endif +#if defined(CONFIG_X86) && defined(CONFIG_PAGING) +paging_domctl_cont(xen_domctl_t *u_domctl) +#endif #ifndef CONFIG_PV_SHIM_EXCLUSIVE domctl(xen_domctl_t *u_domctl) -paging_domctl_cont(xen_domctl_t *u_domctl) platform_op(xen_platform_op_t *u_xenpf_op) #endif #ifdef CONFIG_HVM @@ -296,7 +298,7 @@ dm_op compat do compat do do hypfs_op do do do do do #endif mca do do - - - -#ifndef CONFIG_PV_SHIM_EXCLUSIVE +#if defined(CONFIG_X86) && defined(CONFIG_PAGING) paging_domctl_cont do do do do - #endif