linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/pseries/htmdump: Include header file to get is_kvm_guest() definition
@ 2025-05-06 13:52 Athira Rajeev
  2025-05-06 14:01 ` Venkat Rao Bagalkote
  2025-05-18  3:44 ` Madhavan Srinivasan
  0 siblings, 2 replies; 3+ messages in thread
From: Athira Rajeev @ 2025-05-06 13:52 UTC (permalink / raw)
  To: maddy, linuxppc-dev
  Cc: atrajeev, disgoel, hbathini, Aditya.Bodkhe1, adubey, skb99,
	sshegde, riteshh, Tejas.Manhas1, venkat88, kernel test robot

htmdump_init calls is_kvm_guest() to check for guest environment.
is_kvm_guest() is defined in kvm_guest.h header file. Without including
the header file, build hits error failing to find the function.

  arch/powerpc/platforms/pseries/htmdump.c: In function 'htmdump_init':
  arch/powerpc/platforms/pseries/htmdump.c:469:6: error: implicit declaration of function 'is_kvm_guest';
  did you mean '__key_get'? [-Werror=implicit-function-declaration]
  if (is_kvm_guest()) {
      ^~~~~~~~~~~~
      __key_get

This is observed in configs where CONFIG_KVM_GUEST is disabled.
Include header file explicitly to avoid the build error

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505061324.elUl4njU-lkp@intel.com/
Signed-off-by: Athira Rajeev <atrajeev@linux.ibm.com>
---
 arch/powerpc/platforms/pseries/htmdump.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/platforms/pseries/htmdump.c b/arch/powerpc/platforms/pseries/htmdump.c
index af15d50c924b..742ec52c9d4d 100644
--- a/arch/powerpc/platforms/pseries/htmdump.c
+++ b/arch/powerpc/platforms/pseries/htmdump.c
@@ -10,6 +10,7 @@
 #include <asm/io.h>
 #include <asm/machdep.h>
 #include <asm/plpar_wrappers.h>
+#include <asm/kvm_guest.h>
 
 static void *htm_buf;
 static void *htm_status_buf;
-- 
2.43.0



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

end of thread, other threads:[~2025-05-18  3:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-06 13:52 [PATCH] powerpc/pseries/htmdump: Include header file to get is_kvm_guest() definition Athira Rajeev
2025-05-06 14:01 ` Venkat Rao Bagalkote
2025-05-18  3:44 ` Madhavan Srinivasan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).