Re: [PATCH v1 2/3] x86/coco: Disable TDX module calls when TD partitioning is active

2023-11-23 Thread Kirill A. Shutemov
On Wed, Nov 22, 2023 at 06:01:05PM +0100, Jeremi Piotrowski wrote: > Introduce CC_ATTR_TDX_MODULE_CALLS to allow code to check whether TDX module > calls are available. When TD partitioning is enabled, a L1 TD VMM handles most > TDX facilities and the kernel running as an L2 TD VM does not have

Re: [PATCH v1 3/3] x86/tdx: Provide stub tdx_accept_memory() for non-TDX configs

2023-11-23 Thread Kirill A. Shutemov
On Wed, Nov 22, 2023 at 06:01:06PM +0100, Jeremi Piotrowski wrote: > When CONFIG_INTEL_TDX_GUEST is not defined but CONFIG_UNACCEPTED_MEMORY=y is, > the kernel fails to link with an undefined reference to tdx_accept_memory from > arch_accept_memory. Provide a stub for tdx_accept_memory to fix the

Re: [PATCH v1 1/3] x86/tdx: Check for TDX partitioning during early TDX init

2023-11-23 Thread Kirill A. Shutemov
On Wed, Nov 22, 2023 at 06:01:04PM +0100, Jeremi Piotrowski wrote: > Check for additional CPUID bits to identify TDX guests running with Trust > Domain (TD) partitioning enabled. TD partitioning is like nested > virtualization > inside the Trust Domain so there is a L1 TD VM(M) and there can be

Re: [PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-23 Thread Hector Martin
On 2023/11/22 1:00, Jason Gunthorpe wrote: > On Tue, Nov 21, 2023 at 03:47:48PM +0900, Hector Martin wrote: >>> Which is sensitive only to !NULL fwspec, and if EPROBE_DEFER is >>> returned fwspec will be freed and dev->iommu->fwspec will be NULL >>> here. >>> >>> In the NULL case it does a 'bus