Todos os produtos
Search
Central de documentação

Elastic Compute Service:Build a heterogeneous confidential computing environment

Última atualização: Jul 03, 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 e a computação de dados na gpu. Para construir um ambiente de computação confidencial TDX da CPU e verificar o atestado remoto, consulte Construir um ambiente de computação confidencial TDX. Para implantar inferência de LLM em uma instância de computação confidencial heterogênea, consulte Construir um ambiente de inferência de LLM medido em uma instância confidencial heterogênea.

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/Sistema Operacional Host acesse registradores sensíveis ou dados de memória da instância.

  2. Um firewall PCIe impede que a CPU acesse registradores críticos da gpu e a memória de vídeo protegida. O Hypervisor/Sistema Operacional Host só pode executar operações limitadas, como redefinir a gpu, mas não consegue acessar dados sensíveis.

  3. O Firewall NVLink da gpu bloqueia o acesso direto de outras gpus à sua memória de vídeo.

  4. Durante a inicialização, o driver da gpu e as funções de biblioteca no 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 pelo PCIe entre a CPU e a gpu.

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

    Aplicativos 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, o VBIOS e as medições de status do hardware. Uma parte confiável pode comparar essas medições com as referências 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, garanta 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 Criar uma instância usando o assistente.

  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 é 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 e causar 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, desvincule as ENIs secundárias adicionais e desanexe 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 a Etapa 1 para aumentar o buffer SWIOTLB para 8 GB. Em seguida, anexe ENIs à instância e anexe discos de dados.

  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. Principais parâmetros:

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>

Construir 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.

Os passos 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 Fazer login em uma instância Linux usando o Workbench.

  2. Defina o buffer SWIOTLB para 8 GB.

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

  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 serviço 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 serviços 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 Fazer login em uma instância Linux usando o Workbench.

    Importante

    As instâncias de computação confidencial inicializam lentamente. 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 Reiniciar uma instância.

  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 serviço 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 serviços 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 estará habilitado.tdx-install

  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.image

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.

image

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.

image

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:

    image

    Exemplo de saída completa

    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:

    image

    Exemplo de saída completa

    **************************************************
    *    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 limitações das instâncias TDX.

  • Com a computação confidencial da gpu habilitada, as transferências de dados entre CPU e gpu exigem criptografia e descriptografia. Isso resulta 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 esse problema.

    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 sistema operacional convidado, verifique se o nvidia-persistenced terminou de iniciar antes de usar a gpu com nvidia-smi ou outros comandos. Verifique o status do serviço nvidia-persistenced:

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

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

      Active: active (running) since Wed 2025-02-19 10:10:28 CST; 22s ago
  3. Serviços 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