All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: RFC: sgx-epc is not listed in machine type help
  2022-04-28 11:59 RFC: sgx-epc is not listed in machine type help Jinpu Wang
@ 2022-04-28 11:48 ` Yang Zhong
  2022-04-28 12:18   ` Jinpu Wang
  0 siblings, 1 reply; 9+ messages in thread
From: Yang Zhong @ 2022-04-28 11:48 UTC (permalink / raw)
  To: Jinpu Wang; +Cc: yang.zhong, Paolo Bonzini, qemu-devel, Yu Zhang

On Thu, Apr 28, 2022 at 01:59:33PM +0200, Jinpu Wang wrote:
> Hi Yang, hi Paolo,
> 
> We noticed sgx-epc machine type is not listed in the output of
> "qemu-system-x86_64 -M ?",
> This is what I got with qemu-7.0
> Supported machines are:
> microvm              microvm (i386)
> pc                   Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-7.0)
> pc-i440fx-7.0        Standard PC (i440FX + PIIX, 1996) (default)
> pc-i440fx-6.2        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-6.1        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-6.0        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-5.2        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-5.1        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-5.0        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-4.2        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-4.1        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-4.0        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-3.1        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-3.0        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.9        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.8        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.7        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.6        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.5        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.4        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.3        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.2        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.12       Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.11       Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.10       Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.1        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-2.0        Standard PC (i440FX + PIIX, 1996)
> pc-i440fx-1.7        Standard PC (i440FX + PIIX, 1996) (deprecated)
> pc-i440fx-1.6        Standard PC (i440FX + PIIX, 1996) (deprecated)
> pc-i440fx-1.5        Standard PC (i440FX + PIIX, 1996) (deprecated)
> pc-i440fx-1.4        Standard PC (i440FX + PIIX, 1996) (deprecated)
> q35                  Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-7.0)
> pc-q35-7.0           Standard PC (Q35 + ICH9, 2009)
> pc-q35-6.2           Standard PC (Q35 + ICH9, 2009)
> pc-q35-6.1           Standard PC (Q35 + ICH9, 2009)
> pc-q35-6.0           Standard PC (Q35 + ICH9, 2009)
> pc-q35-5.2           Standard PC (Q35 + ICH9, 2009)
> pc-q35-5.1           Standard PC (Q35 + ICH9, 2009)
> pc-q35-5.0           Standard PC (Q35 + ICH9, 2009)
> pc-q35-4.2           Standard PC (Q35 + ICH9, 2009)
> pc-q35-4.1           Standard PC (Q35 + ICH9, 2009)
> pc-q35-4.0.1         Standard PC (Q35 + ICH9, 2009)
> pc-q35-4.0           Standard PC (Q35 + ICH9, 2009)
> pc-q35-3.1           Standard PC (Q35 + ICH9, 2009)
> pc-q35-3.0           Standard PC (Q35 + ICH9, 2009)
> pc-q35-2.9           Standard PC (Q35 + ICH9, 2009)
> pc-q35-2.8           Standard PC (Q35 + ICH9, 2009)
> pc-q35-2.7           Standard PC (Q35 + ICH9, 2009)
> pc-q35-2.6           Standard PC (Q35 + ICH9, 2009)
> pc-q35-2.5           Standard PC (Q35 + ICH9, 2009)
> pc-q35-2.4           Standard PC (Q35 + ICH9, 2009)
> pc-q35-2.12          Standard PC (Q35 + ICH9, 2009)
> pc-q35-2.11          Standard PC (Q35 + ICH9, 2009)
> pc-q35-2.10          Standard PC (Q35 + ICH9, 2009)
> isapc                ISA-only PC
> none                 empty machine
> x-remote             Experimental remote machine
> 
> 
> I think this would cause confusion to users, is there a reason behind this?
> 

  No specific machine type for SGX, and SGX is only supported in Qemu PC and Q35 platform.
  
  Yang


