Since commit 4d96f9109109b ("x86/sev: Replace occurrences of
sev_active() with cc_platform_has()"), the SWIOTLB bounce buffer size
adjustment and restricted virtio memory setting also inadvertently apply
to TDX: the code is using cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT) as
a gatekeeping condition, which is also true for TDX, and this is also what
we want.
To reflect this, move the corresponding code to generic mem_encrypt.c.
No functional changes intended.
Signed-off-by: Alexander Shishkin <email address hidden>
(cherry picked from http://github.com/intel/kernel-downstream.git/v6.5-tdx commit ba981ce3fb7009c6bbbb82f743dfc65615492bf4)
Signed-off-by: Philip Cox <email address hidden>