Re: [PATCH v3 05/33] vl: Add sgx compound properties to expose SGX EPC sections to guest

2021-07-12 Thread Yang Zhong
On Fri, Jul 09, 2021 at 06:07:13PM +0200, Paolo Bonzini wrote: > On 09/07/21 13:09, Yang Zhong wrote: > >+sgx_epc = g_malloc0(sizeof(*sgx_epc)); > >+pcms->sgx_epc = sgx_epc; > >+ > > No need to malloc this, it's small. > Thanks Paolo, i will use g_new0() to replace this malloc, thanks!

Re: [PATCH v3 05/33] vl: Add sgx compound properties to expose SGX EPC sections to guest

2021-07-09 Thread Paolo Bonzini
On 09/07/21 13:09, Yang Zhong wrote: +sgx_epc = g_malloc0(sizeof(*sgx_epc)); +pcms->sgx_epc = sgx_epc; + No need to malloc this, it's small. } +## +# @SgxEPC: +# +# Sgx EPC cmdline information +# +# @id: device's ID +# +# @memdev: memory backend linked with device +# +# Since: 6

[PATCH v3 05/33] vl: Add sgx compound properties to expose SGX EPC sections to guest

2021-07-09 Thread Yang Zhong
From: Sean Christopherson Because SGX EPC is enumerated through CPUID, EPC "devices" need to be realized prior to realizing the vCPUs themselves, i.e. long before generic devices are parsed and realized. From a virtualization perspective, the CPUID aspect also means that EPC sections cannot be h