Skip to content

Unable to find sgx_envlave in /dev #837

@anjalirai-intel

Description

@anjalirai-intel

I have a ubuntu system version "21.10 (Impish Indri)". The machine supports SGX hardware and sgx is enabled from the bios and i am testing inkernel driver. My kernel version is 5.13

This is the output of ls /dev | grep sgx

sgx_provision
sgx_vepc

This is the output of intel@intel-HP-EliteBook-840-G5:~/linux_sgx$ cpuid | grep -i sgx

  SGX: Software Guard Extensions supported = true
       SGX_LC: SGX launch config supported      = false
    Software Guard Extensions (SGX) capability (0x12/0):
       SGX1 supported                         = true
       SGX2 supported                         = false
       SGX ENCLV E*VIRTCHILD, ESETCONTEXT     = false
       SGX ENCLS ETRACKC, ERDINFO, ELDBC, ELDUC = false
    SGX attributes (0x12/1):
       SGX: Software Guard Extensions supported = true
       SGX_LC: SGX launch config supported      = false
    Software Guard Extensions (SGX) capability (0x12/0):
       SGX1 supported                         = true
       SGX2 supported                         = false
       SGX ENCLV E*VIRTCHILD, ESETCONTEXT     = false
       SGX ENCLS ETRACKC, ERDINFO, ELDBC, ELDUC = false
    SGX attributes (0x12/1):
       SGX: Software Guard Extensions supported = true
       SGX_LC: SGX launch config supported      = false
    Software Guard Extensions (SGX) capability (0x12/0):
       SGX1 supported                         = true
       SGX2 supported                         = false
       SGX ENCLV E*VIRTCHILD, ESETCONTEXT     = false
       SGX ENCLS ETRACKC, ERDINFO, ELDBC, ELDUC = false
    SGX attributes (0x12/1):
       SGX: Software Guard Extensions supported = true
       SGX_LC: SGX launch config supported      = false
    Software Guard Extensions (SGX) capability (0x12/0):
       SGX1 supported                         = true
       SGX2 supported                         = false
       SGX ENCLV E*VIRTCHILD, ESETCONTEXT     = false
       SGX ENCLS ETRACKC, ERDINFO, ELDBC, ELDUC = false
    SGX attributes (0x12/1):
       SGX: Software Guard Extensions supported = true
       SGX_LC: SGX launch config supported      = false
    Software Guard Extensions (SGX) capability (0x12/0):
       SGX1 supported                         = true
       SGX2 supported                         = false
       SGX ENCLV E*VIRTCHILD, ESETCONTEXT     = false
       SGX ENCLS ETRACKC, ERDINFO, ELDBC, ELDUC = false
    SGX attributes (0x12/1):
       SGX: Software Guard Extensions supported = true
       SGX_LC: SGX launch config supported      = false
    Software Guard Extensions (SGX) capability (0x12/0):
       SGX1 supported                         = true
       SGX2 supported                         = false
       SGX ENCLV E*VIRTCHILD, ESETCONTEXT     = false
       SGX ENCLS ETRACKC, ERDINFO, ELDBC, ELDUC = false
    SGX attributes (0x12/1):
       SGX: Software Guard Extensions supported = true
       SGX_LC: SGX launch config supported      = false
    Software Guard Extensions (SGX) capability (0x12/0):
       SGX1 supported                         = true
       SGX2 supported                         = false
       SGX ENCLV E*VIRTCHILD, ESETCONTEXT     = false
       SGX ENCLS ETRACKC, ERDINFO, ELDBC, ELDUC = false
    SGX attributes (0x12/1):
       SGX: Software Guard Extensions supported = true
       SGX_LC: SGX launch config supported      = false
    Software Guard Extensions (SGX) capability (0x12/0):
       SGX1 supported                         = true
       SGX2 supported                         = false
       SGX ENCLV E*VIRTCHILD, ESETCONTEXT     = false
       SGX ENCLS ETRACKC, ERDINFO, ELDBC, ELDUC = false
    SGX attributes (0x12/1):

and then i referred one of the link related to the IntelSGX from intel community to try this repo
https://github.com/ayeks/SGX-hardware.git

intel@intel-HP-EliteBook-840-G5:~/linux_sgx/SGX-hardware$ ./test-sgx
eax: 806ea ebx: 5100800 ecx: 7ffafbff edx: bfebfbff
stepping 10
model 14
family 6
processor type 0
extended model 8
extended family 0
smx: 1

Extended feature bits (EAX=07H, ECX=0H)
eax: 0 ebx: 29c6fbf ecx: 0 edx: 9c002e00
sgx available: 1
sgx launch control: 0

CPUID Leaf 12H, Sub-Leaf 0 of Intel SGX Capabilities (EAX=12H,ECX=0)
eax: 1 ebx: 0 ecx: 0 edx: 241f
sgx 1 supported: 1
sgx 2 supported: 0
MaxEnclaveSize_Not64: 1f
MaxEnclaveSize_64: 24

CPUID Leaf 12H, Sub-Leaf 1 of Intel SGX Capabilities (EAX=12H,ECX=1)
eax: 36 ebx: 0 ecx: 1f edx: 0

CPUID Leaf 12H, Sub-Leaf 2 of Intel SGX Capabilities (EAX=12H,ECX=2)
eax: a0200001 ebx: 0 ecx: 5d80001 edx: 0
size of EPC section in Processor Reserved Memory, 93 M

CPUID Leaf 12H, Sub-Leaf 3 of Intel SGX Capabilities (EAX=12H,ECX=3)
eax: 0 ebx: 0 ecx: 0 edx: 0
size of EPC section in Processor Reserved Memory, 0 M

CPUID Leaf 12H, Sub-Leaf 4 of Intel SGX Capabilities (EAX=12H,ECX=4)
eax: 0 ebx: 0 ecx: 0 edx: 0
size of EPC section in Processor Reserved Memory, 0 M

CPUID Leaf 12H, Sub-Leaf 5 of Intel SGX Capabilities (EAX=12H,ECX=5)
eax: 0 ebx: 0 ecx: 0 edx: 0
size of EPC section in Processor Reserved Memory, 0 M

CPUID Leaf 12H, Sub-Leaf 6 of Intel SGX Capabilities (EAX=12H,ECX=6)
eax: 0 ebx: 0 ecx: 0 edx: 0
size of EPC section in Processor Reserved Memory, 0 M

CPUID Leaf 12H, Sub-Leaf 7 of Intel SGX Capabilities (EAX=12H,ECX=7)
eax: 0 ebx: 0 ecx: 0 edx: 0
size of EPC section in Processor Reserved Memory, 0 M

CPUID Leaf 12H, Sub-Leaf 8 of Intel SGX Capabilities (EAX=12H,ECX=8)
eax: 0 ebx: 0 ecx: 0 edx: 0
size of EPC section in Processor Reserved Memory, 0 M

CPUID Leaf 12H, Sub-Leaf 9 of Intel SGX Capabilities (EAX=12H,ECX=9)
eax: 0 ebx: 0 ecx: 0 edx: 0
size of EPC section in Processor Reserved Memory, 0 M

Everything seems to be fine, but i still don't see sgx_enclave inside /dev folder

Please help me setup inkernel sgx driver for my machine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions