On Wed, Sep 14, 2022 at 05:30:45PM -0700, Sathyanarayanan Kuppuswamy wrote: > I have also included info about why we don't use a separate config > option for it. > > The code for the SEV equivalent of this TDX attestation functionality > can be found in drivers/virt/coco/sev-guest/. It is implemented as a > platform module driver, and it can be enabled using the CONFIG_SEV_GUEST > config option. However, in the case of TDX, it is implemented as a > built-in driver in the arch/x86/coco/tdx/tdx.c because of the following > reasons: > > 1. Attestation is expected to be needed by all distributions that support > TDX. Therefore, using a separate configuration option is not necessary. > With TDX support, it can be enabled by default, and a built-in driver > model will work better in this use case. No, that's not valid. Distros want to enable everything, but only load stuff that is only present. You don't allow this for this code, which isn't ok. > 2. Since it is not a conventional device driver and the code is very simple, > creating an individual driver for it may be an overkill. "simple" is not the issue, again, this should be a "normal" driver that autoloads when the hardware is present and not load when the hardware is not present. This is not "special" to avoid the normal functionality of all other drivers. So again, no, this is not ok, fix this properly, don't be lazy. thanks, greg k-h