|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 5/7] vTPM: Delete the xenstore directory of frontend device
On Tue, Mar 10, 2015 at 08:14:00AM -0400, Quan Xu wrote:
> when virtual machine is destroyed.
>
> Signed-off-by: Quan Xu <quan.xu@xxxxxxxxx>
> ---
> tools/libxl/libxl_device.c | 61
> +++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 57 insertions(+), 4 deletions(-)
>
> diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
> index b1a71fe..668bf71 100644
> --- a/tools/libxl/libxl_device.c
> +++ b/tools/libxl/libxl_device.c
> @@ -660,10 +660,11 @@ void libxl__devices_destroy(libxl__egc *egc,
> libxl__devices_remove_state *drs)
> {
> STATE_AO_GC(drs->ao);
> uint32_t domid = drs->domid;
> - char *path;
> - unsigned int num_kinds, num_dev_xsentries;
> - char **kinds = NULL, **devs = NULL;
> - int i, j, rc = 0;
> + char *path, *dom_name, *name;
> + unsigned int num_kinds, num_fkinds, num_dev_xsentries, num_dev;
> + char **kinds = NULL, **fkinds = NULL, **devs = NULL, **sdevs = NULL,
> + **be_doms = NULL;
> + int i, j, k, rc = 0;
> libxl__device *dev;
> libxl__multidev *multidev = &drs->multidev;
> libxl__ao_device *aodev;
> @@ -731,6 +732,58 @@ void libxl__devices_destroy(libxl__egc *egc,
> libxl__devices_remove_state *drs)
> libxl__device_destroy(gc, dev);
> }
>
> + /*
> + * Frontend device, such as vTPM, is under:
> + * /local/domain/0/frontend/{type}/{backend_dom_id}/{dev}
Again, don't use hardcoded /local/domain/0.
I doubt that if you will ever need this patch if you have established a
clear xenstore protocol.
Have a look at docs/misc/xenstore-paths.markdown. (I know that document
can be vague so don't hesitate to ask questions)
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |