From: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
To: Athira Rajeev <atrajeev@linux.ibm.com>,
maddy@linux.ibm.com, linuxppc-dev@lists.ozlabs.org
Cc: disgoel@linux.vnet.ibm.com, hbathini@linux.vnet.ibm.com,
Aditya.Bodkhe1@ibm.com, adubey@linux.ibm.com,
skb99@linux.ibm.com, sshegde@linux.ibm.com,
riteshh@linux.ibm.com, Tejas.Manhas1@ibm.com,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] powerpc/pseries/htmdump: Include header file to get is_kvm_guest() definition
Date: Tue, 6 May 2025 19:31:23 +0530 [thread overview]
Message-ID: <2a8d0351-b48b-4063-ad64-bfb2a8844655@linux.ibm.com> (raw)
In-Reply-To: <20250506135232.69014-1-atrajeev@linux.ibm.com>
On 06/05/25 7:22 pm, Athira Rajeev wrote:
> 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;
Tested this patch by applying on ppc tree, next-test branch and it fixes
the reported issue. Hence,
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
With this patch:
SIGN
/lib/modules/6.15.0-rc2-00040-gab1456c5aa7a-dirty/kernel/net/vmw_vsock/vmw_vsock_virtio_transport_common.ko
INSTALL
/lib/modules/6.15.0-rc2-00040-gab1456c5aa7a-dirty/kernel/net/vmw_vsock/vsock_loopback.ko
SIGN
/lib/modules/6.15.0-rc2-00040-gab1456c5aa7a-dirty/kernel/net/vmw_vsock/vsock_loopback.ko
INSTALL
/lib/modules/6.15.0-rc2-00040-gab1456c5aa7a-dirty/kernel/net/nsh/nsh.ko
SIGN
/lib/modules/6.15.0-rc2-00040-gab1456c5aa7a-dirty/kernel/net/nsh/nsh.ko
DEPMOD /lib/modules/6.15.0-rc2-00040-gab1456c5aa7a-dirty
INSTALL /boot
# git diff
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;
With out this patch:
make -j 81 -s && make modules_install && make install
gcc: error: missing argument to '-falign-functions='
gcc: error: missing argument to '-Wframe-larger-than='
gcc: error: missing argument to '-falign-functions='
gcc: error: missing argument to '-Wframe-larger-than='
make[2]: *** [scripts/Makefile.build:203: scripts/mod/empty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:98:
scripts/mod/devicetable-offsets.s] Error 1
make[1]: *** [/root/linux/Makefile:1279: prepare0] Error 2
make: *** [Makefile:248: __sub-make] Error 2
Regards,
Venkat.
next prev parent reply other threads:[~2025-05-06 14:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2025-05-18 3:44 ` Madhavan Srinivasan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a8d0351-b48b-4063-ad64-bfb2a8844655@linux.ibm.com \
--to=venkat88@linux.ibm.com \
--cc=Aditya.Bodkhe1@ibm.com \
--cc=Tejas.Manhas1@ibm.com \
--cc=adubey@linux.ibm.com \
--cc=atrajeev@linux.ibm.com \
--cc=disgoel@linux.vnet.ibm.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lkp@intel.com \
--cc=maddy@linux.ibm.com \
--cc=riteshh@linux.ibm.com \
--cc=skb99@linux.ibm.com \
--cc=sshegde@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).