未验证 提交 f0f69725 编写于 作者: H hustliyilin 提交者: GitHub

rune/libcontainer: Generate Enclave Device /dev/gsgx for graphene-sgx LibOS

Support to automatically mount the /dev/gsgx to enclave container.
Signed-off-by: NYilin Li <YiLin.Li@linux.alibaba.com>
上级 3d0beb4f
......@@ -395,7 +395,7 @@ func createEnclaveDevices(devs []*configs.Device, etype string, fn func(dev *con
func genEnclavePathTemplate(etype string) []string {
switch etype {
case configs.EnclaveHwIntelSgx:
return []string{"/dev/isgx", "/dev/sgx/enclave"}
return []string{"/dev/isgx", "/dev/sgx/enclave", "/dev/gsgx"}
default:
return nil
}
......@@ -415,6 +415,11 @@ func genEnclaveDeviceTemplate(etype string) []*configs.Device {
Path: "/dev/sgx/enclave",
Major: 10,
},
&configs.Device{
Type: 'c',
Path: "/dev/gsgx",
Major: 10,
},
}
default:
return nil
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册