From nobody Fri Dec 19 07:21:27 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=quarantine dis=quarantine) header.from=epam.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 174192969435891.49062445819106; Thu, 13 Mar 2025 22:21:34 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.913738.1319639 (Exim 4.92) (envelope-from ) id 1tsxTw-0003ft-Rv; Fri, 14 Mar 2025 05:21:16 +0000 Received: by outflank-mailman (output) from mailman id 913738.1319639; Fri, 14 Mar 2025 05:21:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tsxTw-0003fm-P8; Fri, 14 Mar 2025 05:21:16 +0000 Received: by outflank-mailman (input) for mailman id 913738; Fri, 14 Mar 2025 05:21:16 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tsxTw-0003fg-43 for xen-devel@lists.xenproject.org; Fri, 14 Mar 2025 05:21:16 +0000 Received: from fforwardh-a2-smtp.messagingengine.com (fforwardh-a2-smtp.messagingengine.com [103.168.172.197]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 25f03fbe-0094-11f0-9ab9-95dc52dad729; Fri, 14 Mar 2025 06:21:14 +0100 (CET) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfforwardh.phl.internal (Postfix) with ESMTP id BC3052920258; Fri, 14 Mar 2025 01:21:13 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-10.internal (MEProxy); Fri, 14 Mar 2025 01:21:13 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 14 Mar 2025 01:21:12 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 25f03fbe-0094-11f0-9ab9-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1741929673; x=1742016073; bh=G fJYaqe6YN6CUxc1EMksZLsBCJrUXeTXrgTIO72XhRA=; b=Svg6P22Zw8f/fJ5D2 ZreglmjulsovkDiAy4kj5CREOJgLKq6JsaDishZI9ebU7YGGDxrxgEBAYS5aSYqR oSOscbIfbBr9s2L7VW9vxPFT1v2WhWa/PN/RphGiNT780lhBFBw7V1Sccb+hK+Ey xXReQ96g0t0+HdLmJofL3nwwKBGkDwYxRTkWCyrBxSt+fQW1TAaoAFIrgywQkFWV 8mB/E6jxXVTGn2Wewal+AY8ZRzSWJJsJs39E9tPsP6oZ+GP9twGuO8j9bLp4fPfM xqhN5iuNLO6YeddqYuQxE2U1JkTQG70L8ASAfPIbW0TEyrLufDFCN6TY6bOJEJdU X8bpQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvdelleekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfestdekredtredt tdenucfhrhhomhepufgvrhhgihihucfmihgsrhhikhcuoefuvghrghhihigpmfhisghrih hksegvphgrmhdrtghomheqnecuggftrfgrthhtvghrnheptdejgeegvdffkeekleefueev gfduheevkedvhfdvkeeludehleegheeivedugfejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepshgrkhhisgesuggrrhhkshhtrghrrdhsihht vgdpnhgspghrtghpthhtohepvddupdhmohguvgepshhmthhpohhuthdprhgtphhtthhope igvghnqdguvghvvghlsehlihhsthhsrdigvghnphhrohhjvggtthdrohhrghdprhgtphht thhopehsvghrghhihigpkhhisghrihhksegvphgrmhdrtghomhdprhgtphhtthhopegtrg hrughovgestggrrhguohgvrdgtohhmpdhrtghpthhtoheprghnughrvgifrdgtohhophgv rhefsegtihhtrhhigidrtghomhdprhgtphhtthhopegrnhhthhhonhihrdhpvghrrghrug esvhgrthgvshdrthgvtghhpdhrtghpthhtohepmhhitghhrghlrdhorhiivghlsegrmhgu rdgtohhmpdhrtghpthhtohepjhgsvghulhhitghhsehsuhhsvgdrtghomhdprhgtphhtth hopehjuhhlihgvnhesgigvnhdrohhrghdprhgtphhtthhopehrohhgvghrrdhprghusegt ihhtrhhigidrtghomh X-ME-Proxy: Feedback-ID: i5ff96cea:Fastmail From: Sergiy Kibrik To: xen-devel@lists.xenproject.org Cc: Sergiy Kibrik , Doug Goldstein , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Bertrand Marquis , Volodymyr Babchuk , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , Shawn Anastasio , Alistair Francis , Bob Eshleman , Connor Davis , Oleksii Kurochko , "Daniel P. Smith" , Stefano Stabellini Subject: [PATCH v4 1/3] xen: kconfig: rename MEM_ACCESS -> VM_EVENT Date: Fri, 14 Mar 2025 07:21:09 +0200 Message-Id: <58f66091cd1b28fe38ab9687b87ae99ecb7520eb.1741772330.git.Sergiy_Kibrik@epam.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1741929697329019000 Content-Type: text/plain; charset="utf-8" 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: Tamas K Lengyel Acked-by: Tamas K Lengyel Signed-off-by: Sergiy Kibrik --- changes in v3: - squash with automation patch - tags & minor addition of blanks --- automation/gitlab-ci/build.yaml | 2 +- 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 ++-- 15 files changed, 20 insertions(+), 20 deletions(-) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.y= aml index 034d6d9c3a..b6383c4fc8 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -744,7 +744,7 @@ debian-12-riscv64-gcc: CONFIG_EXPERT=3Dy CONFIG_GRANT_TABLE=3Dn CONFIG_LIVEPATCH=3Dn - CONFIG_MEM_ACCESS=3Dn + CONFIG_VM_EVENT=3Dn CONFIG_QEMU_PLATFORM=3Dy CONFIG_XSM=3Dn =20 diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index fb0948f067..3bd5125e64 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -38,7 +38,7 @@ obj-y +=3D irq.o obj-y +=3D kernel.init.o obj-$(CONFIG_LIVEPATCH) +=3D livepatch.o obj-$(CONFIG_LLC_COLORING) +=3D llc-coloring.o -obj-$(CONFIG_MEM_ACCESS) +=3D mem_access.o +obj-$(CONFIG_VM_EVENT) +=3D mem_access.o obj-y +=3D mm.o obj-y +=3D monitor.o obj-y +=3D p2m.o diff --git a/xen/arch/arm/configs/tiny64_defconfig b/xen/arch/arm/configs/t= iny64_defconfig index cc6d93f2f8..469a1eb9f9 100644 --- a/xen/arch/arm/configs/tiny64_defconfig +++ b/xen/arch/arm/configs/tiny64_defconfig @@ -5,7 +5,7 @@ CONFIG_ARM=3Dy # 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 =20 # diff --git a/xen/arch/arm/include/asm/mem_access.h b/xen/arch/arm/include/a= sm/mem_access.h index abac8032fc..d42f28e8b7 100644 --- a/xen/arch/arm/include/asm/mem_access.h +++ b/xen/arch/arm/include/asm/mem_access.h @@ -37,7 +37,7 @@ static inline bool p2m_mem_access_sanity_check(struct dom= ain *d) * Send mem event based on the access. Boolean return value indicates if t= rap * 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 npf= ec); =20 struct page_info* @@ -58,7 +58,7 @@ p2m_mem_access_check_and_get_page(vaddr_t gva, unsigned l= ong flag, return NULL; } =20 -#endif /*CONFIG_MEM_ACCESS*/ +#endif /* CONFIG_VM_EVENT */ #endif /* _ASM_ARM_MEM_ACCESS_H */ =20 /* diff --git a/xen/arch/ppc/configs/ppc64_defconfig b/xen/arch/ppc/configs/pp= c64_defconfig index 4924d881a2..d6aaf772e7 100644 --- a/xen/arch/ppc/configs/ppc64_defconfig +++ b/xen/arch/ppc/configs/ppc64_defconfig @@ -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 =20 CONFIG_PPC64=3Dy CONFIG_DEBUG=3Dy diff --git a/xen/arch/riscv/configs/tiny64_defconfig b/xen/arch/riscv/confi= gs/tiny64_defconfig index bb3ae26a44..2399f7b918 100644 --- a/xen/arch/riscv/configs/tiny64_defconfig +++ b/xen/arch/riscv/configs/tiny64_defconfig @@ -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 diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index 0345388359..960f6e8409 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -4,7 +4,7 @@ obj-$(CONFIG_HVM) +=3D hap/ obj-$(CONFIG_ALTP2M) +=3D altp2m.o obj-$(CONFIG_HVM) +=3D guest_walk_2.o guest_walk_3.o guest_walk_4.o obj-$(CONFIG_SHADOW_PAGING) +=3D guest_walk_4.o -obj-$(CONFIG_MEM_ACCESS) +=3D mem_access.o +obj-$(CONFIG_VM_EVENT) +=3D mem_access.o obj-$(CONFIG_MEM_PAGING) +=3D mem_paging.o obj-$(CONFIG_MEM_SHARING) +=3D mem_sharing.o obj-$(CONFIG_HVM) +=3D nested.o diff --git a/xen/common/Kconfig b/xen/common/Kconfig index 6166327f4d..a6aa2c5c14 100644 --- a/xen/common/Kconfig +++ b/xen/common/Kconfig @@ -92,7 +92,7 @@ config HAS_VMAP config MEM_ACCESS_ALWAYS_ON bool =20 -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 diff --git a/xen/common/Makefile b/xen/common/Makefile index cba3b32733..b71d4b3efa 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -26,7 +26,7 @@ obj-$(CONFIG_KEXEC) +=3D kexec.o obj-$(CONFIG_KEXEC) +=3D kimage.o obj-$(CONFIG_LIVEPATCH) +=3D livepatch.o livepatch_elf.o obj-$(CONFIG_LLC_COLORING) +=3D llc-coloring.o -obj-$(CONFIG_MEM_ACCESS) +=3D mem_access.o +obj-$(CONFIG_VM_EVENT) +=3D mem_access.o obj-y +=3D memory.o obj-y +=3D multicall.o obj-y +=3D notifier.o diff --git a/xen/common/domctl.c b/xen/common/domctl.c index b897ca8723..bfe2e1f9f0 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -809,7 +809,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_d= omctl) copyback =3D true; break; =20 -#ifdef CONFIG_MEM_ACCESS +#ifdef CONFIG_VM_EVENT case XEN_DOMCTL_set_access_required: if ( unlikely(current->domain =3D=3D d) ) /* no domain_pause() */ ret =3D -EPERM; diff --git a/xen/include/xen/mem_access.h b/xen/include/xen/mem_access.h index 2231341b5d..4de651038d 100644 --- a/xen/include/xen/mem_access.h +++ b/xen/include/xen/mem_access.h @@ -33,7 +33,7 @@ */ struct vm_event_st; =20 -#ifdef CONFIG_MEM_ACCESS +#ifdef CONFIG_VM_EVENT #include #endif =20 @@ -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 *acces= s, unsigned int altp2m_idx); =20 -#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 */ =20 #endif /* _XEN_MEM_ACCESS_H */ =20 diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h index a8d06de6b0..9227205fcd 100644 --- a/xen/include/xsm/dummy.h +++ b/xen/include/xsm/dummy.h @@ -647,7 +647,7 @@ static XSM_INLINE int cf_check xsm_vm_event_control( return xsm_default_action(action, current->domain, d); } =20 -#ifdef CONFIG_MEM_ACCESS +#ifdef CONFIG_VM_EVENT static XSM_INLINE int cf_check xsm_mem_access(XSM_DEFAULT_ARG struct domai= n *d) { XSM_ASSERT_ACTION(XSM_DM_PRIV); diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h index 8c33b055fc..24acc16125 100644 --- a/xen/include/xsm/xsm.h +++ b/xen/include/xsm/xsm.h @@ -153,7 +153,7 @@ struct xsm_ops { =20 int (*vm_event_control)(struct domain *d, int mode, int op); =20 -#ifdef CONFIG_MEM_ACCESS +#ifdef CONFIG_VM_EVENT int (*mem_access)(struct domain *d); #endif =20 @@ -637,7 +637,7 @@ static inline int xsm_vm_event_control( return alternative_call(xsm_ops.vm_event_control, d, mode, op); } =20 -#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); diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c index ce6fbdc6c5..93fbfc43cc 100644 --- a/xen/xsm/dummy.c +++ b/xen/xsm/dummy.c @@ -111,7 +111,7 @@ static const struct xsm_ops __initconst_cf_clobber dumm= y_ops =3D { =20 .vm_event_control =3D xsm_vm_event_control, =20 -#ifdef CONFIG_MEM_ACCESS +#ifdef CONFIG_VM_EVENT .mem_access =3D xsm_mem_access, #endif =20 diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c index 389707a164..6a53487ea4 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -1362,7 +1362,7 @@ static int cf_check flask_vm_event_control(struct dom= ain *d, int mode, int op) return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__VM_EVENT); } =20 -#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); @@ -1955,7 +1955,7 @@ static const struct xsm_ops __initconst_cf_clobber fl= ask_ops =3D { =20 .vm_event_control =3D flask_vm_event_control, =20 -#ifdef CONFIG_MEM_ACCESS +#ifdef CONFIG_VM_EVENT .mem_access =3D flask_mem_access, #endif =20 --=20 2.25.1