Skip to content

add EPYC-Turin vCPU type support#392

Open
rouming wants to merge 2 commits into
virtee:mainfrom
rouming:add-epyc-turin-support
Open

add EPYC-Turin vCPU type support#392
rouming wants to merge 2 commits into
virtee:mainfrom
rouming:add-epyc-turin-support

Conversation

@rouming
Copy link
Copy Markdown
Contributor

@rouming rouming commented May 8, 2026

PR adds EpycTurin, EpycTurinV1, EpycTurinV2 variants to CpuType so callers:(notably snpguest's generate measurement --vcpu-type EPYC-Turin) can compute launch digests for guests booted with QEMU's EPYC-Turin CPU model. Without this, snpguest fails with:

        ERROR: Invalid VCPU type value provided: EPYC-Turin

The CPUID family / model / stepping values used by sig() were taken verbatim from QEMU's CPU definition at target/i386/cpu.c (entry .name = "EPYC-Turin").

Also fix some warnings when the lib is built with snp feature support only.

rouming added 2 commits May 8, 2026 15:53
Adds EpycTurin, EpycTurinV1, EpycTurinV2 variants to CpuType so
callers:(notably snpguest's "generate measurement --vcpu-type
EPYC-Turin") can compute launch digests for guests booted with QEMU's
EPYC-Turin CPU model. Without this, snpguest fails with:

    ERROR: Invalid VCPU type value provided: EPYC-Turin

The CPUID family / model / stepping values used by sig() were taken
verbatim from QEMU's CPU definition at target/i386/cpu.c (entry
.name = "EPYC-Turin"):

    .family = 26, .model = 0, .stepping = 0

Two version variants exist in the same QEMU table:

    .versions = (X86CPUVersionDefinition[]) {
        { .version = 1 },
        { .version = 2, ... },
    }

so EpycTurinV1 and EpycTurinV2 are added alongside the base EpycTurin;
all three share the same CPU signature cpu_sig(26, 0, 0), matching how
the existing Milan / Genoa entries are structured.

Tested end-to-end on a real EPYC-Turin host: snpguest generate
measurement, fetch ca / vcek, and verify attestation (TCB+FMC, signature,
measurement match) all succeed against a V5 attestation report.

Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
Building with default-features=false, features=["openssl","snp"] (no
"sev" feature) triggers five warnings. Fix each at the source.

error.rs: "use openssl::error::ErrorStack" on cfg(all(openssl, sev)).

firmware/host/types/snp.rs: replace unreachable "_" arms in TcbVersion's
Encoder/Decoder.

launch/linux/snp.rs: tag legacy "pub struct Init" (KVM_SEV_INIT payload,
only consumed via the "sev" feature path) with #[allow(dead_code)] so
it compiles cleanly under snp-only.

Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
@rouming rouming force-pushed the add-epyc-turin-support branch from 7b09125 to b28fcb7 Compare May 8, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants