"Naveen N Rao (AMD)" <[email protected]> writes:
> Add support for configuring the TSC frequency when Secure TSC is enabled
> in SEV-SNP guests through a new "tsc-frequency" property on SEV-SNP
> guest objects, similar to the vCPU-specific property used by regular
> guests and TDX. A new property is needed since SEV-SNP guests require
> the TSC frequency to be specified during early SNP_LAUNCH_START command
> before any vCPUs are created.
>
> The user-provided TSC frequency is set through KVM_SET_TSC_KHZ before
> issuing KVM_SEV_SNP_LAUNCH_START.
>
> Co-developed-by: Ketan Chaturvedi <[email protected]>
> Signed-off-by: Ketan Chaturvedi <[email protected]>
> Co-developed-by: Nikunj A Dadhania <[email protected]>
> Signed-off-by: Nikunj A Dadhania <[email protected]>
> Signed-off-by: Naveen N Rao (AMD) <[email protected]>
[...]
> diff --git a/qapi/qom.json b/qapi/qom.json
> index b05a475ef499..5b99148cb790 100644
> --- a/qapi/qom.json
> +++ b/qapi/qom.json
> @@ -1102,6 +1102,9 @@
> #
> # @secure-tsc: enable Secure TSC (default: false) (since 10.2)
> #
> +# @tsc-frequency: set secure TSC frequency. Only valid if Secure TSC
> +# is enabled (default: zero) (since 10.2)
Two spaces between sentences for consistency, please.
> +#
> # Since: 9.1
> ##
> { 'struct': 'SevSnpGuestProperties',
> @@ -1114,7 +1117,8 @@
> '*author-key-enabled': 'bool',
> '*host-data': 'str',
> '*vcek-disabled': 'bool',
> - '*secure-tsc': 'bool' } }
> + '*secure-tsc': 'bool',
> + '*tsc-frequency': 'uint32' } }
>
> ##
> # @TdxGuestProperties: