[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/7] qmp: Add the qmp_query_sgx_capabilities()
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 5/7] qmp: Add the qmp_query_sgx_capabilities() |
Date: |
Wed, 8 Sep 2021 10:38:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 9/8/21 10:19 AM, Yang Zhong wrote:
> Libvirt can use qmp_query_sgx_capabilities() to get the host
> sgx capabilities.
>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> ---
> hw/i386/sgx.c | 66 ++++++++++++++++++++++++++++++++++++++
> include/hw/i386/sgx.h | 1 +
> qapi/misc-target.json | 18 +++++++++++
> target/i386/monitor.c | 5 +++
> tests/qtest/qmp-cmd-test.c | 1 +
> 5 files changed, 91 insertions(+)
> +SGXInfo *sgx_get_capabilities(Error **errp)
> +{
> + SGXInfo *info = NULL;
> + uint32_t eax, ebx, ecx, edx;
> +
> + int fd = qemu_open_old("/dev/sgx_vepc", O_RDWR);
> + if (fd < 0) {
> + error_setg(errp, "SGX is not enabled in KVM");
> + return NULL;
> + }
Is this Linux specific?
- [PATCH 3/7] i386: Add sgx_get_info() interface, (continued)
[PATCH 7/7] pc: Cleanup the SGX definitions, Yang Zhong, 2021/09/08
[PATCH 6/7] monitor: Fix coredump issue in non-x86 platform, Yang Zhong, 2021/09/08