mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/tdx: Explicitly include <linux/errno.h> in <asm/tdx.h>
@ 2023-06-06  3:40 Kai Huang
  2023-06-06  8:56 ` Kirill A. Shutemov
  2023-06-06 13:10 ` Sathyanarayanan Kuppuswamy
  0 siblings, 2 replies; 6+ messages in thread
From: Kai Huang @ 2023-06-06  3:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kai Huang, Dave Hansen, Kuppuswamy Sathyanarayanan,
	Kirill A . Shutemov, Isaku Yamahata

Currently, in <asm/tdx.h> tdx_kvm_hypercall() simply returns -ENODEV
when TDX guest isn't enabled in the Kconfig w/o having <linux/errno.h>
header explicitly included.  Although the current code doesn't have
build error, in general it is a good practice to explicitly include the
header to make sure any future patch which uses <asm/tdx.h> won't get
build error due to error code not being defined.

Fixes: cfb8ec7a31f2 ("x86/tdx: Wire up KVM hypercalls")
Suggested-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Isaku Yamahata <isaku.yamahata@intel.com>
Signed-off-by: Kai Huang <kai.huang@intel.com>
---
 arch/x86/include/asm/tdx.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/include/asm/tdx.h b/arch/x86/include/asm/tdx.h
index 28d889c9aa16..0f303c9abee8 100644
--- a/arch/x86/include/asm/tdx.h
+++ b/arch/x86/include/asm/tdx.h
@@ -5,6 +5,7 @@
 
 #include <linux/init.h>
 #include <linux/bits.h>
+#include <linux/errno.h>
 #include <asm/ptrace.h>
 #include <asm/shared/tdx.h>
 

base-commit: 122333d6bd229af279cdb35d1b874b71b3b9ccfb
-- 
2.40.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-06 22:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06  3:40 [PATCH] x86/tdx: Explicitly include <linux/errno.h> in <asm/tdx.h> Kai Huang
2023-06-06  8:56 ` Kirill A. Shutemov
2023-06-06 13:10 ` Sathyanarayanan Kuppuswamy
2023-06-06 22:17   ` Huang, Kai
2023-06-06 22:45     ` Kirill A. Shutemov
2023-06-06 22:50       ` Huang, Kai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®