[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] sev: allow capabilities to check for SEV-ES support
From: |
Eric Blake |
Subject: |
Re: [PATCH] sev: allow capabilities to check for SEV-ES support |
Date: |
Mon, 15 Nov 2021 16:47:27 -0600 |
User-agent: |
NeoMutt/20211029-16-b680fe |
On Mon, Nov 15, 2021 at 02:38:04PM -0500, Tyler Fanelli wrote:
> Probe for SEV-ES and SEV-SNP capabilities to distinguish between Rome,
> Naples, and Milan processors. Use the CPUID function to probe if a
> processor is capable of running SEV-ES or SEV-SNP, rather than if it
> actually is running SEV-ES or SEV-SNP.
>
> Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
> ---
> qapi/misc-target.json | 11 +++++++++--
> target/i386/sev.c | 6 ++++--
> 2 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/qapi/misc-target.json b/qapi/misc-target.json
> index 5aa2b95b7d..c3e9bce12b 100644
> --- a/qapi/misc-target.json
> +++ b/qapi/misc-target.json
> @@ -182,13 +182,19 @@
> # @reduced-phys-bits: Number of physical Address bit reduction when SEV is
> # enabled
> #
> +# @es: SEV-ES capability of the machine.
> +#
> +# @snp: SEV-SNP capability of the machine.
> +#
Missing '(since 7.0)' tags on the new members.
> # Since: 2.12
> ##
> { 'struct': 'SevCapability',
> 'data': { 'pdh': 'str',
> 'cert-chain': 'str',
> 'cbitpos': 'int',
> - 'reduced-phys-bits': 'int'},
> + 'reduced-phys-bits': 'int',
> + 'es': 'bool',
> + 'snp': 'bool'},
> 'if': 'TARGET_I386' }
>
> ##
> @@ -205,7 +211,8 @@
> #
> # -> { "execute": "query-sev-capabilities" }
> # <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
> -# "cbitpos": 47, "reduced-phys-bits": 5}}
> +# "cbitpos": 47, "reduced-phys-bits": 5
> +# "es": false, "snp": false}}
Invalid JSON, as you missed the comma needed after 5.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org