[PATCH v1] xen/x86: move monitor.o out of PV_SHIM_EXCLUSIVE condition

Penny Zheng posted 1 patch 3 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20250723065206.1451514-1-Penny.Zheng@amd.com
xen/common/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v1] xen/x86: move monitor.o out of PV_SHIM_EXCLUSIVE condition
Posted by Penny Zheng 3 months, 1 week ago
Since we move "!PV_SHIM_EXCLUSIVE" dependency from CONFIG_HVM, there is
a chance that a randconfig picking both PV_SHIM_EXCLUSIVE=y and HVM=y results
in hvm.c being built, but monitor.c not being built, which leaves
functions like monitor_traps(), etc, undefined, causing linking to fail.
So we move monitor.o out of PV_SHIM_EXCLUSIVE condition to fix above linking
failure.

Fixes: 568f806cba4c ("xen/x86: remove "depends on !PV_SHIM_EXCLUSIVE"")
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Penny Zheng <Penny.Zheng@amd.com>
---
 xen/common/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/common/Makefile b/xen/common/Makefile
index 8dce771970..c316957fcb 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_LIVEPATCH) += livepatch.o livepatch_elf.o
 obj-$(CONFIG_LLC_COLORING) += llc-coloring.o
 obj-$(CONFIG_VM_EVENT) += mem_access.o
 obj-y += memory.o
+obj-$(CONFIG_VM_EVENT) += monitor.o
 obj-y += multicall.o
 obj-y += notifier.o
 obj-$(CONFIG_NUMA) += numa.o
@@ -70,7 +71,6 @@ obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o memory.o multicall.o xlat.o
 
 ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y)
 obj-y += domctl.o
-obj-$(CONFIG_VM_EVENT) += monitor.o
 endif
 
 extra-y := symbols-dummy.o
-- 
2.34.1
Re: [PATCH v1] xen/x86: move monitor.o out of PV_SHIM_EXCLUSIVE condition
Posted by Jan Beulich 3 months, 1 week ago
On 23.07.2025 08:52, Penny Zheng wrote:
> Since we move "!PV_SHIM_EXCLUSIVE" dependency from CONFIG_HVM, there is
> a chance that a randconfig picking both PV_SHIM_EXCLUSIVE=y and HVM=y results
> in hvm.c being built, but monitor.c not being built, which leaves
> functions like monitor_traps(), etc, undefined, causing linking to fail.
> So we move monitor.o out of PV_SHIM_EXCLUSIVE condition to fix above linking
> failure.
> 
> Fixes: 568f806cba4c ("xen/x86: remove "depends on !PV_SHIM_EXCLUSIVE"")
> Reported-by: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Penny Zheng <Penny.Zheng@amd.com>

Acked-by: Jan Beulich <jbeulich@suse.com>