Todos os produtos
Search
Central de documentação

Elastic Compute Service:Build a heterogeneous confidential computing environment

Última atualização: Nov 02, 2026

Configure um ambiente de computação confidencial heterogênea em uma instância gn8v-tee e verifique a computação confidencial da GPU com um código de exemplo.

Contexto

As instâncias de computação confidencial heterogênea do Alibaba Cloud (gn8v-tee) estendem as instâncias de computação confidencial TDX da CPU ao incorporar uma GPU ao Trusted Execution Environment (TEE). Isso protege as transferências de dados entre CPU e GPU, além da computação de dados na GPU. Para criar um ambiente de computação confidencial TDX da CPU e verificar o atestado remoto, consulte Build a TDX confidential computing environment. Para configurar um ambiente de AI Agent confidencial em instâncias de computação confidencial heterogênea, consulte Build an OpenClaw confidential AI agent on heterogeneous confidential computing instances.

image

A GPU em uma instância de computação confidencial heterogênea inicia no modo de computação confidencial. Os seguintes mecanismos garantem a confidencialidade:

  1. O TDX impede que o Hypervisor/Host OS acesse registradores sensíveis ou dados de memória da instância.

  2. Um firewall PCIe bloqueia o acesso da CPU aos registradores críticos e à memória de vídeo protegida da GPU. O Hypervisor/Host OS só consegue executar operações limitadas, como redefinir a GPU, mas não acessa dados sensíveis.

  3. O NVLink Firewall da GPU impede que outras GPUs acessem diretamente sua memória de vídeo.

  4. Durante a inicialização, o driver da GPU e as funções de biblioteca dentro do TEE da CPU estabelecem um canal criptografado com a GPU por meio do protocolo SPDM. Após a negociação de chaves, apenas texto cifrado é transmitido via PCIe entre a CPU e a GPU.

  5. A capacidade de atestado remoto da GPU confirma que ela está em um estado seguro.

    Aplicações em uma instância de computação confidencial podem usar o Attestation SDK para chamar o driver da GPU e obter um relatório criptográfico do status de segurança da GPU. Esse relatório contém informações assinadas criptograficamente sobre o hardware da GPU, VBIOS e medições de status do hardware. Uma parte confiável pode comparar essas medições com as medições de referência do fornecedor da GPU para verificar se a GPU está em um estado seguro de computação confidencial.

Observações de uso

A computação confidencial heterogênea requer imagens do Alibaba Cloud Linux 3. Se você utilizar uma imagem personalizada baseada no Alibaba Cloud Linux 3, certifique-se de que a versão do kernel seja 5.10.134-18 ou posterior.

Crie uma instância de computação confidencial heterogênea (gn8v-tee)

Console

A criação de uma instância de computação confidencial heterogênea é semelhante à criação de uma instância padrão, mas exige configurações específicas. Para configurações gerais, consulte Create an instance using the wizard.

  1. Acesse ECS console - Instances.

  2. No canto superior esquerdo da página, selecione uma região e um grupo de recursos.

  3. Clique em Create Instance e configure a instância com as seguintes definições.

    Item de Configuração

    Descrição

    Region and Zone

    China (Beijing) Zone L

    Instance Type

    ecs.gn8v-tee.4xlarge ou superior.

    Image

    Selecione a imagem Alibaba Cloud Linux 3.2104 LTS 64-bit.

    Public IP Address

    Assign Public IPv4 Address. Necessário para baixar o driver NVIDIA posteriormente.

    Importante

    Ao criar ou reiniciar uma instância confidencial com 8 GPUs, não anexe ENIs secundárias adicionais ou discos de dados. Essa ação pode causar falha na inicialização.

    Causa e solução

    Instâncias ECS com TDX habilitado usam uma região de memória não criptografada, o Software Input Output Translation Lookaside Buffer (SWIOTLB), para comunicação com periféricos. Por padrão, o tamanho do SWIOTLB é de 6% da memória disponível, com um máximo de 1 GiB.

    Anexar múltiplas ENIs ou discos de dados a uma instância confidencial com 8 GPUs pode esgotar a memória SWIOTLB, causando uma falha de alocação de memória que impede a inicialização.

    Se a instância falhar ao iniciar:

    • Solução 1: Pare a instância, unbind ENIs secundárias adicionais e detach todos os discos de dados.

    • Solução 2: Crie uma nova instância com apenas uma ENI primária, sem discos de dados e apenas um disco do sistema.

    Para adicionar múltiplas ENIs ou discos de dados a uma instância confidencial com 8 GPUs, conclua primeiro Step 1 para aumentar o buffer SWIOTLB para 8 GB. Em seguida, attach ENIs to the instance e attach data disks.

  4. Conclua a criação da instância seguindo as instruções na tela.

