qemu-devel
[Top][All Lists]
Advanced

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

Re: [RESEND PATCH 31/32] sgx-epc: Add the fill_device_info() callback su


From: Yang Zhong
Subject: Re: [RESEND PATCH 31/32] sgx-epc: Add the fill_device_info() callback support
Date: Thu, 6 May 2021 16:46:36 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, May 03, 2021 at 01:01:22PM -0500, Eric Blake wrote:
> On 4/30/21 1:24 AM, Yang Zhong wrote:
> > Since there is no fill_device_info() callback support, and when we
> > execute "info memory-devices" command in the monitor, the segfault
> > will be found.
> > 
> > This patch will add this callback support and "info memory-devices"
> > will show sgx epc memory exposed to guest. The result as below:
> > 
> > qemu) info memory-devices
> > Memory device [sgx-epc]: "epc1"
> >   memaddr: 0x180000000
> >   size: 29360128
> >   memdev: /objects/mem1
> > Memory device [sgx-epc]: "epc2"
> >   memaddr: 0x181c00000
> >   size: 10485760
> >   memdev: /objects/mem2
> > 
> > Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> > ---
> 
> > +++ b/qapi/machine.json
> > @@ -1184,6 +1184,29 @@
> >            }
> >  }
> >  
> > +##
> > +# @SgxEPCDeviceInfo:
> > +#
> > +# Sgx EPC state information
> > +#
> > +# @id: device's ID
> > +#
> > +# @memaddr: physical address in memory, where device is mapped
> > +#
> > +# @size: size of memory that the device provides
> > +#
> > +# @memdev: memory backend linked with device
> > +#
> > +# Since: 5.1
> 
> 6.1

  Eric, thanks for your comments, i will change this in the next version, 
thanks!

  Yang

> 
> > +##
> > +{ 'struct': 'SgxEPCDeviceInfo',
> > +  'data': { '*id': 'str',
> > +            'memaddr': 'size',
> > +            'size': 'size',
> > +            'memdev': 'str'
> > +          }
> > +}
> > +
> >  ##
> >  # @MemoryDeviceInfo:
> >  #
> > @@ -1198,7 +1221,8 @@
> >    'data': { 'dimm': 'PCDIMMDeviceInfo',
> >              'nvdimm': 'PCDIMMDeviceInfo',
> >              'virtio-pmem': 'VirtioPMEMDeviceInfo',
> > -            'virtio-mem': 'VirtioMEMDeviceInfo'
> > +            'virtio-mem': 'VirtioMEMDeviceInfo',
> > +            'sgx-epc': 'SgxEPCDeviceInfo'
> >            }
> >  }
> >  
> > 
> 
> -- 
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3226
> Virtualization:  qemu.org | libvirt.org



reply via email to

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