Giter VIP home page Giter VIP logo

Comments (5)

deeglaze avatar deeglaze commented on July 28, 2024

The product name is specified by the AMD KDS specification https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/specifications/57230.pdf as derived directly from Cpuid_0000_0001_EAX as computed in abi/abi.go. What does /proc/cpuinfo tell you about the family and model numbers?

from go-sev-guest.

shuk777 avatar shuk777 commented on July 28, 2024
cpu family      : 25
model           : 1
model name      : AMD EPYC 7413 24-Core Processor

dmesg | grep SEV gives:

[    1.100229] SEV-SNP: RMP table physical address 0x0000000025e00000 - 0x00000000566fffff
[   17.326099] ccp 0000:27:00.1: SEV API:1.52 build:4
[   17.326109] ccp 0000:27:00.1: SEV-SNP API:1.52 build:4
[   17.388670] SEV supported: 410 ASIDs
[   17.388671] SEV-ES and SEV-SNP supported: 99 ASIDs
[ 1889.982867] SEV_GET_ID command is deprecated, use SEV_GET_ID2

from go-sev-guest.

deeglaze avatar deeglaze commented on July 28, 2024

Is this dmesg from the guest or the host? It's up to the VMM (e.g., Qemu) to present the correct CPUID table entries for the AMD Milan-B1 machine.

from go-sev-guest.

aep avatar aep commented on July 28, 2024

the amd docs are pretty confusing. they say that for milan the ext family is supposed to be 0xA which would be Opteron Era. Milan is 0x19 and of course that what we observe on the guest.

CPU Info for type #0:
------------------
  arch       : x86
  purpose    : general
  vendor_str : `AuthenticAMD'
  vendor id  : 1
  brand_str  : `AMD EPYC-Milan-v2 Processor'
  family     : 15 (0Fh)
  model      : 1 (01h)
  stepping   : 1 (01h)
  ext_family : 25 (19h)
  ext_model  : 1 (01h)
  num_cores  : 1
  num_logical: 1
  tot_logical: 1
  affi_mask  : 0x00000001
  L1 D cache : 32 KB
  L1 I cache : 32 KB
  L2 cache   : 512 KB
  L3 cache   : 32768 KB
  L4 cache   : -1 KB
  L1D assoc. : 8-way
  L1I assoc. : 8-way
  L2 assoc.  : 8-way
  L3 assoc.  : 16-way
  L4 assoc.  : -1-way
  L1D line sz: 64 bytes
  L1I line sz: 64 bytes
  L2 line sz : 64 bytes
  L3 line sz : 64 bytes
  L4 line sz : -1 bytes
  L1D inst.  : -1
  L1I inst.  : -1
  L2 inst.   : -1
  L3 inst.   : -1
  L4 inst.   : -1
  SSE units  : 64 bits (authoritative)
  code name  : `EPYC (Milan)'
  features   : fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht pni pclmul ssse3 cx16 sse4_1 sse4_2 syscall movbe popcnt aes xsave osxsave avx mmxext nx fxsr_opt rdtscp lm lahf_lm cmp_legacy abm misalignsse sse4a 3dnowprefetch osvw fma3 f16c rdrand avx2 bmi1 bmi2 sha_ni rdseed adx hypervisor

even if you wanted to, you could not pass 0xA since LAUNCH_UPDATE is rightfully rejecting that

qemu-system-x86_64: sev_snp_launch_update: SNP_LAUNCH_UPDATE ret=-5 fw_error=22 'Invalid parameter'
qemu-system-x86_64: SEV-SNP: CPUID validation failed for function 0x8000001d, index: 0x3.

edit: apparantly the bits are different, because with these values as posted above, the code in go-sev-guest works just fine. more confusion.

package main

import "fmt"

func main () {
    eax, _, _, _ := cpuid(1)
    extendedFamily := (eax >> 20) & 0xff
    extendedModel := (eax >> 16) & 0xf
    family := (eax >> 8) & 0xf;

    fmt.Println(extendedFamily == 0xA)
    fmt.Println(family == 0xf)

    fmt.Println(extendedModel==0);
}
[root@proud_stone abi]# ./abi 
true
true
true



from go-sev-guest.

deeglaze avatar deeglaze commented on July 28, 2024

I'm going to close this as a duplicate of Issue#115. The product name handling should become much simpler when the planned AMD SEV-SNP firmware update adds family/model/stepping values directly to the attestation report.

from go-sev-guest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.