API/CLI

Chame a operação RunInstances ou use a CLI do Alibaba Cloud para criar uma instância ECS com TDX habilitado. Parâmetros principais:

Parâmetro

Descrição

Exemplo

RegionId

China (Beijing)

cn-beijing

ZoneId

Zone L

cn-beijing-l

InstanceType

ecs.gn8v-tee.4xlarge ou superior.

ecs.gn8v-tee.4xlarge

ImageId

ID de uma imagem compatível com computação confidencial. Apenas imagens de 64 bits do Alibaba Cloud Linux 3.2104 LTS com versão de kernel 5.10.134-18.al8.x86_64 ou posterior.

aliyun_3_x64_20G_alibase_20250117.vhd

Exemplo de CLI:

<SECURITY_GROUP_ID> : ID do grupo de segurança. <VSWITCH_ID> : ID do vSwitch. <KEY_PAIR_NAME> : Nome do par de chaves SSH.
aliyun ecs RunInstances \
  --RegionId cn-beijing \
  --ZoneId cn-beijing-l \
  --SystemDisk.Category cloud_essd \
  --ImageId 'aliyun_3_x64_20G_alibase_20250117.vhd' \
  --InstanceType 'ecs.gn8v-tee.4xlarge' \
  --SecurityGroupId '<SECURITY_GROUP_ID>' \
  --VSwitchId '<VSWITCH_ID>' \
  --KeyPairName <KEY_PAIR_NAME>

Configure o ambiente de computação confidencial heterogênea

Etapa 1: Instale o driver NVIDIA e o CUDA Toolkit

Importante

As instâncias de computação confidencial heterogênea demoram bastante para inicializar. Aguarde até que o status da instância seja Running e o sistema operacional tenha iniciado completamente.

As etapas de instalação variam conforme o tipo de instância:

  • Instâncias confidenciais com GPU única: ecs.gn8v-tee.4xlarge e ecs.gn8v-tee.6xlarge

  • Instâncias confidenciais com 8 GPUs: ecs.gn8v-tee-8x.16xlarge e ecs.gn8v-tee-8x.48xlarge

Instâncias confidenciais com GPU única

  1. Conecte-se à instância de computação confidencial. Consulte Connect to Linux.

  2. Defina o buffer SWIOTLB para 8 GB.

    sudo grubby --update-kernel=ALL --args="swiotlb=4194304,any"
  3. Reinicie a instância. Consulte Restart an instance.

  4. Baixe o driver NVIDIA e o CUDA Toolkit.

    Instâncias confidenciais com GPU única exigem a versão do driver 550.144.03 ou posterior. Este exemplo usa a versão 550.144.03 .
    wget --referer=https://www.nvidia.cn/ https://cn.download.nvidia.cn/tesla/550.144.03/NVIDIA-Linux-x86_64-550.144.03.run
    wget https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda_12.4.1_550.54.15_linux.run
  5. Instale as dependências e desative o service CloudMonitor.

    sudo yum install -y openssl3
    sudo systemctl disable cloudmonitor
    sudo systemctl stop cloudmonitor
  6. Crie e configure o arquivo nvidia-persistenced.service.

    cat > nvidia-persistenced.service << EOF
    [Unit]
    Description=NVIDIA Persistence Daemon
    Wants=syslog.target
    Before=cloudmonitor.service
    
    [Service]
    Type=forking
    ExecStart=/usr/bin/nvidia-persistenced --user root
    ExecStartPost=/usr/bin/nvidia-smi conf-compute -srs 1
    ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced
    
    [Install]
    WantedBy=multi-user.target
    EOF
    
    sudo cp nvidia-persistenced.service /usr/lib/systemd/system/nvidia-persistenced.service
  7. Instale o driver NVIDIA e o CUDA Toolkit.

    sudo bash NVIDIA-Linux-x86_64-550.144.03.run --ui=none --no-questions --accept-license --disable-nouveau --no-cc-version-check --install-libglvnd --kernel-module-build-directory=kernel-open --rebuild-initramfs
    sudo bash cuda_12.4.1_550.54.15_linux.run --silent --toolkit
  8. Inicie os services nvidia-persistenced e CloudMonitor.

    sudo systemctl start nvidia-persistenced.service
    sudo systemctl enable nvidia-persistenced.service
    sudo systemctl start cloudmonitor
    sudo systemctl enable cloudmonitor

Instâncias confidenciais com 8 GPUs

  1. Conecte-se à instância de computação confidencial. Consulte Connect to Linux.

    Importante

    As instâncias de computação confidencial têm inicialização lenta. Aguarde a conclusão do processo antes de prosseguir.

  2. Defina o buffer SWIOTLB para 8 GB.

    sudo grubby --update-kernel=ALL --args="swiotlb=4194304,any"
  3. Configure o comportamento de carregamento do driver NVIDIA e regenere o initramfs.

    sudo bash -c 'cat > /etc/modprobe.d/nvidia-lkca.conf << EOF
    install nvidia /sbin/modprobe ecdsa_generic; /sbin/modprobe ecdh; /sbin/modprobe --ignore-install nvidia
    options nvidia NVreg_RegistryDwords="RmEnableProtectedPcie=0x1"
    EOF'
    
    sudo dracut --regenerate-all -f
  4. Reinicie a instância. Consulte Restart an instance.

  5. Baixe o driver NVIDIA e o CUDA Toolkit.

    Instâncias de computação confidencial com 8 GPUs exigem a versão do driver 570.148.08 ou posterior e o Fabric Manager correspondente. Este exemplo usa a versão 570.148.08 .
    wget --referer=https://www.nvidia.cn/ https://cn.download.nvidia.cn/tesla/570.148.08/NVIDIA-Linux-x86_64-570.148.08.run
    wget https://developer.download.nvidia.com/compute/cuda/12.8.1/local_installers/cuda_12.8.1_570.124.06_linux.run
    wget https://developer.download.nvidia.cn/compute/cuda/repos/rhel8/x86_64/nvidia-fabric-manager-570.148.08-1.x86_64.rpm
  6. Instale as dependências e desative o service CloudMonitor.

    sudo yum install -y openssl3
    sudo systemctl disable cloudmonitor
    sudo systemctl stop cloudmonitor
  7. Crie e configure o arquivo nvidia-persistenced.service.

    cat > nvidia-persistenced.service << EOF
    [Unit]
    Description=NVIDIA Persistence Daemon
    Wants=syslog.target
    Before=cloudmonitor.service
    After=nvidia-fabricmanager.service
    
    [Service]
    Type=forking
    ExecStart=/usr/bin/nvidia-persistenced --user root --uvm-persistence-mode --verbose
    ExecStartPost=/usr/bin/nvidia-smi conf-compute -srs 1
    ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced
    TimeoutStartSec=900
    TimeoutStopSec=60
    
    [Install]
    WantedBy=multi-user.target
    EOF
    
    sudo cp nvidia-persistenced.service /usr/lib/systemd/system/nvidia-persistenced.service
  8. Instale o Fabric Manager, o driver NVIDIA e o CUDA Toolkit.

    sudo rpm -ivh nvidia-fabric-manager-570.148.08-1.x86_64.rpm
    sudo bash NVIDIA-Linux-x86_64-570.148.08.run --ui=none --no-questions --accept-license --disable-nouveau --no-cc-version-check --install-libglvnd --kernel-module-build-directory=kernel-open --rebuild-initramfs
    sudo bash cuda_12.8.1_570.124.06_linux.run --silent --toolkit
  9. Inicie e ative os services nvidia-fabricmanager, nvidia-persistenced e cloudmonitor.

    sudo systemctl start nvidia-fabricmanager.service
    sudo systemctl enable nvidia-fabricmanager.service
    sudo systemctl start nvidia-persistenced.service
    sudo systemctl enable nvidia-persistenced.service
    sudo systemctl start cloudmonitor
    sudo systemctl enable cloudmonitor

Etapa 2: Verifique o status do TDX

Este recurso depende do TDX. Verifique o status do TDX para confirmar que a instância está protegida.

  1. Verifique se o TDX está habilitado.

    lscpu |grep -i tdx_guest

    Se a saída contiver tdx_guest, o TDX está habilitado.

    [root@iZwzxxxxxxxx:~]# lscpu |grep -i tdx_guest
    Flags:           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc bts rep_good nopl xtopology tsc_known_freq pni pclmulqdq dtes64 ds_cpl ssse3 sdbg fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single sbd ibrs ibpb stibp ibrs_enhanced tdx_guest fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap avx512ifma clflushopts clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid bus_lock_detect cldemote movdiri movdir64b _vp2intersect md_clear serialize tsxldtrk amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
  2. Verifique a instalação dos drivers relacionados ao TDX.

    ls -l /dev/tdx_guest

    A seguinte saída indica que os drivers relacionados ao TDX estão instalados.

    [ ~@iz2ze          ~]# ls -l /dev/tdx_guest
    crw------- 1 root root 10, 125 Jan 30 16:51 /dev/tdx_guest

Etapa 3: Verifique o status do recurso de computação confidencial da GPU

Instâncias confidenciais com GPU única

Verifique o status da computação confidencial.

nvidia-smi conf-compute -f

CC status: ON indica que a computação confidencial está habilitada. CC status: OFF indica que o recurso está desabilitado devido a um erro na instância. Se isso ocorrer, abra um ticket.

Instâncias confidenciais com 8 GPUs

Verifique o status da computação confidencial.

nvidia-smi conf-compute -mgm

Multi-GPU Mode: Protected PCIe indica que a computação confidencial multi-GPU está habilitada. Multi-GPU Mode: None indica que o recurso está desabilitado devido a um erro na instância. Se isso ocorrer, abra um ticket.

Nota

Para instâncias confidenciais com 8 GPUs, o comando nvidia-smi conf-compute -f normalmente retorna CC status: OFF.

Etapa 4: Verifique a confiança da GPU e do NVSwitch usando atestado local

Instâncias confidenciais com GPU única

  1. Instale as dependências de confiança da GPU.

    sudo yum install -y python3.11 python3.11-devel python3.11-pip
    sudo alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 60
    sudo alternatives --set python3 /usr/bin/python3.11
    sudo python3 -m ensurepip --upgrade
    sudo python3 -m pip install --upgrade pip
    
    sudo python3 -m pip install nv_attestation_sdk==2.5.0.post6914366 nv_local_gpu_verifier==2.5.0.post6914366 nv_ppcie_verifier==1.5.0.post6914366 -f https://attest-public-cn-beijing.oss-cn-beijing.aliyuncs.com/repo/pip/attest.html
  2. Verifique o status de confiança da GPU.

    python3 -m verifier.cc_admin --user_mode

    A saída indica que a GPU está no modo de computação confidencial e que medições como driver e VBIOS correspondem aos valores esperados:

    Exemplo completo de saída

    Generating nonce in the local GPU Verifier ..
    Number of GPUs available : 1
    Fetching GPU 0 information from GPU driver.
    All GPU Evidences fetched successfully
    Set OCSP_NONCE_DISABLED to True while using aliyun's OCSP service
    -----------------------------------
    Verifying GPU: GPU-e1e94012-8c7b-f9a2-d712-fc5b014f364c
            Driver version fetched : 550.144.03
            VBIOS version fetched : 96.00.cf.00.05
            Validating GPU certificate chains.
                    The firmware ID in the device certificate chain is matching with the one in the attestation report.
                    GPU attestation report certificate chain validation successful.
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    Driver version fetched from the attestation report : 550.144.03
                    VBIOS version fetched from the attestation report : 96.00.cf.00.05
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating Driver RIM
                            Fetching the driver RIM from the RIM service.
                            RIM Schema validation passed.
                            driver RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            driver RIM signature verification successful.
                            Driver RIM verification successful
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    GPU is in expected state.
            GPU 0 with UUID GPU-e1e94012-8c7b-f9a2-d712-fc5b014f364c verified successfully.
    GPU Attestation is Successful.

Instâncias confidenciais com 8 GPUs

  1. Instale as dependências de confiança da GPU.

    sudo yum install -y python3.11 python3.11-devel python3.11-pip
    sudo alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 60
    sudo alternatives --set python3 /usr/bin/python3.11
    sudo python3 -m ensurepip --upgrade
    sudo python3 -m pip install --upgrade pip
    
    sudo python3 -m pip install nv_attestation_sdk==2.5.0.post6914366 nv_local_gpu_verifier==2.5.0.post6914366 nv_ppcie_verifier==1.5.0.post6914366 -f https://attest-public-cn-beijing.oss-cn-beijing.aliyuncs.com/repo/pip/attest.html
  2. Instale as dependências do NVSwitch.

    wget https://developer.download.nvidia.cn/compute/cuda/repos/rhel8/x86_64/libnvidia-nscq-570-570.148.08-1.x86_64.rpm
    sudo rpm -ivh libnvidia-nscq-570-570.148.08-1.x86_64.rpm
  3. Verifique o status de confiança da GPU/NVSwitch.

    python3 -m ppcie.verifier.verification --gpu-attestation-mode=LOCAL --switch-attestation-mode=LOCAL

    O código de exemplo verifica oito GPUs e quatro NVSwitches. SUCCESS indica que a verificação foi aprovada:

    All nvSwitches Attested Successfully
    ****************************************************
    *    PPCIE: Switch attestation result is True      *
    ****************************************************
    ****************************************************
    *    PPCIE: Switch Attestation Completed           *
    ****************************************************
    ****************************************************
    *          PPCIE: GPU state is READY               *
    ****************************************************
    +-------------------------+----------+
    |        STAGE            |  STATUS  |
    +-------------------------+----------+
    |   GPU Pre-checks        | SUCCESS  |
    |   Switch Pre-checks     | SUCCESS  |
    |   GPU Attestation       | SUCCESS  |
    |   Switch Attestation    | SUCCESS  |
    |   Topology checks       | SUCCESS  |
    +-------------------------+----------+
    ****************************************************
    *    PPCIE: End of PPCIE Verification Tool         *
    ****************************************************

    Exemplo completo de saída

    **************************************************
    *    PPCIE: Starting PPCIE Verification Tool    *
    **************************************************
    **************************************************
    *          PPCIE: Number of GPUs are: 8          *
    **************************************************
    **************************************************
    *       PPCIE: Number of NVSwitches are: 4       *
    **************************************************
    Nonce generated: 006a638b032ae5eed158d6584dd13429de5743ce36498e60b7256703ce6a68ae
    Number of GPUs available : 8
    Fetching GPU 0 information from GPU driver.
    Fetching GPU 1 information from GPU driver.
    Fetching GPU 2 information from GPU driver.
    Fetching GPU 3 information from GPU driver.
    Fetching GPU 4 information from GPU driver.
    Fetching GPU 5 information from GPU driver.
    Fetching GPU 6 information from GPU driver.
    Fetching GPU 7 information from GPU driver.
    All GPU Evidences fetched successfully
    **************************************************
    *           PPCIE: Attesting the GPUs           *
    **************************************************
    Set OCSP_NONCE_DISABLED to True while using aliyun's OCSP service
    -----------------------------------
    Verifying GPU: GPU-db98b8e0-51c7-d188-99ec-6755455abcd9
            Driver version fetched : 570.148.08
            VBIOS version fetched : 96.00.cf.00.05
            Validating GPU certificate chains.
                    The firmware ID in the device certificate chain is matching with the one in the attestation report.
                    GPU attestation report certificate chain validation successful.
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    Driver version fetched from the attestation report : 570.148.08
                    VBIOS version fetched from the attestation report : 96.00.cf.00.05
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating Driver RIM
                            Fetching the driver RIM from the RIM service.
                            RIM Schema validation passed.
                            driver RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            driver RIM signature verification successful.
                            Driver RIM verification successful
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    GPU is in expected state.
            GPU 0 with UUID GPU-db98b8e0-51c7-d188-99ec-6755455abcd9 verified successfully.
    -----------------------------------
    Verifying GPU: GPU-d5372674-da51-fe3c-29f7-034c6aad55bd
            Driver version fetched : 570.148.08
            VBIOS version fetched : 96.00.cf.00.05
            Validating GPU certificate chains.
                    The firmware ID in the device certificate chain is matching with the one in the attestation report.
                    GPU attestation report certificate chain validation successful.
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    Driver version fetched from the attestation report : 570.148.08
                    VBIOS version fetched from the attestation report : 96.00.cf.00.05
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating Driver RIM
                            Fetching the driver RIM from the RIM service.
                            RIM Schema validation passed.
                            driver RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            driver RIM signature verification successful.
                            Driver RIM verification successful
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    GPU is in expected state.
            GPU 1 with UUID GPU-d5372674-da51-fe3c-29f7-034c6aad55bd verified successfully.
    -----------------------------------
    Verifying GPU: GPU-3865b295-1fd1-a21a-a4d3-07bc47ff31ca
            Driver version fetched : 570.148.08
            VBIOS version fetched : 96.00.cf.00.05
            Validating GPU certificate chains.
                    The firmware ID in the device certificate chain is matching with the one in the attestation report.
                    GPU attestation report certificate chain validation successful.
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    Driver version fetched from the attestation report : 570.148.08
                    VBIOS version fetched from the attestation report : 96.00.cf.00.05
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating Driver RIM
                            Fetching the driver RIM from the RIM service.
                            RIM Schema validation passed.
                            driver RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            driver RIM signature verification successful.
                            Driver RIM verification successful
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    GPU is in expected state.
            GPU 2 with UUID GPU-3865b295-1fd1-a21a-a4d3-07bc47ff31ca verified successfully.
    -----------------------------------
    Verifying GPU: GPU-98377e04-ff60-ecac-beb5-28b3e8005c64
            Driver version fetched : 570.148.08
            VBIOS version fetched : 96.00.cf.00.05
            Validating GPU certificate chains.
                    The firmware ID in the device certificate chain is matching with the one in the attestation report.
                    GPU attestation report certificate chain validation successful.
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    Driver version fetched from the attestation report : 570.148.08
                    VBIOS version fetched from the attestation report : 96.00.cf.00.05
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating Driver RIM
                            Fetching the driver RIM from the RIM service.
                            RIM Schema validation passed.
                            driver RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            driver RIM signature verification successful.
                            Driver RIM verification successful
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    GPU is in expected state.
            GPU 3 with UUID GPU-98377e04-ff60-ecac-beb5-28b3e8005c64 verified successfully.
    -----------------------------------
    Verifying GPU: GPU-ecab3a2a-0cb3-eebd-6a46-b941338b9e5f
            Driver version fetched : 570.148.08
            VBIOS version fetched : 96.00.cf.00.05
            Validating GPU certificate chains.
                    The firmware ID in the device certificate chain is matching with the one in the attestation report.
                    GPU attestation report certificate chain validation successful.
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    Driver version fetched from the attestation report : 570.148.08
                    VBIOS version fetched from the attestation report : 96.00.cf.00.05
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating Driver RIM
                            Fetching the driver RIM from the RIM service.
                            RIM Schema validation passed.
                            driver RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            driver RIM signature verification successful.
                            Driver RIM verification successful
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    GPU is in expected state.
            GPU 4 with UUID GPU-ecab3a2a-0cb3-eebd-6a46-b941338b9e5f verified successfully.
    -----------------------------------
    Verifying GPU: GPU-91acee11-dd57-920c-c2f9-0b67fc4540d6
            Driver version fetched : 570.148.08
            VBIOS version fetched : 96.00.cf.00.05
            Validating GPU certificate chains.
                    The firmware ID in the device certificate chain is matching with the one in the attestation report.
                    GPU attestation report certificate chain validation successful.
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    Driver version fetched from the attestation report : 570.148.08
                    VBIOS version fetched from the attestation report : 96.00.cf.00.05
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating Driver RIM
                            Fetching the driver RIM from the RIM service.
                            RIM Schema validation passed.
                            driver RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            driver RIM signature verification successful.
                            Driver RIM verification successful
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    GPU is in expected state.
            GPU 5 with UUID GPU-91acee11-dd57-920c-c2f9-0b67fc4540d6 verified successfully.
    -----------------------------------
    Verifying GPU: GPU-84370594-42f5-cbbe-a71c-b6d22ba45b65
            Driver version fetched : 570.148.08
            VBIOS version fetched : 96.00.cf.00.05
            Validating GPU certificate chains.
                    The firmware ID in the device certificate chain is matching with the one in the attestation report.
                    GPU attestation report certificate chain validation successful.
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    Driver version fetched from the attestation report : 570.148.08
                    VBIOS version fetched from the attestation report : 96.00.cf.00.05
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating Driver RIM
                            Fetching the driver RIM from the RIM service.
                            RIM Schema validation passed.
                            driver RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            driver RIM signature verification successful.
                            Driver RIM verification successful
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    GPU is in expected state.
            GPU 6 with UUID GPU-84370594-42f5-cbbe-a71c-b6d22ba45b65 verified successfully.
    -----------------------------------
    Verifying GPU: GPU-4d8767db-a4ed-4ec1-d863-6c7635366dd1
            Driver version fetched : 570.148.08
            VBIOS version fetched : 96.00.cf.00.05
            Validating GPU certificate chains.
                    The firmware ID in the device certificate chain is matching with the one in the attestation report.
                    GPU attestation report certificate chain validation successful.
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    Driver version fetched from the attestation report : 570.148.08
                    VBIOS version fetched from the attestation report : 96.00.cf.00.05
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating Driver RIM
                            Fetching the driver RIM from the RIM service.
                            RIM Schema validation passed.
                            driver RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            driver RIM signature verification successful.
                            Driver RIM verification successful
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    GPU is in expected state.
            GPU 7 with UUID GPU-4d8767db-a4ed-4ec1-d863-6c7635366dd1 verified successfully.
    GPU Attestation is Successful.
    **************************************************
    *      PPCIE: GPU Attestation result: True      *
    **************************************************
    **************************************************
    *        PPCIE: GPU Attestation Completed        *
    **************************************************
    Nonce generated: 2c345829a31f1650d6185413183b6878c578759c2ef9b4f1f0ed313d38f6c7c3
    Getting evidence details for SWX-F6E1D86E-20D5-7BE5-85AD-E5EF52A80504
    Getting evidence details for SWX-C9296F62-ECDB-F271-3C5A-D7F03F733A4C
    Getting evidence details for SWX-15D9CFBE-E466-0EC5-364C-9EAA0671C686
    Getting evidence details for SWX-4D9DEC0E-C8BC-5CC5-F664-96D874434D05
    All nvSwitch Evidences fetched successfully
    **************************************************
    *         PPCIE: Attesting the switches         *
    **************************************************
    Set ocsp_nonce_disabled to True while using aliyun's OCSP service
    -----------------------------------
    Verifying Switch : 0
    NVSwitch info fetched successfully.
            Validating Switch certificate chains.
                    nvSwitch attestation report certificate chain validation successful.
    send_ocsp_request called.
    send_ocsp_request completed successfully
    send_ocsp_request called.
    send_ocsp_request completed successfully
    send_ocsp_request called.
    send_ocsp_request completed successfully
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    VBIOS version fetched from the attestation report : 96.10.6D.00.01
    VBIOS version in attestation report is matching.
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
    fetch_rim_file called.
    fetch_rim_file completed successfully
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
    send_ocsp_request called.
    send_ocsp_request completed successfully
    send_ocsp_request called.
    send_ocsp_request completed successfully
    send_ocsp_request called.
    send_ocsp_request completed successfully
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    Switch is in expected state.
            nvSwitch 0 verified successfully.
    -----------------------------------
    Verifying Switch : 1
    NVSwitch info fetched successfully.
            Validating Switch certificate chains.
                    nvSwitch attestation report certificate chain validation successful.
    send_ocsp_request called.
    send_ocsp_request completed successfully
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    VBIOS version fetched from the attestation report : 96.10.6D.00.01
    VBIOS version in attestation report is matching.
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
    fetch_rim_file called.
    fetch_rim_file completed successfully
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    Switch is in expected state.
            nvSwitch 1 verified successfully.
    -----------------------------------
    Verifying Switch : 2
    NVSwitch info fetched successfully.
            Validating Switch certificate chains.
                    nvSwitch attestation report certificate chain validation successful.
    send_ocsp_request called.
    send_ocsp_request completed successfully
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    VBIOS version fetched from the attestation report : 96.10.6D.00.01
    VBIOS version in attestation report is matching.
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
    fetch_rim_file called.
    fetch_rim_file completed successfully
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    Switch is in expected state.
            nvSwitch 2 verified successfully.
    -----------------------------------
    Verifying Switch : 3
    NVSwitch info fetched successfully.
            Validating Switch certificate chains.
                    nvSwitch attestation report certificate chain validation successful.
    send_ocsp_request called.
    send_ocsp_request completed successfully
                            The certificate chain revocation status verification successful.
            Authenticating attestation report
                    The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                    VBIOS version fetched from the attestation report : 96.10.6D.00.01
    VBIOS version in attestation report is matching.
                    Attestation report signature verification successful.
                    Attestation report verification successful.
            Authenticating the RIMs.
                    Authenticating VBIOS RIM.
                            Fetching the VBIOS RIM from the RIM service.
    fetch_rim_file called.
    fetch_rim_file completed successfully
                            RIM Schema validation passed.
                            vbios RIM certificate chain verification successful.
                            The certificate chain revocation status verification successful.
                            vbios RIM signature verification successful.
                            VBIOS RIM verification successful
            Comparing measurements (runtime vs golden)
                            The runtime measurements are matching with the golden measurements.                            
                    Switch is in expected state.
            nvSwitch 3 verified successfully.
    All nvSwitches Attested Successfully
    **************************************************
    *    PPCIE: Switch attestation result is True    *
    **************************************************
    **************************************************
    *      PPCIE: Switch Attestation Completed      *
    **************************************************
    **************************************************
    *           PPCIE: GPU state is READY           *
    **************************************************
    +--------------------+---------+
    |       STAGE        |  STATUS |
    +--------------------+---------+
    |   GPU Pre-checks   | SUCCESS |
    | Switch Pre-checks  | SUCCESS |
    |  GPU Attestation   | SUCCESS |
    | Switch Attestation | SUCCESS |
    |  Topology checks   | SUCCESS |
    +--------------------+---------+
    **************************************************
    *     PPCIE: End of PPCIE Verification Tool     *
    **************************************************

