[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 13/28] qmp: add query-sev command
From: |
Brijesh Singh |
Subject: |
Re: [Qemu-devel] [PATCH v8 13/28] qmp: add query-sev command |
Date: |
Mon, 12 Feb 2018 12:47:57 -0600 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 2/12/18 11:27 AM, Eric Blake wrote:
> On 02/12/2018 09:37 AM, Brijesh Singh wrote:
>> The QMP query command can used to retrieve the SEV information when
>> memory encryption is enabled on AMD platform.
>>
>> Cc: "Daniel P. Berrangé" <address@hidden>
>> Cc: "Dr. David Alan Gilbert" <address@hidden>
>> Cc: Markus Armbruster <address@hidden>
>> Signed-off-by: Brijesh Singh <address@hidden>
>> ---
>
>> +# @SevInfo:
>> +#
>> +# Information about Secure Encrypted Virtualization (SEV) support
>> +#
>> +# @enabled: true if SEV is active
>> +#
>> +# @api-major: SEV API major version
>> +#
>> +# @api-minor: SEV API minor version
>> +#
>> +# @build-id: SEV FW build id
>> +#
>> +# @policy: SEV policy value
>> +#
>> +# @state: SEV guest state
>
> Is there a finite list of guest states?
>
Yes, the list is finite.
include/sysemu/sev.h defines the enum
typedef enum {
SEV_STATE_UNINIT = 0,
SEV_STATE_LUPDATE,
SEV_STATE_SECRET,
SEV_STATE_RUNNING,
SEV_STATE_SUPDATE,
SEV_STATE_RUPDATE,
SEV_STATE_MAX
}
>> +#
>> +# Since: 2.12
>> +##
>> +{ 'struct': 'SevInfo',
>> + 'data': { 'enabled': 'bool',
>> + 'api-major': 'uint8',
>> + 'api-minor' : 'uint8',
>> + 'build-id' : 'uint8',
>> + 'policy' : 'uint32',
>> + 'state' : 'str'
>
> If so, this should be an enum type listing those possible states,
> rather than an open-coded 'str' that can hold anything.
>
If the preference is to return enum, then I can convert the state to
return enum instead of string.
- [Qemu-devel] [PATCH v8 07/28] kvm: update kvm.h to include memory encryption ioctls, (continued)
- [Qemu-devel] [PATCH v8 07/28] kvm: update kvm.h to include memory encryption ioctls, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 06/28] machine: add -memory-encryption property, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 09/28] target/i386: add Secure Encrypted Virtulization (SEV) object, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 08/28] docs: add AMD Secure Encrypted Virtualization (SEV), Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 10/28] sev/i386: add command to initialize the memory encryption context, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 11/28] sev/i386: register the guest memory range which may contain encrypted data, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 12/28] kvm: introduce memory encryption APIs, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 13/28] qmp: add query-sev command, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 14/28] hmp: add 'info sev' command, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 15/28] sev/i386: add command to create launch memory encryption context, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 16/28] sev/i386: add command to encrypt guest memory region, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 17/28] target/i386: encrypt bios rom, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 19/28] sev/i386: finalize the SEV guest launch flow, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 18/28] sev/i386: add support to LAUNCH_MEASURE command, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 20/28] hw/i386: set ram_debug_ops when memory encryption is enabled, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 21/28] sev/i386: add debug encrypt and decrypt commands, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 22/28] target/i386: clear C-bit when walking SEV guest page table, Brijesh Singh, 2018/02/12
- [Qemu-devel] [PATCH v8 23/28] include: add psp-sev.h header file, Brijesh Singh, 2018/02/12