On 10/20/21 10:22 AM, Tom Lendacky wrote:
For non TDX case, in CC_ATTR_HOST_MEM_ENCRYPT, we should still call
amd_force_dma_unencrypted() right?
What I'm saying is that you wouldn't have amd_force_dma_unencrypted(). I
think the whole force_dma_unencrypted() can exist as-is in a different
file, whether that's cc_platform.c or mem_encrypt_common.c.
It will return true for an SEV or TDX guest, true for an SME host based
on the DMA mask or else false. That should work just fine for TDX.
Got it. Thanks for clarifying it.
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer