On 10/8/22 06:00, Lin Yang wrote: > With NUMA config: > > <devices> > ... > <memory model='sgx-epc'> > <source> > <nodemask>0-1</nodemask> > </source> > <target> > <size unit='KiB'>512</size> > <node>0</node> > </target> > </memory> > ... > </devices> > > Without NUMA config: > > <devices> > ... > <memory model='sgx-epc'> > <target> > <size unit='KiB'>512</size> > </target> > </memory> > ... > </devices> Patches look good to me. And I'd like to merge them. However, in one of previous iterations Peter raised a concern whether this should be exposed as something else than <memory model='sgx-epc'/>. One fact that would support this is that SGX 'cuts' from guest memory. I mean, memory backend-epc does not add more RAM into the guest: # ./qemu-system-x86_64 -S -nographic -nodefaults -m 128 \ -machine pc,sgx-epc.0.memdev=memepc0,sgx-epc.0.node=0 \ -object '{"qom-type":"memory-backend-epc","id":"memepc0","prealloc":true,"size":67108864,"host-nodes":[0],"policy":"bind"}' \ -monitor stdio QEMU 7.1.50 monitor - type 'help' for more information (qemu) info memory-devices Memory device [sgx-epc]: "" memaddr: 0x100000000 size: 67108864 node: 0 memdev: /objects/memepc0 (qemu) info memory_size_summary base memory: 134217728 plugged memory: 0 (qemu) Which is also the reason why we need to special case VIR_DOMAIN_MEMORY_MODEL_SGX_EPC so much. On the other hand, the fact that QEMU exposes it as a memory backend means, that it kind of falls into <memory/> category. So my question then is, Peter, are you okay with leaving this under <memory/> or do you have other suggestion? Michal