qemu: Report snp-policy in virDomainGetLaunchSecurityInfo()

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Michal Privoznik 2024-06-11 11:53:43 +02:00
parent 914b986275
commit be26d0ebbe
2 changed files with 16 additions and 0 deletions

View File

@ -6312,6 +6312,16 @@ int virDomainSetLifecycleAction(virDomainPtr domain,
*/
# define VIR_DOMAIN_LAUNCH_SECURITY_SEV_POLICY "sev-policy"
/**
* VIR_DOMAIN_LAUNCH_SECURITY_SEV_SNP_POLICY:
*
* Macro represents the policy of the SEV-SNP guest,
* as VIR_TYPED_PARAM_ULLONG.
*
* Since: 10.5.0
*/
# define VIR_DOMAIN_LAUNCH_SECURITY_SEV_SNP_POLICY "sev-snp-policy"
/**
* VIR_DOMAIN_LAUNCH_SECURITY_SEV_SECRET_HEADER:
*

View File

@ -19088,6 +19088,12 @@ qemuDomainGetSEVInfo(virDomainObj *vm,
break;
case QEMU_MONITOR_SEV_GUEST_TYPE_SEV_SNP:
if (virTypedParamsAddULLong(params, nparams, &maxpar,
VIR_DOMAIN_LAUNCH_SECURITY_SEV_SNP_POLICY,
info.data.sev_snp.snp_policy) < 0)
goto endjob;
break;
case QEMU_MONITOR_SEV_GUEST_TYPE_LAST:
break;
}