зеркало из https://github.com/microsoft/CCF.git
Add `snpinfo.sh` script (#4196)
This commit is contained in:
Родитель
a2cff88272
Коммит
5389dd11ea
|
@ -2,15 +2,6 @@ parameters:
|
|||
cmake_args: ""
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
set -ex
|
||||
samples/scripts/platform_info.sh
|
||||
cat /proc/cpuinfo | grep flags | uniq
|
||||
sudo groupadd -g 119 sgx_prv
|
||||
sudo usermod -a -G sgx_prv $(whoami)
|
||||
displayName: Platform Info
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- script: |
|
||||
set -ex
|
||||
mkdir build
|
||||
|
|
|
@ -26,6 +26,10 @@ jobs:
|
|||
target: ${{ parameters.target }}
|
||||
quictls_mode: ${{ parameters.fetch_quictls }}
|
||||
|
||||
- template: platform.yml
|
||||
parameters:
|
||||
target: "${{ parameters.target }}"
|
||||
|
||||
- template: cmake.yml
|
||||
parameters:
|
||||
cmake_args: "${{ parameters.cmake_args }}"
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
parameters:
|
||||
target: ""
|
||||
|
||||
steps:
|
||||
# 119 is GID of special "sgx_prv" group on underlying VM that is
|
||||
# required to run SGX on kernel > 5.11
|
||||
- ${{ if or(eq(parameters.target, 'SGX'), eq(parameters.target, 'SGXIceLake')) }}:
|
||||
- script: |
|
||||
set -ex
|
||||
sudo groupadd -g 119 sgx_prv
|
||||
sudo usermod -a -G sgx_prv $(whoami)
|
||||
displayName: SGX Group
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- script: |
|
||||
set -ex
|
||||
samples/scripts/sgxinfo.sh
|
||||
cat /proc/cpuinfo | grep flags | uniq
|
||||
displayName: SGX Info
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- ${{ if ne(parameters.target, 'SGX') }}:
|
||||
- script: |
|
||||
set -ex
|
||||
samples/scripts/snpinfo.sh
|
||||
displayName: SEV-SNP Info
|
||||
condition: succeededOrFailed()
|
|
@ -7,9 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
|
||||
## [3.0.0-dev3]
|
||||
|
||||
### Changed
|
||||
### Added
|
||||
|
||||
- `sgxinfo.sh` script has been renamed to `platform_info.sh` (#4184).
|
||||
- New `snpinfo.sh` script (#4196).
|
||||
|
||||
## [3.0.0-dev2]
|
||||
|
||||
|
|
|
@ -141,7 +141,8 @@ foreach(UTILITY ${CCF_TEST_UTILITIES})
|
|||
endforeach()
|
||||
|
||||
# Install additional utilities
|
||||
install(PROGRAMS ${CCF_DIR}/samples/scripts/platform_info.sh DESTINATION bin)
|
||||
install(PROGRAMS ${CCF_DIR}/samples/scripts/sgxinfo.sh DESTINATION bin)
|
||||
install(PROGRAMS ${CCF_DIR}/samples/scripts/snpinfo.sh DESTINATION bin)
|
||||
install(FILES ${CCF_DIR}/tests/config.jinja DESTINATION bin)
|
||||
|
||||
# Install getting_started scripts for VM creation and setup
|
||||
|
|
|
@ -4,15 +4,6 @@
|
|||
|
||||
set +e
|
||||
|
||||
# SEV-SNP
|
||||
AMD_SEV_SNP_DEVICE="/dev/sev"
|
||||
if test -c "$AMD_SEV_SNP_DEVICE"; then
|
||||
echo "AMD SEV-SNP:"
|
||||
echo "$AMD_SEV_SNP_DEVICE detected."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# SGX
|
||||
if grep -q "^flags.*sgx.*" < /proc/cpuinfo ; then
|
||||
echo "LINUX KERNEL WITH BUILT-IN SGX SUPPORT (5.11+):"
|
||||
uname -r
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the Apache 2.0 License.
|
||||
|
||||
set +e
|
||||
|
||||
AMD_SEV_SNP_DEVICE="/dev/sev"
|
||||
echo "AMD SEV-SNP DEVICE:"
|
||||
if test -c "$AMD_SEV_SNP_DEVICE"; then
|
||||
echo "$AMD_SEV_SNP_DEVICE detected."
|
||||
else
|
||||
echo "$AMD_SEV_SNP_DEVICE not detected."
|
||||
fi
|
Загрузка…
Ссылка в новой задаче