# Re: \[PATCH v3 5/8\] x86/sme: Replace occurrences of sme\_active() with cc\_platform\_has()

- From: Borislav Petkov \<bp@alien8.de\>
- Date: 2021-09-21 21:27:35 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2021/09/214702
- Thread: https://ratatoskr.run/linuxppc-dev/2021/09/213849/t.md

```text
On Wed, Sep 22, 2021 at 12:20:59AM +0300, Kirill A. Shutemov wrote:
> I still believe calling cc_platform_has() from __startup_64() is totally
> broken as it lacks proper wrapping while accessing global variables.

Well, one of the issues on the AMD side was using boot_cpu_data too
early and the Intel side uses it too. Can you replace those checks with
is_tdx_guest() or whatever was the helper's name which would check
whether the the kernel is running as a TDX guest, and see if that helps?

Thx.

-- 
Regards/Gruss,
    Boris.

```
