Re: [PATCH v12 07/22] x86/virt/tdx: Add skeleton to enable TDX on demand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +static enum tdx_module_status_t tdx_module_status;
> 
> Why can't you switch to a simple bool here as well?
> 
> It's either initialized or uninitialized. If uninitialized and you get 
> an error, leave it uninitialized. The next caller will try again and 
> fail again.
> 

We can, but in this case there might be message printed in each module
initialization call.  Let's say TDH.SYS.INFO is successful but the later
TDH.SYS.CONFIG fails.  In this case, each initialization call will print out TDX
module info and CMR info.

I think only allow initialization to be done once would be better in this case.
Apart from the message printing, it's OK to just use a simple bool.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux