On Wed, Sep 08, 2021 at 12:04:19PM +0200, Paolo Bonzini wrote: > From: Yang Zhong <yang.zh...@intel.com> > > 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: > > +++ b/qapi/machine.json > @@ -1220,6 +1220,29 @@ > 'data': { 'sgx-epc': ['SgxEPC'] } > } > > +## > +# @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: 6.1
And another spot for a followup patch for 6.2 designation. > +## > +{ 'struct': 'SgxEPCDeviceInfo', > + 'data': { '*id': 'str', > + 'memaddr': 'size', > + 'size': 'size', > + 'memdev': 'str' > + } > +} > + > ## > # @MemoryDeviceInfo: > # > @@ -1234,7 +1257,8 @@ > 'data': { 'dimm': 'PCDIMMDeviceInfo', > 'nvdimm': 'PCDIMMDeviceInfo', > 'virtio-pmem': 'VirtioPMEMDeviceInfo', > - 'virtio-mem': 'VirtioMEMDeviceInfo' > + 'virtio-mem': 'VirtioMEMDeviceInfo', > + 'sgx-epc': 'SgxEPCDeviceInfo' > } > } > > -- > 2.31.1 > > > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org