> -----Original Message----- > From: Huang, Kai <kai.huang@intel.com> > Sent: Tuesday, September 12, 2023 10:30 AM > To: kirill.shutemov@linux.intel.com; peterz@infradead.org; > pbonzini@redhat.com; linux-kernel@vger.kernel.org > Cc: Hansen, Dave <dave.hansen@intel.com>; Christopherson,, Sean > <seanjc@google.com>; bp@alien8.de; x86@kernel.org; hpa@zytor.com; > mingo@redhat.com; tglx@linutronix.de; > sathyanarayanan.kuppuswamy@linux.intel.com; Yamahata, Isaku > <isaku.yamahata@intel.com>; n.borisov.lkml@gmail.com > Subject: Re: [PATCH v4 00/12] Unify TDCALL/SEAMCALL and TDVMCALL > assembly > > On Mon, 2023-09-11 at 19:08 +0200, Paolo Bonzini wrote: > > On 8/15/23 13:01, Kai Huang wrote: > > > Hi Peter, Kirill, > > > > > > This series unifies the assembly code for TDCALL/SEAMCALL and TDVMCALL. > > > Now all of them use one singe TDX_MODULE_CALL asm macro. More > > > information please see cover letter of v2 (see link below). > > > > > > Tested by booting TDX guest, initializing TDX module, and running > > > TDX guest successfully, all with this series applied. > > > > Not sure it if's new in this version but I'm seeing > > > > WARNING: modpost: EXPORT symbol "__seamcall_ret" [vmlinux] version ... > > Is "__seamcall_ret" prototyped in <asm/asm-prototypes.h>? > > WARNING: modpost: EXPORT symbol "__seamcall" [vmlinux] version ... > > Is "__seamcall" prototyped in <asm/asm-prototypes.h>? > > WARNING: modpost: EXPORT symbol "__seamcall_saved_ret" [vmlinux] > version ... > > Is "__seamcall_saved_ret" prototyped in <asm/asm-prototypes.h>? > > > > which is fixed by > > > > diff --git a/arch/x86/include/asm/asm-prototypes.h > > b/arch/x86/include/asm/asm-prototypes.h > > index 8f80de627c60..eff5252e9c86 100644 > > --- a/arch/x86/include/asm/asm-prototypes.h > > +++ b/arch/x86/include/asm/asm-prototypes.h > > @@ -6,6 +6,7 @@ > > #include <asm/page.h> > > #include <asm/checksum.h> > > #include <asm/mce.h> > > +#include <asm/tdx.h> > > > > #include <asm-generic/asm-prototypes.h> > > > > Thanks Paolo! > > I never met this issue, not even from LKP. Do you happen to know which Kconfig > option can trigger this? Or would you mind sharing your .config? (replying via outlook due to some networking issue of my home network) After digging, this is due to exporting __seamcall*() assembly functions while MODVERSIONS is enabled. This series itself doesn't cause this warning. I didn't export them in this series because I would like to leave to KVM patches when we are sure we need to export them. E.g., I have seamcall*() wrappers to retry running out of entropy, and we may have concern exporting __seamcall*() low level functions directly and may wish to export higher level wrappers. So I think the fix should be with the patch that truly exports those __seamcall*(). I'll talk to Isaku on this to get his idea. Thanks!
On 9/12/23 02:57, Huang, Kai wrote:
>>> +#include <asm/tdx.h>
>>>
>>> #include <asm-generic/asm-prototypes.h>
>>>
>> Thanks Paolo!
>>
>> I never met this issue, not even from LKP. Do you happen to know
>> which Kconfig option can trigger this? Or would you mind sharing
>> your .config?
> (replying via outlook due to some networking issue of my home
> network)
>
> After digging, this is due to exporting __seamcall*() assembly
> functions while MODVERSIONS is enabled.
>
> This series itself doesn't cause this warning.
>
> I didn't export them in this series because I would like to leave to
> KVM patches when we are sure we need to export them.
>
> E.g., I have seamcall*() wrappers to retry running out of entropy,
> and we may have concern exporting __seamcall*() low level functions
> directly and may wish to export higher level wrappers.
>
> So I think the fix should be with the patch that truly exports those
> __seamcall*(). I'll talk to Isaku on this to get his idea.
Ah indeed it's not caused by your patches, but rather by the Isaku's KVM
TDX support ("KVM: TDX: Add C wrapper functions for SEAMCALLs to the TDX
module"). The fix is just to squash the #include into his patch.
Paolo
On Tue, Sep 12, 2023 at 03:37:49PM +0200,
Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 9/12/23 02:57, Huang, Kai wrote:
> > > > +#include <asm/tdx.h>
> > > >
> > > > #include <asm-generic/asm-prototypes.h>
> > > >
> > > Thanks Paolo!
> > >
> > > I never met this issue, not even from LKP. Do you happen to know
> > > which Kconfig option can trigger this? Or would you mind sharing
> > > your .config?
> > (replying via outlook due to some networking issue of my home
> > network)
> >
> > After digging, this is due to exporting __seamcall*() assembly
> > functions while MODVERSIONS is enabled.
> >
> > This series itself doesn't cause this warning.
> >
> > I didn't export them in this series because I would like to leave to
> > KVM patches when we are sure we need to export them.
> >
> > E.g., I have seamcall*() wrappers to retry running out of entropy,
> > and we may have concern exporting __seamcall*() low level functions
> > directly and may wish to export higher level wrappers.
> >
> > So I think the fix should be with the patch that truly exports those
> > __seamcall*(). I'll talk to Isaku on this to get his idea.
>
> Ah indeed it's not caused by your patches, but rather by the Isaku's KVM TDX
> support ("KVM: TDX: Add C wrapper functions for SEAMCALLs to the TDX
> module"). The fix is just to squash the #include into his patch.
Yes, I'll squash the fix into the patch.
--
Isaku Yamahata <isaku.yamahata@linux.intel.com>
© 2016 - 2025 Red Hat, Inc.