[RFC PATCH part-2 17/17] pkvm: x86: Stub CONFIG_DEBUG_LIST in pKVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Zide Chen <zide.chen@xxxxxxxxx>

To work with CONFIG_DEBUG_LIST, pKVM need to have its own
list_debug.c since the /lib version doesn't build into pKVM binary.

Simply return true in __list_add_valid() and __list_del_entry_valid().

Signed-off-by: Zide Chen <zide.chen@xxxxxxxxx>
---
 arch/x86/kvm/vmx/pkvm/hyp/Makefile         |  1 +
 arch/x86/kvm/vmx/pkvm/hyp/lib/list_debug.c | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/arch/x86/kvm/vmx/pkvm/hyp/Makefile b/arch/x86/kvm/vmx/pkvm/hyp/Makefile
index 09b749def56b..5a92067ab05a 100644
--- a/arch/x86/kvm/vmx/pkvm/hyp/Makefile
+++ b/arch/x86/kvm/vmx/pkvm/hyp/Makefile
@@ -11,6 +11,7 @@ lib-dir		:= lib
 pkvm-hyp-y	:= vmx_asm.o vmexit.o
 
 pkvm-hyp-$(CONFIG_RETPOLINE)	+= $(lib-dir)/retpoline.o
+pkvm-hyp-$(CONFIG_DEBUG_LIST)	+= $(lib-dir)/list_debug.o
 
 pkvm-obj 	:= $(patsubst %.o,%.pkvm.o,$(pkvm-hyp-y))
 obj-$(CONFIG_PKVM_INTEL)	+= pkvm.o
diff --git a/arch/x86/kvm/vmx/pkvm/hyp/lib/list_debug.c b/arch/x86/kvm/vmx/pkvm/hyp/lib/list_debug.c
new file mode 100644
index 000000000000..26d3b24f821f
--- /dev/null
+++ b/arch/x86/kvm/vmx/pkvm/hyp/lib/list_debug.c
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2022 Intel Corporation
+ */
+
+#include <linux/list.h>
+
+bool __list_add_valid(struct list_head *new, struct list_head *prev,
+		struct list_head *next)
+{
+	return true;
+}
+
+bool __list_del_entry_valid(struct list_head *entry)
+{
+	return true;
+}
-- 
2.25.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux