qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Yang Zhong
Subject: Re: [PATCH 3/7] i386: Add sgx_get_info() interface
Date: Thu, 9 Sep 2021 15:05:03 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

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 = &pcms->sgx_epc;
> >+        info = g_new0(SGXInfo, 1);
> >+
> >+        info->sgx = true;
> >+        info->sgx1 = true;
> >+        info->sgx2 = true;
> >+        info->flc = true;
> 
> Since this is querying the actual machine, it should check the CPUID
> bits of the first CPU, instead of just returning true.
> 

  Paolo, this interface is only for checking SGX info from VM side by
  motinor or QMP tools, the SGXInfo *sgx_get_capabilities(Error **errp)
  in the patch5 check the host cpuid info to get the SGX related CPU bit
  info, like sgx,flc,sgx1,and sgx2 bit info. so here, if x86ms->sgx_epc_list
  is setting, those bits info in the VM side are all ture. thanks!

  Yang
 
> Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]