[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: |
Eric Blake |
Subject: |
Re: [RESEND PATCH 31/32] sgx-epc: Add the fill_device_info() callback support |
Date: |
Mon, 3 May 2021 13:01:22 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
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
> +##
> +{ '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
- Re: [RESEND PATCH 31/32] sgx-epc: Add the fill_device_info() callback support,
Eric Blake <=