> Thanks!
> Jinpu Wang @ IONOS Cloud


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RFC: sgx-epc is not listed in machine type help
@ 2022-04-28 11:59 Jinpu Wang
  2022-04-28 11:48 ` Yang Zhong
  0 siblings, 1 reply; 9+ messages in thread
From: Jinpu Wang @ 2022-04-28 11:59 UTC (permalink / raw)
  To: yang.zhong, Paolo Bonzini, qemu-devel, Yu Zhang

Hi Yang, hi Paolo,

We noticed sgx-epc machine type is not listed in the output of
"qemu-system-x86_64 -M ?",
This is what I got with qemu-7.0
Supported machines are:
microvm              microvm (i386)
pc                   Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-7.0)
pc-i440fx-7.0        Standard PC (i440FX + PIIX, 1996) (default)
pc-i440fx-6.2        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-6.1        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-6.0        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-5.2        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-5.1        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-5.0        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-4.2        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-4.1        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-4.0        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-3.1        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-3.0        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.9        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.8        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.7        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.6        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.5        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.4        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.3        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.2        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.12       Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.11       Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.10       Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.1        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.0        Standard PC (i440FX + PIIX, 1996)
pc-i440fx-1.7        Standard PC (i440FX + PIIX, 1996) (deprecated)
pc-i440fx-1.6        Standard PC (i440FX + PIIX, 1996) (deprecated)
pc-i440fx-1.5        Standard PC (i440FX + PIIX, 1996) (deprecated)
pc-i440fx-1.4        Standard PC (i440FX + PIIX, 1996) (deprecated)
q35                  Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-7.0)
pc-q35-7.0           Standard PC (Q35 + ICH9, 2009)
pc-q35-6.2           Standard PC (Q35 + ICH9, 2009)
pc-q35-6.1           Standard PC (Q35 + ICH9, 2009)
pc-q35-6.0           Standard PC (Q35 + ICH9, 2009)
pc-q35-5.2           Standard PC (Q35 + ICH9, 2009)
pc-q35-5.1           Standard PC (Q35 + ICH9, 2009)
pc-q35-5.0           Standard PC (Q35 + ICH9, 2009)
pc-q35-4.2           Standard PC (Q35 + ICH9, 2009)
pc-q35-4.1           Standard PC (Q35 + ICH9, 2009)
pc-q35-4.0.1         Standard PC (Q35 + ICH9, 2009)
pc-q35-4.0           Standard PC (Q35 + ICH9, 2009)
pc-q35-3.1           Standard PC (Q35 + ICH9, 2009)
pc-q35-3.0           Standard PC (Q35 + ICH9, 2009)
pc-q35-2.9           Standard PC (Q35 + ICH9, 2009)
pc-q35-2.8           Standard PC (Q35 + ICH9, 2009)
pc-q35-2.7           Standard PC (Q35 + ICH9, 2009)
pc-q35-2.6           Standard PC (Q35 + ICH9, 2009)
pc-q35-2.5           Standard PC (Q35 + ICH9, 2009)
pc-q35-2.4           Standard PC (Q35 + ICH9, 2009)
pc-q35-2.12          Standard PC (Q35 + ICH9, 2009)
pc-q35-2.11          Standard PC (Q35 + ICH9, 2009)
pc-q35-2.10          Standard PC (Q35 + ICH9, 2009)
isapc                ISA-only PC
none                 empty machine
x-remote             Experimental remote machine


I think this would cause confusion to users, is there a reason behind this?

Thanks!
Jinpu Wang @ IONOS Cloud


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: sgx-epc is not listed in machine type help
  2022-04-28 12:18   ` Jinpu Wang
@ 2022-04-28 12:16     ` Yang Zhong
  2022-04-28 12:56       ` Jinpu Wang
  2022-04-28 12:33     ` Daniel P. Berrangé
  1 sibling, 1 reply; 9+ messages in thread
From: Yang Zhong @ 2022-04-28 12:16 UTC (permalink / raw)
  To: Jinpu Wang; +Cc: yang.zhong, Paolo Bonzini, qemu-devel, Yu Zhang

On Thu, Apr 28, 2022 at 02:18:54PM +0200, Jinpu Wang wrote:
> On Thu, Apr 28, 2022 at 2:05 PM Yang Zhong <yang.zhong@intel.com> wrote:
> >
> > On Thu, Apr 28, 2022 at 01:59:33PM +0200, Jinpu Wang wrote:
> > > Hi Yang, hi Paolo,
> > >
> > > We noticed sgx-epc machine type is not listed in the output of
> > > "qemu-system-x86_64 -M ?",
> snip
> > >
> > >
> > > I think this would cause confusion to users, is there a reason behind this?
> > >
> >
> >   No specific machine type for SGX, and SGX is only supported in Qemu PC and Q35 platform.
> Hi Yang,
> 
> Thanks for your quick reply. Sorry for the stupid question.
> The information I've got from intel or the help sample from
> https://www.qemu.org/docs/master/system/i386/sgx.html, We need to
> specify commands something like this to run SGX-EPC guest:
> qemu-system-x86-64 -m 2G -nographic -enable-kvm -cpu
> host,+sgx-provisionkey  -object
> memory-backend-epc,id=mem1,size=512M,prealloc=on -M
> sgx-epc.0.memdev=mem1,sgx-epc.0.node=0 /tmp/volume-name.img
> 
> Do you mean internally QEMU is converting -M sgx-epc to PC or Q35, can
> I choose which one to use?
>

  Qemu will replace object with compound key, in that time, Paolo asked me
  to use "-M sgx-epc..." to replace "-object sgx-epc..." from Qemu command line.
  
  So the "-M sgx-epc..." will get sgx-epc's parameters from hash key, and
  do not covert sgx-epc to PC or Q35.

  SGX is only one Intel cpu feature, and no dedicated SGX Qemu machine type for SGX. 
  
  Another compound key example:
  "-M pc,smp.cpus=4,smp.cores=1,smp.threads=1"
 
  Yang

 
> Thanks!
> Jinpu


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: sgx-epc is not listed in machine type help
  2022-04-28 11:48 ` Yang Zhong
@ 2022-04-28 12:18   ` Jinpu Wang
  2022-04-28 12:16     ` Yang Zhong
  2022-04-28 12:33     ` Daniel P. Berrangé
  0 siblings, 2 replies; 9+ messages in thread
From: Jinpu Wang @ 2022-04-28 12:18 UTC (permalink / raw)
  To: Yang Zhong; +Cc: Paolo Bonzini, qemu-devel, Yu Zhang

On Thu, Apr 28, 2022 at 2:05 PM Yang Zhong <yang.zhong@intel.com> wrote:
>
> On Thu, Apr 28, 2022 at 01:59:33PM +0200, Jinpu Wang wrote:
> > Hi Yang, hi Paolo,
> >
> > We noticed sgx-epc machine type is not listed in the output of
> > "qemu-system-x86_64 -M ?",
snip
> >
> >
> > I think this would cause confusion to users, is there a reason behind this?
> >
>
>   No specific machine type for SGX, and SGX is only supported in Qemu PC and Q35 platform.
Hi Yang,

Thanks for your quick reply. Sorry for the stupid question.
The information I've got from intel or the help sample from
https://www.qemu.org/docs/master/system/i386/sgx.html, We need to
specify commands something like this to run SGX-EPC guest:
qemu-system-x86-64 -m 2G -nographic -enable-kvm -cpu
host,+sgx-provisionkey  -object
memory-backend-epc,id=mem1,size=512M,prealloc=on -M
sgx-epc.0.memdev=mem1,sgx-epc.0.node=0 /tmp/volume-name.img

Do you mean internally QEMU is converting -M sgx-epc to PC or Q35, can
I choose which one to use?

Thanks!
Jinpu


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: sgx-epc is not listed in machine type help
  2022-04-28 12:18   ` Jinpu Wang
  2022-04-28 12:16     ` Yang Zhong
@ 2022-04-28 12:33     ` Daniel P. Berrangé
  2022-04-28 12:57       ` Jinpu Wang
  1 sibling, 1 reply; 9+ messages in thread
From: Daniel P. Berrangé @ 2022-04-28 12:33 UTC (permalink / raw)
  To: Jinpu Wang; +Cc: Yang Zhong, Paolo Bonzini, qemu-devel, Yu Zhang

On Thu, Apr 28, 2022 at 02:18:54PM +0200, Jinpu Wang wrote:
> On Thu, Apr 28, 2022 at 2:05 PM Yang Zhong <yang.zhong@intel.com> wrote:
> >
> > On Thu, Apr 28, 2022 at 01:59:33PM +0200, Jinpu Wang wrote:
> > > Hi Yang, hi Paolo,
> > >
> > > We noticed sgx-epc machine type is not listed in the output of
> > > "qemu-system-x86_64 -M ?",
> snip
> > >
> > >
> > > I think this would cause confusion to users, is there a reason behind this?
> > >
> >
> >   No specific machine type for SGX, and SGX is only supported in Qemu PC and Q35 platform.
> Hi Yang,
> 
> Thanks for your quick reply. Sorry for the stupid question.
> The information I've got from intel or the help sample from
> https://www.qemu.org/docs/master/system/i386/sgx.html, We need to
> specify commands something like this to run SGX-EPC guest:
> qemu-system-x86-64 -m 2G -nographic -enable-kvm -cpu
> host,+sgx-provisionkey  -object
> memory-backend-epc,id=mem1,size=512M,prealloc=on -M
> sgx-epc.0.memdev=mem1,sgx-epc.0.node=0 /tmp/volume-name.img

That isn't an sgx-epc machine type.

That is an (implicit) i440fx  machine type, with an sgx-epc.0.memdev
property being set.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: sgx-epc is not listed in machine type help
  2022-04-28 12:16     ` Yang Zhong
@ 2022-04-28 12:56       ` Jinpu Wang
  2022-04-29  2:05         ` Yang Zhong
  0 siblings, 1 reply; 9+ messages in thread
From: Jinpu Wang @ 2022-04-28 12:56 UTC (permalink / raw)
  To: Yang Zhong; +Cc: Paolo Bonzini, qemu-devel, Yu Zhang

On Thu, Apr 28, 2022 at 2:32 PM Yang Zhong <yang.zhong@intel.com> wrote:
>
> On Thu, Apr 28, 2022 at 02:18:54PM +0200, Jinpu Wang wrote:
> > On Thu, Apr 28, 2022 at 2:05 PM Yang Zhong <yang.zhong@intel.com> wrote:
> > >
> > > On Thu, Apr 28, 2022 at 01:59:33PM +0200, Jinpu Wang wrote:
> > > > Hi Yang, hi Paolo,
> > > >
> > > > We noticed sgx-epc machine type is not listed in the output of
> > > > "qemu-system-x86_64 -M ?",
> > snip
> > > >
> > > >
> > > > I think this would cause confusion to users, is there a reason behind this?
> > > >
> > >
> > >   No specific machine type for SGX, and SGX is only supported in Qemu PC and Q35 platform.
> > Hi Yang,
> >
> > Thanks for your quick reply. Sorry for the stupid question.
> > The information I've got from intel or the help sample from
> > https://www.qemu.org/docs/master/system/i386/sgx.html, We need to
> > specify commands something like this to run SGX-EPC guest:
> > qemu-system-x86-64 -m 2G -nographic -enable-kvm -cpu
> > host,+sgx-provisionkey  -object
> > memory-backend-epc,id=mem1,size=512M,prealloc=on -M
> > sgx-epc.0.memdev=mem1,sgx-epc.0.node=0 /tmp/volume-name.img
> >
> > Do you mean internally QEMU is converting -M sgx-epc to PC or Q35, can
> > I choose which one to use?
> >
>
>   Qemu will replace object with compound key, in that time, Paolo asked me
>   to use "-M sgx-epc..." to replace "-object sgx-epc..." from Qemu command line.
>
>   So the "-M sgx-epc..." will get sgx-epc's parameters from hash key, and
>   do not covert sgx-epc to PC or Q35.
>
>   SGX is only one Intel cpu feature, and no dedicated SGX Qemu machine type for SGX.
>
>   Another compound key example:
>   "-M pc,smp.cpus=4,smp.cores=1,smp.threads=1"
>
>   Yang
ah, ok. thx for the sharing.
so if I specify "-M pc -M sgx-epc.." it will be the explicit way to
choose PC machine type with sgx feature.
and "-M q35 -M sgx-epc.." qemu will use Q35 machine type?
>
>
> > Thanks!
> > Jinpu


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: sgx-epc is not listed in machine type help
  2022-04-28 12:33     ` Daniel P. Berrangé
@ 2022-04-28 12:57       ` Jinpu Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Jinpu Wang @ 2022-04-28 12:57 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: Yang Zhong, Paolo Bonzini, qemu-devel, Yu Zhang

Hi Daniel,

On Thu, Apr 28, 2022 at 2:33 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Thu, Apr 28, 2022 at 02:18:54PM +0200, Jinpu Wang wrote:
> > On Thu, Apr 28, 2022 at 2:05 PM Yang Zhong <yang.zhong@intel.com> wrote:
> > >
> > > On Thu, Apr 28, 2022 at 01:59:33PM +0200, Jinpu Wang wrote:
> > > > Hi Yang, hi Paolo,
> > > >
> > > > We noticed sgx-epc machine type is not listed in the output of
> > > > "qemu-system-x86_64 -M ?",
> > snip
> > > >
> > > >
> > > > I think this would cause confusion to users, is there a reason behind this?
> > > >
> > >
> > >   No specific machine type for SGX, and SGX is only supported in Qemu PC and Q35 platform.
> > Hi Yang,
> >
> > Thanks for your quick reply. Sorry for the stupid question.
> > The information I've got from intel or the help sample from
> > https://www.qemu.org/docs/master/system/i386/sgx.html, We need to
> > specify commands something like this to run SGX-EPC guest:
> > qemu-system-x86-64 -m 2G -nographic -enable-kvm -cpu
> > host,+sgx-provisionkey  -object
> > memory-backend-epc,id=mem1,size=512M,prealloc=on -M
> > sgx-epc.0.memdev=mem1,sgx-epc.0.node=0 /tmp/volume-name.img
>
> That isn't an sgx-epc machine type.
>
> That is an (implicit) i440fx  machine type, with an sgx-epc.0.memdev
> property being set.
>
>
> With regards,
> Daniel
Thanks for your reply, I have better understanding now.
> --
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: sgx-epc is not listed in machine type help
  2022-04-28 12:56       ` Jinpu Wang
@ 2022-04-29  2:05         ` Yang Zhong
  2022-04-29  4:11           ` Jinpu Wang
  0 siblings, 1 reply; 9+ messages in thread
From: Yang Zhong @ 2022-04-29  2:05 UTC (permalink / raw)
  To: Jinpu Wang; +Cc: yang.zhong, Paolo Bonzini, qemu-devel, Yu Zhang

On Thu, Apr 28, 2022 at 02:56:50PM +0200, Jinpu Wang wrote:
> On Thu, Apr 28, 2022 at 2:32 PM Yang Zhong <yang.zhong@intel.com> wrote:
> >
> > On Thu, Apr 28, 2022 at 02:18:54PM +0200, Jinpu Wang wrote:
> > > On Thu, Apr 28, 2022 at 2:05 PM Yang Zhong <yang.zhong@intel.com> wrote:
> > > >
> > > > On Thu, Apr 28, 2022 at 01:59:33PM +0200, Jinpu Wang wrote:
> > > > > Hi Yang, hi Paolo,
> > > > >
> > > > > We noticed sgx-epc machine type is not listed in the output of
> > > > > "qemu-system-x86_64 -M ?",
> > > snip
> > > > >
> > > > >
> > > > > I think this would cause confusion to users, is there a reason behind this?
> > > > >
> > > >
> > > >   No specific machine type for SGX, and SGX is only supported in Qemu PC and Q35 platform.
> > > Hi Yang,
> > >
> > > Thanks for your quick reply. Sorry for the stupid question.
> > > The information I've got from intel or the help sample from
> > > https://www.qemu.org/docs/master/system/i386/sgx.html, We need to
> > > specify commands something like this to run SGX-EPC guest:
> > > qemu-system-x86-64 -m 2G -nographic -enable-kvm -cpu
> > > host,+sgx-provisionkey  -object
> > > memory-backend-epc,id=mem1,size=512M,prealloc=on -M
> > > sgx-epc.0.memdev=mem1,sgx-epc.0.node=0 /tmp/volume-name.img
> > >
> > > Do you mean internally QEMU is converting -M sgx-epc to PC or Q35, can
> > > I choose which one to use?
> > >
> >
> >   Qemu will replace object with compound key, in that time, Paolo asked me
> >   to use "-M sgx-epc..." to replace "-object sgx-epc..." from Qemu command line.
> >
> >   So the "-M sgx-epc..." will get sgx-epc's parameters from hash key, and
> >   do not covert sgx-epc to PC or Q35.
> >
> >   SGX is only one Intel cpu feature, and no dedicated SGX Qemu machine type for SGX.
> >
> >   Another compound key example:
> >   "-M pc,smp.cpus=4,smp.cores=1,smp.threads=1"
> >
> >   Yang
> ah, ok. thx for the sharing.
> so if I specify "-M pc -M sgx-epc.." it will be the explicit way to
> choose PC machine type with sgx feature.
> and "-M q35 -M sgx-epc.." qemu will use Q35 machine type?

  The below command is okay,
  "-M pc,sgx-epc.." or "-M q35,sgx-epc.."

  Yang

> >
> >
> > > Thanks!
> > > Jinpu


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: sgx-epc is not listed in machine type help
  2022-04-29  2:05         ` Yang Zhong
