From nobody Sun Nov 2 12:50:15 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 1737454816610820.6441899276364; Tue, 21 Jan 2025 02:20:16 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.875270.1285710 (Exim 4.92) (envelope-from ) id 1taBMN-0002qs-1A; Tue, 21 Jan 2025 10:19:51 +0000 Received: by outflank-mailman (output) from mailman id 875270.1285710; Tue, 21 Jan 2025 10:19:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1taBMM-0002ql-Uq; Tue, 21 Jan 2025 10:19:50 +0000 Received: by outflank-mailman (input) for mailman id 875270; Tue, 21 Jan 2025 10:19:49 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1taBML-0002qf-CL for xen-devel@lists.xenproject.org; Tue, 21 Jan 2025 10:19:49 +0000 Received: from fforwardh-b2-smtp.messagingengine.com (fforwardh-b2-smtp.messagingengine.com [202.12.124.197]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3d40c1e7-d7e1-11ef-99a4-01e77a169b0f; Tue, 21 Jan 2025 11:19:47 +0100 (CET) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfforwardh.stl.internal (Postfix) with ESMTP id E43551740226; Tue, 21 Jan 2025 05:19:45 -0500 (EST) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-01.internal (MEProxy); Tue, 21 Jan 2025 05:19:46 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Jan 2025 05:19:44 -0500 (EST) 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: 3d40c1e7-d7e1-11ef-99a4-01e77a169b0f 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=fm3; t=1737454785; x=1737541185; bh=3 rPlU7XgPSyjTpGplKIP+1gNXPsjweB81ibCUw3TTuA=; b=nOTTj2fPwaKSHI3NN jyo1C4Y8K9M1QGijqFkSRJG1bmYK1S6nd6XTbczIc5LYj55XWKP3SbN0G/78EvDM HiEIeGzCk+fiTTObVGfzv576O48+xJFTX/6mUuDLmUewXqK1+djZqGvVjz9FmrmH x8BJH8g9u93q60ZnMjQ8pNyhHHvCSDBCP4zzDbz8+AwKmDlOq7hUKUPmRIF+n3qd WKL9T/IdIX2WVyYO9yPRJSdgVHxea8gaXQGL4HQC+Cl8IKWh+7ODmIIHQDto/Sho euOFfyXQsh5OGEqONNRUwWFmE6KAMU58gZ5HzGqfp2QxthxODwJOeU89c74mXm4Q wwHEg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejuddgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfestdekredtredttden ucfhrhhomhepufgvrhhgihihucfmihgsrhhikhcuoefuvghrghhihigpmfhisghrihhkse gvphgrmhdrtghomheqnecuggftrfgrthhtvghrnhepfeejheefveekheeguedvhfeuudei hfegieeifefglefhveeihfduuddvkeegjefhnecuffhomhgrihhnpehkvghrnhgvlhdroh hrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehs rghkihgssegurghrkhhsthgrrhdrshhithgvpdhnsggprhgtphhtthhopedvtddpmhhoug gvpehsmhhtphhouhhtpdhrtghpthhtohepgigvnhdquggvvhgvlheslhhishhtshdrgigv nhhprhhojhgvtghtrdhorhhgpdhrtghpthhtohepshgvrhhgihihpghkihgsrhhikhesvg hprghmrdgtohhmpdhrtghpthhtohepjhhulhhivghnseigvghnrdhorhhgpdhrtghpthht ohepsggvrhhtrhgrnhgurdhmrghrqhhuihhssegrrhhmrdgtohhmpdhrtghpthhtohepmh hitghhrghlrdhorhiivghlsegrmhgurdgtohhmpdhrtghpthhtohepvhholhhougihmhih rhgpsggrsggthhhukhesvghprghmrdgtohhmpdhrtghpthhtoheprghnughrvgifrdgtoh hophgvrhefsegtihhtrhhigidrtghomhdprhgtphhtthhopegrnhhthhhonhihrdhpvghr rghrugesvhgrthgvshdrthgvtghhpdhrtghpthhtohepjhgsvghulhhitghhsehsuhhsvg drtghomh X-ME-Proxy: Feedback-ID: i7fe92d45:Fastmail From: Sergiy Kibrik To: xen-devel@lists.xenproject.org Cc: Sergiy Kibrik , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , Anthony PERARD , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , Shawn Anastasio , Alistair Francis , Bob Eshleman , Connor Davis , Oleksii Kurochko , "Daniel P. Smith" , Stefano Stabellini Subject: [PATCH v2 1/4] xen: kconfig: rename MEM_ACCESS -> VM_EVENT Date: Tue, 21 Jan 2025 12:19:42 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1737454817055019000 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: Jan Beulich Suggested-by: Tamas K Lengyel Signed-off-by: Sergiy Kibrik Acked-by: Tamas K Lengyel --- option renaming brought up as part of v1 review discussion: https://lore.kernel.org/xen-devel/c8684340-33f9-41d3-94e4-77ee3bc18306@s= use.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(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 43ab5e8f25..ad29316df1 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -37,7 +37,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..43f73f7e38 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 05abb581a0..ffe896d8b3 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -802,7 +802,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 6a2fc33c3b..c728da9016 100644 --- a/xen/include/xsm/dummy.h +++ b/xen/include/xsm/dummy.h @@ -646,7 +646,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 4dbff9d866..6ac1627b7b 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 @@ -631,7 +631,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 e6ffa948f7..a6d2ec2f8b 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 14d84df9ca..acca89e123 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -1361,7 +1361,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); @@ -1949,7 +1949,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 From nobody Sun Nov 2 12:50:15 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 1737454926213719.3166978763326; Tue, 21 Jan 2025 02:22:06 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.875279.1285721 (Exim 4.92) (envelope-from ) id 1taBOM-0004hj-CW; Tue, 21 Jan 2025 10:21:54 +0000 Received: by outflank-mailman (output) from mailman id 875279.1285721; Tue, 21 Jan 2025 10:21:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1taBOM-0004hc-9I; Tue, 21 Jan 2025 10:21:54 +0000 Received: by outflank-mailman (input) for mailman id 875279; Tue, 21 Jan 2025 10:21:52 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1taBOK-0004hS-Is for xen-devel@lists.xenproject.org; Tue, 21 Jan 2025 10:21:52 +0000 Received: from fforwardh-b2-smtp.messagingengine.com (fforwardh-b2-smtp.messagingengine.com [202.12.124.197]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 86c548aa-d7e1-11ef-99a4-01e77a169b0f; Tue, 21 Jan 2025 11:21:50 +0100 (CET) Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfforwardh.stl.internal (Postfix) with ESMTP id 9CC841740130; Tue, 21 Jan 2025 05:21:49 -0500 (EST) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-07.internal (MEProxy); Tue, 21 Jan 2025 05:21:49 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Jan 2025 05:21:48 -0500 (EST) 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: 86c548aa-d7e1-11ef-99a4-01e77a169b0f 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=fm3; t=1737454909; x=1737541309; bh=I exxg0Qo4kbGg2eh3LYztUydfNJEguXN/Nl++lsTnTM=; b=Mwtfzvg8F8Bak6QlF ERJgm4sMuddnT+Y05HgYDF9YOnUM6XYBwMJJ1TIm7lkCvTWld0VtQ5yOBLqGlq1U OUw+2A0UA2r+CXu9WB3TVo4SoJ0iOJwiBBD/Dy+yMC45Fbt2rgFPrgP8vivb2Twm S/1zPN4+tuTdqlqM/n0LOEFAFD79eMy7bF/52tLNcU2rYGib73OqaM2uNwscTQK0 nn6aww3qaFUBCj4qLL4bbfFrJUHzbZ1OU/9btCgFNTGdEV439OsaoU1kbXfU1qQA We8dzYdR1jfyCYRPwSRglQdRjuXqDg+fNROx79OwOY5//5i4OiTO8Yo4HtZ9Sg6R aBFYA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejuddgudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfestdekredtredttden ucfhrhhomhepufgvrhhgihihucfmihgsrhhikhcuoefuvghrghhihigpmfhisghrihhkse gvphgrmhdrtghomheqnecuggftrfgrthhtvghrnheptdejgeegvdffkeekleefueevgfdu heevkedvhfdvkeeludehleegheeivedugfejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepshgrkhhisgesuggrrhhkshhtrghrrdhsihhtvgdp nhgspghrtghpthhtohepiedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgigvnh dquggvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghpthhtohep shgvrhhgihihpghkihgsrhhikhesvghprghmrdgtohhmpdhrtghpthhtohepjhgsvghulh hitghhsehsuhhsvgdrtghomhdprhgtphhtthhopegrnhgurhgvfidrtghoohhpvghrfees tghithhrihigrdgtohhmpdhrtghpthhtoheprhhoghgvrhdrphgruhestghithhrihigrd gtohhmpdhrtghpthhtohepshhsthgrsggvlhhlihhniheskhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i57d9e29e:Fastmail From: Sergiy Kibrik To: xen-devel@lists.xenproject.org Cc: Sergiy Kibrik , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH v2 2/4] x86:monitor: control monitor.c build with CONFIG_VM_EVENT option Date: Tue, 21 Jan 2025 12:21:47 +0200 Message-Id: <6fe254034570e1443a41c7dc5e3e3767b9c77f79.1737452864.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: 1737454927464019000 Content-Type: text/plain; charset="utf-8" Replace more general CONFIG_HVM option with CONFIG_VM_EVENT which is more relevant and specific to monitoring. This is only to clarify at build level to which subsystem this file belongs. No functional change here, as VM_EVENT depends on HVM. Signed-off-by: Sergiy Kibrik Acked-by: Jan Beulich --- xen/arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index b35fd5196c..8b3c17d689 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -49,7 +49,7 @@ obj-$(CONFIG_PV) +=3D ioport_emulate.o obj-y +=3D irq.o obj-$(CONFIG_KEXEC) +=3D machine_kexec.o obj-y +=3D mm.o x86_64/mm.o -obj-$(CONFIG_HVM) +=3D monitor.o +obj-$(CONFIG_VM_EVENT) +=3D monitor.o obj-y +=3D mpparse.o obj-y +=3D nmi.o obj-y +=3D numa.o --=20 2.25.1 From nobody Sun Nov 2 12:50:15 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 1737455052974151.16641255381103; Tue, 21 Jan 2025 02:24:12 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.875288.1285731 (Exim 4.92) (envelope-from ) id 1taBQL-0005Gj-NT; Tue, 21 Jan 2025 10:23:57 +0000 Received: by outflank-mailman (output) from mailman id 875288.1285731; Tue, 21 Jan 2025 10:23:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1taBQL-0005Gc-J0; Tue, 21 Jan 2025 10:23:57 +0000 Received: by outflank-mailman (input) for mailman id 875288; Tue, 21 Jan 2025 10:23:55 +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 1taBQJ-0005GT-MP for xen-devel@lists.xenproject.org; Tue, 21 Jan 2025 10:23:55 +0000 Received: from fforwardh-b2-smtp.messagingengine.com (fforwardh-b2-smtp.messagingengine.com [202.12.124.197]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d0828c1f-d7e1-11ef-a0e4-8be0dac302b0; Tue, 21 Jan 2025 11:23:54 +0100 (CET) Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfforwardh.stl.internal (Postfix) with ESMTP id 2EC94174022A; Tue, 21 Jan 2025 05:23:53 -0500 (EST) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-04.internal (MEProxy); Tue, 21 Jan 2025 05:23:53 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Jan 2025 05:23:51 -0500 (EST) 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: d0828c1f-d7e1-11ef-a0e4-8be0dac302b0 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=fm3; t=1737455033; x=1737541433; bh=i YEVQqGlu6rOaDg6bu+NtoBAX9qDsxKc2/u3zO9X5Vw=; b=J8sBVHrlRXqHSHdL7 53gX6LympSmCHzv/35ObJrcimhWJKHikXeCIGgb9HgHq0wxiwZKAQ0Nf4ma0Wa60 wD9g5fDKJk8sGB/lOX/IOYBCtwhW6dO1CCP/fef1nIEdEvI6g3r/nD8dKSMkIQub sj97Ifj4wtqBNnDYvRHbXARnQwEn0ofRN0CmK4SyQqBpRJTPvMnU1+frmLW8eegw rcQcrjY14g4oK3sxmd2ZHU6IvwygsPTDgPEUeBIJe48VevcXbNgKvDjOlMTba0wL t6Q3J60b8b/g2OjvuFc0F9NohVK1dgVxNnleuPCNvqN6+W8Iwjn3D+b8KrjTHJJ5 nOLiQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejuddgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfestdekredtredttden ucfhrhhomhepufgvrhhgihihucfmihgsrhhikhcuoefuvghrghhihigpmfhisghrihhkse gvphgrmhdrtghomheqnecuggftrfgrthhtvghrnheptdejgeegvdffkeekleefueevgfdu heevkedvhfdvkeeludehleegheeivedugfejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepshgrkhhisgesuggrrhhkshhtrghrrdhsihhtvgdp nhgspghrtghpthhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgigvnh dquggvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghpthhtohep shgvrhhgihihpghkihgsrhhikhesvghprghmrdgtohhmpdhrtghpthhtohepnhhitgholh grrdhvvghtrhhinhhisegsuhhgshgvnhhgrdgtohhmpdhrtghpthhtoheptggrrhguohgv segtrghrughovgdrtghomhdprhgtphhtthhopehsshhtrggsvghllhhinhhisehkvghrnh gvlhdrohhrgh X-ME-Proxy: Feedback-ID: id5db7974:Fastmail From: Sergiy Kibrik To: xen-devel@lists.xenproject.org Cc: Sergiy Kibrik , Nicola Vetrini , Doug Goldstein , Stefano Stabellini Subject: [PATCH v2 3/4] automation: rename CONFIG_MEM_ACCESS -> CONFIG_VM_EVENT Date: Tue, 21 Jan 2025 12:23:50 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1737455054381019000 Content-Type: text/plain; charset="utf-8" Following the renaming of Xen build option. Signed-off-by: Sergiy Kibrik Reviewed-by: Nicola Vetrini --- automation/eclair_analysis/xen_arm_config | 2 +- automation/eclair_analysis/xen_x86_config | 2 +- automation/gitlab-ci/build.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/automation/eclair_analysis/xen_arm_config b/automation/eclair_= analysis/xen_arm_config index ef140ceb73..4b01ef51c5 100644 --- a/automation/eclair_analysis/xen_arm_config +++ b/automation/eclair_analysis/xen_arm_config @@ -63,7 +63,7 @@ CONFIG_HAS_DEVICE_TREE=3Dy CONFIG_HAS_FAST_MULTIPLY=3Dy CONFIG_HAS_PDX=3Dy CONFIG_HAS_PMAP=3Dy -# CONFIG_MEM_ACCESS is not set +# CONFIG_VM_EVENT is not set CONFIG_STATIC_MEMORY=3Dy =20 # diff --git a/automation/eclair_analysis/xen_x86_config b/automation/eclair_= analysis/xen_x86_config index abc44d43e1..9da3264dd0 100644 --- a/automation/eclair_analysis/xen_x86_config +++ b/automation/eclair_analysis/xen_x86_config @@ -54,7 +54,7 @@ CONFIG_HAS_PDX=3Dy CONFIG_HAS_SCHED_GRANULARITY=3Dy CONFIG_HAS_UBSAN=3Dy CONFIG_MEM_ACCESS_ALWAYS_ON=3Dy -CONFIG_MEM_ACCESS=3Dy +CONFIG_VM_EVENT=3Dy CONFIG_NEEDS_LIBELF=3Dy CONFIG_NUMA=3Dy =20 diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.y= aml index bc4a8a5ad2..ed65e2edd7 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -741,7 +741,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 --=20 2.25.1 From nobody Sun Nov 2 12:50:15 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 1737455177658634.1957946142194; Tue, 21 Jan 2025 02:26:17 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.875309.1285750 (Exim 4.92) (envelope-from ) id 1taBSK-0006N0-Aa; Tue, 21 Jan 2025 10:26:00 +0000 Received: by outflank-mailman (output) from mailman id 875309.1285750; Tue, 21 Jan 2025 10:26:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1taBSK-0006Mt-81; Tue, 21 Jan 2025 10:26:00 +0000 Received: by outflank-mailman (input) for mailman id 875309; Tue, 21 Jan 2025 10:25:59 +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 1taBSJ-0006Mk-2S for xen-devel@lists.xenproject.org; Tue, 21 Jan 2025 10:25:59 +0000 Received: from fforwardh-b2-smtp.messagingengine.com (fforwardh-b2-smtp.messagingengine.com [202.12.124.197]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 1a301b33-d7e2-11ef-a0e4-8be0dac302b0; Tue, 21 Jan 2025 11:25:58 +0100 (CET) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfforwardh.stl.internal (Postfix) with ESMTP id B310C174028A; Tue, 21 Jan 2025 05:25:56 -0500 (EST) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-10.internal (MEProxy); Tue, 21 Jan 2025 05:25:57 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Jan 2025 05:25:55 -0500 (EST) 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: 1a301b33-d7e2-11ef-a0e4-8be0dac302b0 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=fm3; t=1737455156; x=1737541556; bh=r kkiqbSwc6jmF2J2ez5nWu827Q/H2UnBXmYuGwWx5kg=; b=MXPKNXlkB+7ZSX6ff P8KCCIwBFR4cdpTIx9skAfPBsStA31IhWEcTe+7IWnJpxmdSQMqXHfPfdmGjm8lX j3JsTful9BhQGU1omBizN7D3nv2MwQECD/eMvXxR+I/kIIYiOK1NOIEKP5UBgxie Eh/g9vh9DIURKMaEJP2pL0vDltEQ2IK8a2X8dFJC8KoZRl6Q0BNNvYR+ntN3OtqN CmMPqF/FEkCS7c2N3B3RzhTVn1QVv718RzsOBLndW++urZGE7kflO+OK40a4u6Lx X/AxEZNhm6tJkogQGFc01qkTgDrV+Elv/QBdDqUmU1nU+kssStLLrqSs0pfNT91Y a5Inw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejuddgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfestdekredtredttden ucfhrhhomhepufgvrhhgihihucfmihgsrhhikhcuoefuvghrghhihigpmfhisghrihhkse gvphgrmhdrtghomheqnecuggftrfgrthhtvghrnheptdejgeegvdffkeekleefueevgfdu heevkedvhfdvkeeludehleegheeivedugfejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepshgrkhhisgesuggrrhhkshhtrghrrdhsihhtvgdp nhgspghrtghpthhtohepudeipdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeigvg hnqdguvghvvghlsehlihhsthhsrdigvghnphhrohhjvggtthdrohhrghdprhgtphhtthho pehsthgvfhgrnhhordhsthgrsggvlhhlihhnihesrghmugdrtghomhdprhgtphhtthhope hjuhhlihgvnhesgigvnhdrohhrghdprhgtphhtthhopegsvghrthhrrghnugdrmhgrrhhq uhhishesrghrmhdrtghomhdprhgtphhtthhopehmihgthhgrlhdrohhriigvlhesrghmug drtghomhdprhgtphhtthhopehvohhlohguhihmhihrpggsrggstghhuhhksegvphgrmhdr tghomhdprhgtphhtthhopegrnhgurhgvfidrtghoohhpvghrfeestghithhrihigrdgtoh hmpdhrtghpthhtoheprghnthhhohhnhidrphgvrhgrrhgusehvrghtvghsrdhtvggthhdp rhgtphhtthhopehrohhgvghrrdhprghusegtihhtrhhigidrtghomh X-ME-Proxy: Feedback-ID: i7de5e997:Fastmail From: Sergiy Kibrik To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , Anthony PERARD , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Alexandru Isaila , Petre Pircalabu , Stefano Stabellini , Jan Beulich , Tamas K Lengyel , Ayan Kumar Halder , Sergiy Kibrik Subject: [PATCH v2 4/4] xen: mem_access: conditionally compile vm_event.c & monitor.c Date: Tue, 21 Jan 2025 12:25:53 +0200 Message-Id: <2e8b9c5390019ef66610a21d9a8744282e2badeb.1737452864.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: 1737455179234019000 Content-Type: text/plain; charset="utf-8" From: Stefano Stabellini Extend coverage of CONFIG_VM_EVENT option and make the build of VM events and monitoring support optional. This is to reduce code size on Arm when this option isn't enabled. CC: Jan Beulich CC: Tamas K Lengyel Reviewed-by: Ayan Kumar Halder Signed-off-by: Stefano Stabellini Signed-off-by: Sergiy Kibrik --- changes in v2: - rename CONFIG_MEM_ACCESS -> CONFIG_VM_EVENT - tags --- xen/arch/arm/Makefile | 4 ++-- xen/arch/arm/vsmc.c | 3 ++- xen/common/Makefile | 4 ++-- xen/include/xen/monitor.h | 9 +++++++++ xen/include/xen/vm_event.h | 14 +++++++++++--- 5 files changed, 26 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index ad29316df1..e61238c4d0 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -39,7 +39,7 @@ obj-$(CONFIG_LIVEPATCH) +=3D livepatch.o obj-$(CONFIG_LLC_COLORING) +=3D llc-coloring.o obj-$(CONFIG_VM_EVENT) +=3D mem_access.o obj-y +=3D mm.o -obj-y +=3D monitor.o +obj-$(CONFIG_VM_EVENT) +=3D monitor.o obj-y +=3D p2m.o obj-y +=3D platform.o obj-y +=3D platform_hypercall.o @@ -65,7 +65,7 @@ obj-$(CONFIG_VGICV2) +=3D vgic-v2.o obj-$(CONFIG_GICV3) +=3D vgic-v3.o obj-$(CONFIG_HAS_ITS) +=3D vgic-v3-its.o endif -obj-y +=3D vm_event.o +obj-$(CONFIG_VM_EVENT) +=3D vm_event.o obj-y +=3D vtimer.o obj-$(CONFIG_SBSA_VUART_CONSOLE) +=3D vpl011.o obj-y +=3D vsmc.o diff --git a/xen/arch/arm/vsmc.c b/xen/arch/arm/vsmc.c index 62d8117a12..1ea75cd7f1 100644 --- a/xen/arch/arm/vsmc.c +++ b/xen/arch/arm/vsmc.c @@ -330,7 +330,8 @@ void do_trap_smc(struct cpu_user_regs *regs, const unio= n hsr hsr) } =20 /* If monitor is enabled, let it handle the call. */ - if ( current->domain->arch.monitor.privileged_call_enabled ) + if ( IS_ENABLED(CONFIG_VM_EVENT) && + current->domain->arch.monitor.privileged_call_enabled ) rc =3D monitor_smc(); =20 if ( rc =3D=3D 1 ) diff --git a/xen/common/Makefile b/xen/common/Makefile index b71d4b3efa..ac23120d7d 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -54,7 +54,7 @@ obj-y +=3D timer.o obj-$(CONFIG_TRACEBUFFER) +=3D trace.o obj-y +=3D version.o obj-y +=3D virtual_region.o -obj-y +=3D vm_event.o +obj-$(CONFIG_VM_EVENT) +=3D vm_event.o obj-$(CONFIG_HAS_VMAP) +=3D vmap.o obj-y +=3D vsprintf.o obj-y +=3D wait.o @@ -68,7 +68,7 @@ obj-$(CONFIG_COMPAT) +=3D $(addprefix compat/,domain.o me= mory.o multicall.o xlat.o =20 ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y) obj-y +=3D domctl.o -obj-y +=3D monitor.o +obj-$(CONFIG_VM_EVENT) +=3D monitor.o obj-y +=3D sysctl.o endif =20 diff --git a/xen/include/xen/monitor.h b/xen/include/xen/monitor.h index 713d54f7c1..afb582bc26 100644 --- a/xen/include/xen/monitor.h +++ b/xen/include/xen/monitor.h @@ -27,8 +27,17 @@ struct domain; struct xen_domctl_monitor_op; =20 +#ifdef CONFIG_VM_EVENT int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop); void monitor_guest_request(void); +#else +static inline int monitor_domctl(struct domain *d, + struct xen_domctl_monitor_op *mop) +{ + return -EINVAL; +} +static inline void monitor_guest_request(void) {} +#endif =20 int monitor_traps(struct vcpu *v, bool sync, vm_event_request_t *req); =20 diff --git a/xen/include/xen/vm_event.h b/xen/include/xen/vm_event.h index 9a86358b42..268c85fc4f 100644 --- a/xen/include/xen/vm_event.h +++ b/xen/include/xen/vm_event.h @@ -50,9 +50,6 @@ struct vm_event_domain unsigned int last_vcpu_wake_up; }; =20 -/* Clean up on domain destruction */ -void vm_event_cleanup(struct domain *d); - /* Returns whether a ring has been set up */ bool vm_event_check_ring(struct vm_event_domain *ved); =20 @@ -88,7 +85,18 @@ void vm_event_cancel_slot(struct domain *d, struct vm_ev= ent_domain *ved); void vm_event_put_request(struct domain *d, struct vm_event_domain *ved, vm_event_request_t *req); =20 +#ifdef CONFIG_VM_EVENT +/* Clean up on domain destruction */ +void vm_event_cleanup(struct domain *d); int vm_event_domctl(struct domain *d, struct xen_domctl_vm_event_op *vec); +#else +static inline void vm_event_cleanup(struct domain *d) {} +static inline int vm_event_domctl(struct domain *d, + struct xen_domctl_vm_event_op *vec) +{ + return -EINVAL; +} +#endif =20 void vm_event_vcpu_pause(struct vcpu *v); void vm_event_vcpu_unpause(struct vcpu *v); --=20 2.25.1