[RFC PATCH part-2 11/17] pkvm: x86: Define empty debug functions for hypervisor

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

 



Use pkvm_dbg/pkvm_info/pkvm_err as debug functions for pKVM runtime.

Define all these debug functions as empty functions now, it's also the
configuration of final release, as no additional debug console support
in pKVM now and such runtime debug functions shall avoid to access
host kernel debug APIs (e.g. printk) for isolation purpose.

Future will enable a debug mode for pKVM by taking use of linux
printk with some extra addon to access host kernel code - it's a
tmp quick debug method as it does not follow above rules for isolation.

Signed-off-by: Jason Chen CJ <jason.cj.chen@xxxxxxxxx>
---
 arch/x86/kvm/vmx/pkvm/hyp/debug.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/x86/kvm/vmx/pkvm/hyp/debug.h b/arch/x86/kvm/vmx/pkvm/hyp/debug.h
new file mode 100644
index 000000000000..97f633ca0bac
--- /dev/null
+++ b/arch/x86/kvm/vmx/pkvm/hyp/debug.h
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2022 Intel Corporation
+ */
+
+#ifndef _PKVM_DEBUG_H_
+#define _PKVM_DEBUG_H_
+
+#define pkvm_dbg(x...)
+#define pkvm_info(x...)
+#define pkvm_err(x...)
+
+#endif
-- 
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