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

Re: [Xen-devel] [PATCH xm/xl enhancements for vptm 6/6] add vtpm support to libxl



On Fri, 2012-09-21 at 20:23 +0100, Matthew Fioravante wrote:
> Add support for vtpm=["VTPM_SPEC",...] to domain config files. Also add
> commands vtpm-attach, vtpm-list, and vtpm-detach.
> 
> Signed off by Matthew Fioravante matthew.fioravante@xxxxxxxxxx
> 
> ---
> Changes since previous:
> * Rebased to latest xen
> * Updated xl.cfg and xl manpages
> 
> diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
> --- a/docs/man/xl.cfg.pod.5
> +++ b/docs/man/xl.cfg.pod.5
> @@ -298,6 +298,35 @@ Specifies the networking provision (both emulated
> network adapters,
>  and Xen virtual interfaces) to provided to the guest.  See
>  F<docs/misc/xl-network-configuration.markdown>.
>  
> +=item B<vtpm=[ "VTPM_SPEC_STRING", "VTPM_SPEC_STRING", ...]>
> +
> +Specifies the virtual trusted platform module to be

can there be more than one?

> +provided to the guest. Please see F<docs/misc/vtpm.txt>
> +for more details.
> +
> +Each B<VTPM_SPEC_STRING> is a comma-separated list of C<KEY=VALUE>
> +settings, from the following list:
> +
> +=over 4
> +
> +=item C<backend=DOMAIN>
> +
> +Specify the backend domain name of id. This value must be
> +set if you are using the vtpm domain model. If this domain
> +is a guest, the backend should be set to the vtpm domain name.
> +If this domain is a vtpm, the backend should be set to the
> +vtpm manager domain name. The default value is domain 0,
> +which should be used if you are running the vtpm process model.

I had a look in docs/misc/vtpm.txt but didn't see anything which
explained "vtpm process model" vs "vtpm manager domain" vs "vtpm
domain". I suppose that's part of the future doc work you were talking
about ;-)

> +
> +=item C<uuid=UUID>
> +
> +Specify the uuid of this vtpm device. The uuid is used to uniquely
> +identify the vtpm device. You can create one using the uuidgen
> +program on unix systems. If left unspecified, a new uuid
> +will be randomly generated everytime the domain boots.

                                   ^missing space here
> +
> +=back
> +
>  =item B<vfb=[ "VFB_SPEC_STRING", "VFB_SPEC_STRING", ...]>
>  
>  Specifies the paravirtual framebuffer devices which should be supplied
> [..]
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
[...]
> +static void domcreate_attach_vtpms(libxl__egc *egc, libxl__multidev
> *multidev, int ret) {
> +   libxl__domain_create_state *dcs = CONTAINER_OF(multidev, *dcs,
> multidev);
> +   STATE_AO_GC(dcs->ao);
> +   int domid = dcs->guest_domid;
> +
> +   libxl_domain_config* const d_config = dcs->guest_config;
> +
> +   if(ret) {
> +      LOG(ERROR, "unable to add nic devices");
> +      goto error_out;
> +   }
> +
> +    /* Plug nic interfaces */

You mean vtpms here.

> +int main_vtpmdetach(int argc, char **argv)
> +{
> +    uint32_t domid;
> +    int opt, rc=0;
> +    libxl_device_vtpm vtpm;
> +    libxl_uuid uuid;
> +
> +    if ((opt = def_getopt(argc, argv, "", "vtpm-detach", 2)) != -1)
> +        return opt;
> +
> +    domid = find_domain(argv[optind]);
> +
> +    if ( libxl_uuid_from_string(&uuid, argv[optind+1])) {

Why does vtpm use/need UUID's for identification rather than just a
domid+devid like other device types?

Is the UUID used for something more than identification?

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.