Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect TDX Guest when it's virtualised using Hyper-V #138

Merged
merged 1 commit into from
Nov 6, 2023

Commits on Nov 6, 2023

  1. Detect TDX Guest when it's virtualised using Hyper-V

    Microsoft has decided to purposefully hide the information of the guest
    TEE when VMs are being created using Hyper-V.
    
    This leads us to check for the Hyper-V cpuid features (0x4000000C), and
    then for the `ebx` value set.
    
    For Intel TDX, `ebx` is set as `0xbe3`, being 3 the part we're mostly
    interested about,according to:
    https://github.com/torvalds/linux/blob/d2f51b3516dade79269ff45eae2a7668ae711b25/arch/x86/include/asm/hyperv-tlfs.h#L169-L174
    
    NOTE: On the tests side, we had to manually override the cpuid in order
    to avoid the tests failing, and this was suggested by Klaus himself.
    
    Signed-off-by: Fabiano Fidêncio <[email protected]>
    fidencio committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    939f540 View commit details
    Browse the repository at this point in the history