Re: [PATCH 3/7] i386: Add sgx_get_info() interface

2021-09-09 Thread Yang Zhong
On Wed, Sep 08, 2021 at 10:55:13AM +0200, Paolo Bonzini wrote: > On 08/09/21 10:19, Yang Zhong wrote: > >+if (x86ms->sgx_epc_list) { > >+PCMachineState *pcms = PC_MACHINE(ms); > >+SGXEPCState *sgx_epc = >sgx_epc; > >+info = g_new0(SGXInfo, 1); > >+ > >+info->sgx

Re: [PATCH 3/7] i386: Add sgx_get_info() interface

2021-09-08 Thread Yang Zhong
On Wed, Sep 08, 2021 at 10:32:27AM +0200, Philippe Mathieu-Daudé wrote: > On 9/8/21 10:19 AM, Yang Zhong wrote: > > Add the sgx_get_info() interface for hmp and QMP usage, which > > will get the SGX info from this API. > > > > Signed-off-by: Yang Zhong > > --- > > hw/i386/sgx.c | 21

Re: [PATCH 3/7] i386: Add sgx_get_info() interface

2021-09-08 Thread Paolo Bonzini
On 08/09/21 10:19, Yang Zhong wrote: +if (x86ms->sgx_epc_list) { +PCMachineState *pcms = PC_MACHINE(ms); +SGXEPCState *sgx_epc = >sgx_epc; +info = g_new0(SGXInfo, 1); + +info->sgx = true; +info->sgx1 = true; +info->sgx2 = true; +

Re: [PATCH 3/7] i386: Add sgx_get_info() interface

2021-09-08 Thread Philippe Mathieu-Daudé
On 9/8/21 10:19 AM, Yang Zhong wrote: > Add the sgx_get_info() interface for hmp and QMP usage, which > will get the SGX info from this API. > > Signed-off-by: Yang Zhong > --- > hw/i386/sgx.c | 21 + > include/hw/i386/sgx.h | 11 +++ > target/i386/monitor.c

[PATCH 3/7] i386: Add sgx_get_info() interface

2021-09-08 Thread Yang Zhong
Add the sgx_get_info() interface for hmp and QMP usage, which will get the SGX info from this API. Signed-off-by: Yang Zhong --- hw/i386/sgx.c | 21 + include/hw/i386/sgx.h | 11 +++ target/i386/monitor.c | 32 3 files