mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
qemu_namespace: Create SGX related nodes in domain's namespace
This is similar to the previous commit. SGX memory backend needs to access /dev/sgx_vepc and /dev/sgx_provision. Create these nodes in domain's private /dev when required by domain's config. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Haibin Huang <haibin.huang@intel.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
bea39eb9f3
commit
83bb0f0ee1
@ -370,11 +370,23 @@ static int
|
||||
qemuDomainSetupMemory(virDomainMemoryDef *mem,
|
||||
GSList **paths)
|
||||
{
|
||||
if (mem->model != VIR_DOMAIN_MEMORY_MODEL_NVDIMM &&
|
||||
mem->model != VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM)
|
||||
return 0;
|
||||
switch (mem->model) {
|
||||
case VIR_DOMAIN_MEMORY_MODEL_NVDIMM:
|
||||
case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM:
|
||||
*paths = g_slist_prepend(*paths, g_strdup(mem->nvdimmPath));
|
||||
break;
|
||||
|
||||
*paths = g_slist_prepend(*paths, g_strdup(mem->nvdimmPath));
|
||||
case VIR_DOMAIN_MEMORY_MODEL_SGX_EPC:
|
||||
*paths = g_slist_prepend(*paths, g_strdup(QEMU_DEV_SGX_VEPVC));
|
||||
*paths = g_slist_prepend(*paths, g_strdup(QEMU_DEV_SGX_PROVISION));
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_MEMORY_MODEL_NONE:
|
||||
case VIR_DOMAIN_MEMORY_MODEL_DIMM:
|
||||
case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_MEM:
|
||||
case VIR_DOMAIN_MEMORY_MODEL_LAST:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user