[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <61fd680c4e4afd5eb4455ee0dbbb05c30f0e7a0d.camel@intel.com>
Date: Mon, 2 Jun 2025 23:44:08 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "linux-coco@...ts.linux.dev"
<linux-coco@...ts.linux.dev>, "Gao, Chao" <chao.gao@...el.com>,
"x86@...nel.org" <x86@...nel.org>
CC: "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 04/20] x86/virt/tdx: Introduce a "tdx" subsystem and
"tsm" device
> static int init_tdx_module(void)
> {
> int ret;
> @@ -1136,6 +1209,8 @@ static int init_tdx_module(void)
>
> pr_info("%lu KB allocated for PAMT\n", tdmrs_count_pamt_kb(&tdx_tdmr_list));
>
> + tdx_subsys_init();
> +
> out_put_tdxmem:
> /*
> * @tdx_memlist is written here and read at memory hotplug time.
The error handling of init_module_module() is already very heavy. Although
tdx_subsys_init() doesn't return any error, I would prefer to putting
tdx_subsys_init() to __tdx_enable() (the caller of init_tdx_module()) so that
init_tdx_module() can just focus on initializing the TDX module.
Powered by blists - more mailing lists