Skip to content

Commit 28d57e4

Browse files
authored
Drop support for 5.x kernels (#7126)
1 parent 89bf71c commit 28d57e4

5 files changed

Lines changed: 7 additions & 168 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1313

1414
- CCF no longer has platform-specific builds. The single build configuration will run on both SNP and Virtual, automatically detecting the current platform at runtime. This means the `COMPILE_TARGET` CMake option is no longer required, and all release artifacts no longer have a platform in their path.
1515
- The `logging.host_level` configuration option and `--enclave-log-level` CLI switch are replaced by a combined `--log-level` CLI switch (#7104).
16+
- Drop support for `5.*` Linux kernels exposing `/dev/sev`. Only `6.*+` Linux kernels exposing `/dev/sev-guest` are now supported (#7109).
1617

1718
### Removed
1819

include/ccf/pal/snp_ioctl.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,19 @@
22
// Licensed under the Apache 2.0 License.
33
#pragma once
44

5-
#include "ccf/pal/snp_ioctl5.h"
65
#include "ccf/pal/snp_ioctl6.h"
76

87
namespace ccf::pal::snp
98
{
109
static inline bool supports_sev_snp()
1110
{
12-
return ioctl5::supports_sev_snp() || ioctl6::supports_sev_snp();
11+
return ioctl6::supports_sev_snp();
1312
}
1413

1514
static std::unique_ptr<AttestationInterface> get_attestation(
1615
const PlatformAttestationReportData& report_data)
1716
{
18-
if (ioctl5::supports_sev_snp())
19-
{
20-
return std::make_unique<ioctl5::Attestation>(report_data);
21-
}
22-
else if (ioctl6::supports_sev_snp())
17+
if (ioctl6::supports_sev_snp())
2318
{
2419
return std::make_unique<ioctl6::Attestation>(report_data);
2520
}

include/ccf/pal/snp_ioctl5.h

Lines changed: 0 additions & 149 deletions
This file was deleted.

samples/scripts/snpinfo.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@
44

55
set +e
66

7-
# Path to the SEV guest device on patched 5.x kernels
8-
AMD_SEV_DEVICE="/dev/sev"
7+
98
# Path to the SEV guest device from 6.0 onwards
109
# https://www.kernel.org/doc/html/v6.0/virt/coco/sev-guest.html
1110
AMD_SEV_GUEST_DEVICE="/dev/sev-guest"
1211

1312
echo "AMD SEV-SNP DEVICE:"
14-
if test -c "$AMD_SEV_DEVICE"; then
15-
echo "$AMD_SEV_DEVICE detected."
16-
elif test -c "$AMD_SEV_GUEST_DEVICE"; then
13+
if test -c "$AMD_SEV_GUEST_DEVICE"; then
1714
echo "$AMD_SEV_GUEST_DEVICE detected."
1815
else
19-
echo "Neither $AMD_SEV_DEVICE, nor $AMD_SEV_GUEST_DEVICE detected."
16+
echo "$AMD_SEV_GUEST_DEVICE was not detected."
2017
fi

tests/infra/platform_detection.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,11 @@ class Platform(StrEnum):
1111
SNP = "snp"
1212

1313

14-
# Path to the SEV guest device on patched 5.x kernels
15-
_SEV_DEVICE_LINUX_5 = "/dev/sev"
16-
1714
# Path to the SEV guest device from 6.0 onwards
1815
# https://www.kernel.org/doc/html/v6.0/virt/coco/sev-guest.html
1916
_SEV_DEVICE_LINUX_6 = "/dev/sev-guest"
2017

21-
SNP_SUPPORT = any(
22-
path.exists(dev) for dev in [_SEV_DEVICE_LINUX_5, _SEV_DEVICE_LINUX_6]
23-
)
18+
SNP_SUPPORT = any(path.exists(dev) for dev in [_SEV_DEVICE_LINUX_6])
2419

2520

2621
def _detect_platform():

0 commit comments

Comments
 (0)