@ 2022-04-29  4:11           ` Jinpu Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Jinpu Wang @ 2022-04-29  4:11 UTC (permalink / raw)
  To: Yang Zhong; +Cc: Paolo Bonzini, qemu-devel, Yu Zhang

On Fri, Apr 29, 2022 at 4:22 AM Yang Zhong <yang.zhong@intel.com> wrote:
>
> On Thu, Apr 28, 2022 at 02:56:50PM +0200, Jinpu Wang wrote:
> > On Thu, Apr 28, 2022 at 2:32 PM Yang Zhong <yang.zhong@intel.com> wrote:
> > >
> > > On Thu, Apr 28, 2022 at 02:18:54PM +0200, Jinpu Wang wrote:
> > > > On Thu, Apr 28, 2022 at 2:05 PM Yang Zhong <yang.zhong@intel.com> wrote:
> > > > >
> > > > > On Thu, Apr 28, 2022 at 01:59:33PM +0200, Jinpu Wang wrote:
> > > > > > Hi Yang, hi Paolo,
> > > > > >
> > > > > > We noticed sgx-epc machine type is not listed in the output of
> > > > > > "qemu-system-x86_64 -M ?",
> > > > snip
> > > > > >
> > > > > >
> > > > > > I think this would cause confusion to users, is there a reason behind this?
> > > > > >
> > > > >
> > > > >   No specific machine type for SGX, and SGX is only supported in Qemu PC and Q35 platform.
> > > > Hi Yang,
> > > >
> > > > Thanks for your quick reply. Sorry for the stupid question.
> > > > The information I've got from intel or the help sample from
> > > > https://www.qemu.org/docs/master/system/i386/sgx.html, We need to
> > > > specify commands something like this to run SGX-EPC guest:
> > > > qemu-system-x86-64 -m 2G -nographic -enable-kvm -cpu
> > > > host,+sgx-provisionkey  -object
> > > > memory-backend-epc,id=mem1,size=512M,prealloc=on -M
> > > > sgx-epc.0.memdev=mem1,sgx-epc.0.node=0 /tmp/volume-name.img
> > > >
> > > > Do you mean internally QEMU is converting -M sgx-epc to PC or Q35, can
> > > > I choose which one to use?
> > > >
> > >
> > >   Qemu will replace object with compound key, in that time, Paolo asked me
> > >   to use "-M sgx-epc..." to replace "-object sgx-epc..." from Qemu command line.
> > >
> > >   So the "-M sgx-epc..." will get sgx-epc's parameters from hash key, and
> > >   do not covert sgx-epc to PC or Q35.
> > >
> > >   SGX is only one Intel cpu feature, and no dedicated SGX Qemu machine type for SGX.
> > >
> > >   Another compound key example:
> > >   "-M pc,smp.cpus=4,smp.cores=1,smp.threads=1"
> > >
> > >   Yang
> > ah, ok. thx for the sharing.
> > so if I specify "-M pc -M sgx-epc.." it will be the explicit way to
> > choose PC machine type with sgx feature.
> > and "-M q35 -M sgx-epc.." qemu will use Q35 machine type?
>
>   The below command is okay,
>   "-M pc,sgx-epc.." or "-M q35,sgx-epc.."
Thanks!
>
>   Yang
>
> > >
> > >
> > > > Thanks!
> > > > Jinpu


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-04-29  4:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 11:59 RFC: sgx-epc is not listed in machine type help Jinpu Wang
2022-04-28 11:48 ` Yang Zhong
2022-04-28 12:18   ` Jinpu Wang
2022-04-28 12:16     ` Yang Zhong
2022-04-28 12:56       ` Jinpu Wang
2022-04-29  2:05         ` Yang Zhong
2022-04-29  4:11           ` Jinpu Wang
2022-04-28 12:33     ` Daniel P. Berrangé
2022-04-28 12:57       ` Jinpu Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.