Limitações

  • Este recurso herda as limitations of TDX instances.

  • Com a computação confidencial da GPU habilitada, as transferências de dados entre CPU e GPU exigem criptografia e descriptografia, resultando em menor desempenho nas tarefas da GPU em comparação com instâncias heterogêneas não confidenciais.

Observações de uso

  1. Instâncias com GPU única usam CUDA 12.4. A biblioteca NVIDIA cuBLAS possui um problema conhecido que pode causar erros ao executar tarefas CUDA ou LLM. Instale uma versão específica do cuBLAS para resolver isso.

    pip3 install nvidia-cublas-cu12==12.4.5.8
  2. Com a computação confidencial da GPU habilitada, a inicialização é lenta, especialmente para instâncias com 8 GPUs. Após a inicialização do SO convidado, verifique se o nvidia-persistenced terminou de iniciar antes de usar a GPU com nvidia-smi ou outros comandos. Verifique o status do service nvidia-persistenced:

    systemctl status nvidia-persistenced | grep "Active: "
    • activating (start) — o service está iniciando.

      Active: activating (start) since Wed 2025-02-19 10:07:54 CST; 2min 20s ago
    • active (running) — o service está em execução.

      Active: active (running) since Wed 2025-02-19 10:10:28 CST; 22s ago
  3. Services de início automático dependentes da GPU, como cloudmonitor.service, nvidia-cdi-refresh.service (do nvidia-container-toolkit-base) ou ollama.service, devem iniciar após o nvidia-persistenced.service.

    Exemplo de configuração para /usr/lib/systemd/system/nvidia-persistenced.service:

    [Unit]
    Description=NVIDIA Persistence Daemon
    Wants=syslog.target
    Before=cloudmonitor.service nvidia-cdi-refresh.service ollama.service
    After=nvidia-fabricmanager.service
    
    [Service]
    Type=forking
    ExecStart=/usr/bin/nvidia-persistenced --user root --uvm-persistence-mode --verbose
    ExecStartPost=/usr/bin/nvidia-smi conf-compute -srs 1
    ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced
    TimeoutStartSec=900
    TimeoutStopSec=60
    
    [Install]
    WantedBy=multi-user.target