[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aEBGnC6g6D2tmBR5@intel.com>
Date: Wed, 4 Jun 2025 21:14:04 +0800
From: Chao Gao <chao.gao@...el.com>
To: "Huang, Kai" <kai.huang@...el.com>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "linux-coco@...ts.linux.dev"
<linux-coco@...ts.linux.dev>, "x86@...nel.org" <x86@...nel.org>, "Shutemov,
Kirill" <kirill.shutemov@...el.com>, "Dong, Eddie" <eddie.dong@...el.com>,
"Hansen, Dave" <dave.hansen@...el.com>, "dave.hansen@...ux.intel.com"
<dave.hansen@...ux.intel.com>, "Reshetova, Elena"
<elena.reshetova@...el.com>, "kirill.shutemov@...ux.intel.com"
<kirill.shutemov@...ux.intel.com>, "seanjc@...gle.com" <seanjc@...gle.com>,
"mingo@...hat.com" <mingo@...hat.com>, "pbonzini@...hat.com"
<pbonzini@...hat.com>, "tglx@...utronix.de" <tglx@...utronix.de>, "Yamahata,
Isaku" <isaku.yamahata@...el.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "hpa@...or.com" <hpa@...or.com>, "Chen,
Farrah" <farrah.chen@...el.com>, "Edgecombe, Rick P"
<rick.p.edgecombe@...el.com>, "bp@...en8.de" <bp@...en8.de>, "Williams, Dan
J" <dan.j.williams@...el.com>
Subject: Re: [RFC PATCH 02/20] x86/virt/tdx: Prepare to support P-SEAMLDR
SEAMCALLs
>Given there will be a dedicated seamldr.c, I don't quite like having
>seamldr_prerr() in "tdx.h" and tdx.c.
>
>Now for all SEAMCALLs used by KVM, we have a dedicated wrapper implemented
>in tdx.c and exported for KVM to use. I think we can move seamcall*() out
>of <asm/tdx.h> to TDX host local since no other kernel code except the TDX
>host core is supposed to use seamcall*().
>
>This also cleans up <asm/tdx.h> a little bit, which in general makes code
>cleaner IMHO.
>
>E.g., how about we do below patch, and then you can do changes to support
>P-SEAMLDR on top of it?
looks good to me. I'd like to incorporate this patch into my series if
Kirill and Dave have no objections to this cleanup. I assume
seamldr_prerr() can be added to the new seamcall.h
Thanks for this suggestion.
>diff --git a/arch/x86/virt/vmx/tdx/seamcall.h b/arch/x86/virt/vmx/tdx/seamcall.h
>new file mode 100644
>index 000000000000..54922f7bda3a
>--- /dev/null
>+++ b/arch/x86/virt/vmx/tdx/seamcall.h
>@@ -0,0 +1,71 @@
>+/* SPDX-License-Identifier: GPL-2.0 */
>+/* Copyright (C) 2025 Intel Corporation */
>+#include <asm/tdx.h>
If seamcall.h is intended to provide low-level helpers, including
<asm/tdx.h>, which is meant to offer high-level APIs for other components
such as KVM, seems a bit odd to me. But I suppose we can live with this.
Powered by blists - more mailing lists