Re: [RFC PATCH 1/3] libvirt: Introduce virDomainInjectLaunchSecret public API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 16, 2021 at 07:23:52PM -0700, Jim Fehlig wrote:
> An API inject a launch secret into the domain's memory.
> 
> Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
> ---
>  include/libvirt/libvirt-domain.h |  6 ++++
>  src/driver-hypervisor.h          |  8 +++++
>  src/libvirt-domain.c             | 50 ++++++++++++++++++++++++++++++++
>  src/libvirt_public.syms          |  5 ++++
>  4 files changed, 69 insertions(+)
> 
> diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
> index 2f017c5b68..418ee4bd2d 100644
> --- a/include/libvirt/libvirt-domain.h
> +++ b/include/libvirt/libvirt-domain.h
> @@ -5091,6 +5091,12 @@ int virDomainGetLaunchSecurityInfo(virDomainPtr domain,
>                                     int *nparams,
>                                     unsigned int flags);
>  
> +int virDomainInjectLaunchSecret(virDomainPtr domain,
> +                                const char *secrethdr,
> +                                const char *secret,
> +                                unsigned long long injectaddr,
> +                                unsigned int flags);

I thought of a better name at last, that shows its relation
to virDomainGetLaunchSecurityInfo without implying that they
are the direct inverse of each other:

  virDomainSetLaunchSecurityState(...)

Also, we whould bear in mind that the set of state parameters
may be differnt for vendors other than AMD, and even later
generations of AMD SEV might want more parameters.

So lets use a 'virTypedParameter' array for this methodeg

  virDomainSetLaunchSecurityState(virDomainPtr dom,
                                  virTypedParameterPtr params,
                                  int nparams,
                                  unsigned int flags);


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux