@@ -37,7 +37,7 @@ obj-y += irq.o
obj-y += kernel.init.o
obj-$(CONFIG_LIVEPATCH) += livepatch.o
obj-$(CONFIG_LLC_COLORING) += llc-coloring.o
-obj-$(CONFIG_MEM_ACCESS) += mem_access.o
+obj-$(CONFIG_VM_EVENT) += mem_access.o
obj-y += mm.o
obj-y += monitor.o
obj-y += p2m.o
@@ -5,7 +5,7 @@ CONFIG_ARM=y
# Architecture Features
#
# CONFIG_GICV3 is not set
-# CONFIG_MEM_ACCESS is not set
+# CONFIG_VM_EVENT is not set
# CONFIG_SBSA_VUART_CONSOLE is not set
#
@@ -37,7 +37,7 @@ static inline bool p2m_mem_access_sanity_check(struct domain *d)
* Send mem event based on the access. Boolean return value indicates if trap
* needs to be injected into guest.
*/
-#ifdef CONFIG_MEM_ACCESS
+#ifdef CONFIG_VM_EVENT
bool p2m_mem_access_check(paddr_t gpa, vaddr_t gla, const struct npfec npfec);
struct page_info*
@@ -58,7 +58,7 @@ p2m_mem_access_check_and_get_page(vaddr_t gva, unsigned long flag,
return NULL;
}
-#endif /*CONFIG_MEM_ACCESS*/
+#endif /*CONFIG_VM_EVENT*/
#endif /* _ASM_ARM_MEM_ACCESS_H */
/*
@@ -1,6 +1,6 @@
# CONFIG_GRANT_TABLE is not set
# CONFIG_SPECULATIVE_HARDEN_ARRAY is not set
-# CONFIG_MEM_ACCESS is not set
+# CONFIG_VM_EVENT is not set
CONFIG_PPC64=y
CONFIG_DEBUG=y
@@ -1,6 +1,6 @@
# CONFIG_BOOT_TIME_CPUPOOLS is not set
# CONFIG_GRANT_TABLE is not set
-# CONFIG_MEM_ACCESS is not set
+# CONFIG_VM_EVENT is not set
# CONFIG_COVERAGE is not set
# CONFIG_LIVEPATCH is not set
# CONFIG_XSM is not set
@@ -4,7 +4,7 @@ obj-$(CONFIG_HVM) += hap/
obj-$(CONFIG_ALTP2M) += altp2m.o
obj-$(CONFIG_HVM) += guest_walk_2.o guest_walk_3.o guest_walk_4.o
obj-$(CONFIG_SHADOW_PAGING) += guest_walk_4.o
-obj-$(CONFIG_MEM_ACCESS) += mem_access.o
+obj-$(CONFIG_VM_EVENT) += mem_access.o
obj-$(CONFIG_MEM_PAGING) += mem_paging.o
obj-$(CONFIG_MEM_SHARING) += mem_sharing.o
obj-$(CONFIG_HVM) += nested.o
@@ -92,7 +92,7 @@ config HAS_VMAP
config MEM_ACCESS_ALWAYS_ON
bool
-config MEM_ACCESS
+config VM_EVENT
def_bool MEM_ACCESS_ALWAYS_ON
prompt "Memory Access and VM events" if !MEM_ACCESS_ALWAYS_ON
depends on HVM
@@ -26,7 +26,7 @@ obj-$(CONFIG_KEXEC) += kexec.o
obj-$(CONFIG_KEXEC) += kimage.o
obj-$(CONFIG_LIVEPATCH) += livepatch.o livepatch_elf.o
obj-$(CONFIG_LLC_COLORING) += llc-coloring.o
-obj-$(CONFIG_MEM_ACCESS) += mem_access.o
+obj-$(CONFIG_VM_EVENT) += mem_access.o
obj-y += memory.o
obj-y += multicall.o
obj-y += notifier.o
@@ -802,7 +802,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
copyback = true;
break;
-#ifdef CONFIG_MEM_ACCESS
+#ifdef CONFIG_VM_EVENT
case XEN_DOMCTL_set_access_required:
if ( unlikely(current->domain == d) ) /* no domain_pause() */
ret = -EPERM;
@@ -33,7 +33,7 @@
*/
struct vm_event_st;
-#ifdef CONFIG_MEM_ACCESS
+#ifdef CONFIG_VM_EVENT
#include <asm/mem_access.h>
#endif
@@ -99,7 +99,7 @@ long p2m_set_mem_access_multi(struct domain *d,
int p2m_get_mem_access(struct domain *d, gfn_t gfn, xenmem_access_t *access,
unsigned int altp2m_idx);
-#ifdef CONFIG_MEM_ACCESS
+#ifdef CONFIG_VM_EVENT
int mem_access_memop(unsigned long cmd,
XEN_GUEST_HANDLE_PARAM(xen_mem_access_op_t) arg);
#else
@@ -109,7 +109,7 @@ int mem_access_memop(unsigned long cmd,
{
return -ENOSYS;
}
-#endif /* CONFIG_MEM_ACCESS */
+#endif /* CONFIG_VM_EVENT */
#endif /* _XEN_MEM_ACCESS_H */
@@ -646,7 +646,7 @@ static XSM_INLINE int cf_check xsm_vm_event_control(
return xsm_default_action(action, current->domain, d);
}
-#ifdef CONFIG_MEM_ACCESS
+#ifdef CONFIG_VM_EVENT
static XSM_INLINE int cf_check xsm_mem_access(XSM_DEFAULT_ARG struct domain *d)
{
XSM_ASSERT_ACTION(XSM_DM_PRIV);
@@ -153,7 +153,7 @@ struct xsm_ops {
int (*vm_event_control)(struct domain *d, int mode, int op);
-#ifdef CONFIG_MEM_ACCESS
+#ifdef CONFIG_VM_EVENT
int (*mem_access)(struct domain *d);
#endif
@@ -631,7 +631,7 @@ static inline int xsm_vm_event_control(
return alternative_call(xsm_ops.vm_event_control, d, mode, op);
}
-#ifdef CONFIG_MEM_ACCESS
+#ifdef CONFIG_VM_EVENT
static inline int xsm_mem_access(xsm_default_t def, struct domain *d)
{
return alternative_call(xsm_ops.mem_access, d);
@@ -111,7 +111,7 @@ static const struct xsm_ops __initconst_cf_clobber dummy_ops = {
.vm_event_control = xsm_vm_event_control,
-#ifdef CONFIG_MEM_ACCESS
+#ifdef CONFIG_VM_EVENT
.mem_access = xsm_mem_access,
#endif
@@ -1361,7 +1361,7 @@ static int cf_check flask_vm_event_control(struct domain *d, int mode, int op)
return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__VM_EVENT);
}
-#ifdef CONFIG_MEM_ACCESS
+#ifdef CONFIG_VM_EVENT
static int cf_check flask_mem_access(struct domain *d)
{
return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__MEM_ACCESS);
@@ -1949,7 +1949,7 @@ static const struct xsm_ops __initconst_cf_clobber flask_ops = {
.vm_event_control = flask_vm_event_control,
-#ifdef CONFIG_MEM_ACCESS
+#ifdef CONFIG_VM_EVENT
.mem_access = flask_mem_access,
#endif
Use more generic CONFIG_VM_EVENT name throughout Xen code instead of CONFIG_MEM_ACCESS. This reflects the fact that vm_event is a higher level feature, with mem_access & monitor depending on it. Suggested-by: Jan Beulich <jbeulich@suse.com> Suggested-by: Tamas K Lengyel <tamas@tklengyel.com> Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com> --- option renaming brought up as part of v1 review discussion: https://lore.kernel.org/xen-devel/c8684340-33f9-41d3-94e4-77ee3bc18306@suse.com/ --- xen/arch/arm/Makefile | 2 +- xen/arch/arm/configs/tiny64_defconfig | 2 +- xen/arch/arm/include/asm/mem_access.h | 4 ++-- xen/arch/ppc/configs/ppc64_defconfig | 2 +- xen/arch/riscv/configs/tiny64_defconfig | 2 +- xen/arch/x86/mm/Makefile | 2 +- xen/common/Kconfig | 2 +- xen/common/Makefile | 2 +- xen/common/domctl.c | 2 +- xen/include/xen/mem_access.h | 6 +++--- xen/include/xsm/dummy.h | 2 +- xen/include/xsm/xsm.h | 4 ++-- xen/xsm/dummy.c | 2 +- xen/xsm/flask/hooks.c | 4 ++-- 14 files changed, 19 insertions(+), 19 deletions(-)